• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# connect gdb to Valgrind gdbserver:
2target remote | ./vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-mcinfcallRU
3echo vgdb launched process attached\n
4monitor v.set vgdb-error 999999
5#
6# We will interrupt in a few seconds (be sure the main task is ready).
7# Once it is ready, we still have to wait to be sure it is running.
8shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-mcinfcallRU 1 grep main mcinfcallRU.stderr.out
9#
10continue
11info threads
12thread apply all bt full
13# Would like to call this for all threads with 'thread apply all', but due to unfair scheduling,
14# the below can either take a long time and/or have threads finished
15# before they have a chance to execute the whoami
16# thread apply all
17print whoami("inferior call pushed from gdb in mcinfcallRU.stdinB.gdb")
18monitor v.kill
19quit
20