w*s 发帖数: 7227 | 1 so i build the app with "-g" etc., i can set the breakpoint if just "gdb app
".
now i run the app directly, it crashed, got a core file.
run "gdb myapp mycore", "bt",
switch around frames, try to print the variables, but got sth. like
"cannot get the variable/symbol info" etc. (sorry just cannot remember the
exact message)
but "list" can list the source code.
any suggestions ?
again, thanks for all the help ! | m**k 发帖数: 290 | 2 If the variable is a local variable, it could be compiled
as a register, not in the stack frame. In this case, gdb
couldn'd associate the symbol with the register name.
You need to do a "disassemble" and find out which register.
app
【在 w*s 的大作中提到】 : so i build the app with "-g" etc., i can set the breakpoint if just "gdb app : ". : now i run the app directly, it crashed, got a core file. : run "gdb myapp mycore", "bt", : switch around frames, try to print the variables, but got sth. like : "cannot get the variable/symbol info" etc. (sorry just cannot remember the : exact message) : but "list" can list the source code. : any suggestions ? : again, thanks for all the help !
| l*******G 发帖数: 1191 | 3 gdb sucks with printing variables
try totalview | r****t 发帖数: 10904 | 4 install the -dbg packages
app
【在 w*s 的大作中提到】 : so i build the app with "-g" etc., i can set the breakpoint if just "gdb app : ". : now i run the app directly, it crashed, got a core file. : run "gdb myapp mycore", "bt", : switch around frames, try to print the variables, but got sth. like : "cannot get the variable/symbol info" etc. (sorry just cannot remember the : exact message) : but "list" can list the source code. : any suggestions ? : again, thanks for all the help !
|
|