X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=src%2Fmisc%2Fgdb-macros;h=a0b68c304ff595b13ab3f07c1d5939bf292a2f86;hp=a0d0e549a626a8cfcae5fcdd697bcabf7e0adcad;hb=941eff93628d8fca26ac6359b4cc8326b817beed;hpb=a03618133f7df0954802a470a4bee7674f7aed45 diff --git a/src/misc/gdb-macros b/src/misc/gdb-macros index a0d0e54..a0b68c3 100644 --- a/src/misc/gdb-macros +++ b/src/misc/gdb-macros @@ -82,6 +82,14 @@ document btthreadlist invoke as btthreadlist name_of_list name_of_elem_in_list_struct end +# print backtraces of all threads (based on 'all_list' all threads list) +define btthreadall + btthreadlist all_list allelem +end +document btthreadall + Print backtraces of all threads +end + # print a correct backtrace by adjusting $eip # this works best right at intr0e_stub define btpagefault @@ -112,6 +120,18 @@ define hook-stop end end +# load symbols for a Pintos user program +define loadusersymbols + shell objdump -h $arg0 | awk '/.text/ { print "add-symbol-file $arg0 0x"$4 }' > .loadsymbols + source .loadsymbols + shell rm -f .loadsymbols +end +document loadusersymbols + Load the symbols contained in a user program's executable. + Example: + loadusersymbols tests/userprog/exec-multiple +end + define debugpintos target remote localhost:1234 end