File: gdbinit-example

package info (click to toggle)
dmtcp 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,496 kB
  • sloc: cpp: 33,592; ansic: 28,099; sh: 6,735; makefile: 1,950; perl: 1,690; python: 1,241; asm: 138; java: 13
file content (46 lines) | stat: -rw-r--r-- 1,317 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# USAGE:  gdb -x THIS_FILE
#   Conventional filename for THIS_FILE:  gdbinit
#   This file is an example.  Modify the commands below for your situation.

# This file is part of the DMTCP  distribution:  http://dmtcp.sourceforge.net/
#   DMTCP: Distributed MultiThreaded CheckPointing
# THE SOFTWARE IN THIS FILE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED.

# Force any existing DMTCP coordinator to quit
shell bin/dmtcp_command -q

exec bin/dmtcp_launch
set args -i5 test/pthread1

handle SIGUSR2 stop print pass
handle SIGUSR2

set breakpoint pending on
# Stop if about to exit:
break _exit

# Convenient point to stop and look, just after a checkpoint
break 'dmtcp::callbackPostCheckpoint(bool, char*)'
# Define convenience command for later debugging: procmaps
def procmaps
  python gdb.execute("shell cat /proc/" + \
    str(gdb.selected_inferior().pid) + "/maps")
end
# Define convenience command for later debugging: procfd
def procfd
  python gdb.execute("shell ls -l /proc/" + \
    str(gdb.selected_inferior().pid) + "/fd")
end

break execvp
run

break main
cont
# Example of setting a breakpoint.
# Use:  'info functions updateTid' to discover full method signature.
break 'dmtcp::ThreadList::updateTid(Thread*)'

# Change comment into command, to continue automatically
# cont