mirror of
https://github.com/ioacademy-jikim/debugging
synced 2025-06-08 16:36:21 +00:00
21 lines
500 B
Plaintext
21 lines
500 B
Plaintext
# connect gdb to Valgrind gdbserver:
|
|
target remote | ./vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-hginfo
|
|
echo vgdb launched process attached\n
|
|
monitor v.set vgdb-error 999999
|
|
#
|
|
#
|
|
# insert break:
|
|
break breakme
|
|
#
|
|
# continue till each break and execute via gdb the monitor commands
|
|
# ptr must be allocated at this state:
|
|
continue
|
|
monitor info locks
|
|
eval "monitor v.info location %p", ptr
|
|
# ptr must be freed at this state
|
|
continue
|
|
monitor info locks
|
|
eval "monitor v.info location %p", ptr
|
|
continue
|
|
quit
|