由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Linux版 - gdb cann't display variable value
相关主题
how to remove condition for a breakpoint in gdb?请教一个linux下面matlab的问题
idb problem (转载)build image with debug info, can you build the debug symbol only ?
Screen session 保持 environment variables后台运行以后用jobs查看,为什么不能作为variable 输出?
how to count a pattern in vi?awk问题求救
setting up bash哪位大牛来普及一下 linux 下面的各种环境变量以及设置
Perl问题求助小白问:awk里面引用变量为啥有的加'$'有的不加?
shell script和variable indexHow can we share system environment variable between two different process?
php session variable问题(有包子)Symbolic Link: ln 和 cp -s 是一样的么?
相关话题的讨论汇总
话题: gdb话题: variable话题: app话题: cann话题: register
进入Linux版参与讨论
1 (共1页)
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 !

1 (共1页)
进入Linux版参与讨论
相关主题
Symbolic Link: ln 和 cp -s 是一样的么?setting up bash
how to step over a line in code with gdb?Perl问题求助
firefox 3.5b4 is goodshell script和variable index
在 vim 里用 gdb (on Linux)php session variable问题(有包子)
how to remove condition for a breakpoint in gdb?请教一个linux下面matlab的问题
idb problem (转载)build image with debug info, can you build the debug symbol only ?
Screen session 保持 environment variables后台运行以后用jobs查看,为什么不能作为variable 输出?
how to count a pattern in vi?awk问题求救
相关话题的讨论汇总
话题: gdb话题: variable话题: app话题: cann话题: register