c++ - gdb corefile not see function parameters -


my application crashed due uncaught exception (my c++ code throws uncaught exception under condition). trying gdb corefile. binary library "not striped". , stack trace shows function (my code) uncaught exception thrown, when try print function arguments, "no symbol xxx in current context". info args return "no symbol table info available".

can shed light why ? due uncaught exception unwind/corrupts stack ?

thanks, frank

your binary lacks debug info.

if built gcc, , want debug core have (if e.g. it's hard reproduce crash), may able recover rebuilding binary exactly same source , command lines, adding -g compile , link commands. (note: must use same compile lines; replacing -o2 -g wouldn't do.)

if crash not hard reproduce, rebuild binary -g -o0, run under gdb, , enjoy "easy" debugging.

the binary library "not striped".

this doesn't mean think means. not stripped means symbol table still present in binary.

gdb read symbol table, , use map ranges of addresses function names.

but recover names , values of local variables , parameters, must compile debug info (which -g flag compilers).


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -