c++ - Debugging PIN tool add-symbol-file doesn't work -
to debug simulator uses pin tool, using 2 different terminal windows, following:
/home/agy/mcsim/pin/intel64/bin/pinbin -pause_tool 5 -t /home/agy/mcsim/pthread/mypthreadtool -port 47145 -skip_first 10000 -- mcsim/jacnoboost/jaccard pausing attach pid 5465 load tool's debug info gdb use: add-symbol-file /home/agy/mcsim/pthread/mypthreadtool 0x7f86e6c06ee0 -s .data 0x7f86e709f620 -s .bss 0x7f86e70aaac0
on other window following:
gdb /home/agy/mcsim/pthread/mypthreadtool gnu gdb (ubuntu 7.7-0ubuntu3.1) 7.7 copyright (c) 2014 free software foundation, inc. license gplv3+: gnu gpl version 3 or later <http://gnu.org/licenses/gpl.html> free software: free change , redistribute it. there no warranty, extent permitted law. type "show copying" , "show warranty" details. gdb configured "x86_64-linux-gnu". type "show configuration" configuration details. bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. find gdb manual , other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. help, type "help". type "apropos word" search commands related "word"... reading symbols /home/agy/mcsim/pthread/mypthreadtool...done. (gdb) attach 5465 attaching program: /home/agy/mcsim/pthread/mypthreadtool, process 5465 0x0000000030592c70 in ?? () (gdb) add-symbol-file /home/agy/mcsim/pthread/mypthreadtool 0x7f86e6c06ee0 -s .data 0x7f86e709f620 -s .bss 0x7f86e70aaac0 add symbol table file "/home/agy/mcsim/pthread/mypthreadtool" @ .text_addr = 0x7f86e6c06ee0 .data_addr = 0x7f86e709f620 .bss_addr = 0x7f86e70aaac0 (y or n) y reading symbols /home/agy/mcsim/pthread/mypthreadtool...done. (gdb) c continuing.
at point, pin tool freezes , manually send interrupt signal pin tool , try debug on attached window. understand @ line pin implementation stucks, tried backtrace command returns question marks though symbol file added.
program received signal sigint, interrupt. 0x000000003052c474 in ?? () (gdb) backtrace #0 0x000000003052c474 in ?? () #1 0x00007f86e5570850 in ?? () #2 0x000000003070c290 in ?? () #3 0x0000000001dda880 in ?? () #4 0x0000000001dda880 in ?? () #5 0x000000000040e03a in ?? () #6 0x0000000030643de0 in ?? () #7 0x00007f86d5ada0c0 in ?? () #8 0x0000000000000012 in ?? () #9 0x00007f86e5571350 in ?? () #10 0x0000000030aade20 in ?? () #11 0x0000000000000000 in ?? ()
i couldn't find wrong approach here. please me?
i couldn't find wrong approach here.
you telling gdb mypthreadtool
main executable, not: /home/agy/mcsim/pin/intel64/bin/pinbin
is.
try this:
gdb /home/agy/mcsim/pin/intel64/bin/pinbin 5465 (gdb) add-symbol-file /home/agy/mcsim/pthread/mypthreadtool \ 0x7f86e6c06ee0 -s .data 0x7f86e709f620 -s .bss 0x7f86e70aaac0
Comments
Post a Comment