X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=src%2Fmisc%2Fgdb-macros;h=3babb52747f7689333aee64ffac75adb06471a66;hp=a0d0e549a626a8cfcae5fcdd697bcabf7e0adcad;hb=85da529909adac7ed00861d259001b124cd5b54f;hpb=bfd2e965e1aa5f2b00dff6b11be770c6cbe7313d diff --git a/src/misc/gdb-macros b/src/misc/gdb-macros index a0d0e54..3babb52 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