我檢查覈心轉儲和名稱符號需要打印函數的參數值時,只有它們的類型是已知的(沒有參數名稱符號):GDB:如何打印功能的參數值時沒有可用的
(gdb) frame 7
#7 0x00007f201a269e82 in f1(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned char*, int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >*)() from /usr/lib64/libsome.so
(gdb) info args
No symbol table info available.
(gdb) info f
Stack level 7, frame at 0x7f200ebf9e50:
rip = 0x7f201a269e82
in f1(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned char*, int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >*); saved rip 0x7f201b430905
called by frame at 0x7f200ebfa1c0, caller of frame at 0x7f200ebf9e00
Arglist at 0x7f200ebf9df8, args:
Locals at 0x7f200ebf9df8, Previous frame's sp is 0x7f200ebf9e50
Saved registers:
rbx at 0x7f200ebf9e28, rbp at 0x7f200ebf9e30, r12 at 0x7f200ebf9e38, r13 at 0x7f200ebf9e40, rip at 0x7f200ebf9e48
具體來說,我需要知道第一個參數(std :: string)和最後一個參數(std :: string *)中的內容。 的的arglist和當地人在這個框架都指向同一個地址......
試圖解開這個函數,可能你會得到一些關於函數參數的信息。 –