Help w/ gdb
It helps gdb a lot not to compile with optimisation. e.g. compiling -g -O2 on powerpc stops gcc copying parameters passed in registers onto the stack to aid debugging, this results in stack traces & viewing passed in parameters frequently being rubbish.
Mind you in a project as large as mosizza there may be inline functions which gcc may refuse to compile without optimisation.
In short if you can compile for debugging without using -O2 do so or at least try to compile all the code
of intrest without the -O2 flag.
Quoted 48 lines · --- Kevin Buettner
Quoted 1 line · Sean Chitwood
I periodically ask this question here because I
have never found a
Quoted 3 lines
more appropriate audience or satisfactory answer.
I am attempting to help w/ the mozilla project,
but I am having
Quoted 1 line
little success due to the following problem. When
I attempt to
Quoted 1 line
debug an assert/crash as I bring up the stack
trace I notice that
Quoted 1 line
some of the frames point only to the ending curly
brace of a
Quoted 1 line
function (Not always the one it says is being
debugged). I cannot
Quoted 1 line
examine variables, or learn anything else
productive about the
Quoted 1 line
situation. I realize I am not familiar w/ gdb, I
am primarily
Quoted 1 line
familiar w/ windows GUI based debuggers, so I
figure I am missing a
Quoted 1 line
configuration setting, but for the life of me I
can't figure out
Quoted 1 line
what it is. I do know that I am keeping the
source and binary files
Quoted 1 line
synced, so that shouldn't be it. It seems to load
the symbols
Quoted 1 line
correctly (no complaining about missing symbols),
butother than that
Quoted 1 line
I seem to be clueless.
I think this is a bug in either the linker or in gdb itself. (If it's
the bug I'm thinking of, the bug is actually in the linker, but is
more easily worked around in gdb.) Get the gdb sources and take a look
atconfig/powerpc/tm-linux.h. Now search for the line#define
SOFUN_ADDRESS_MAYBE_MISSINGIs it there? (I'm guessing not.) Try adding the
above line totm-linux.hand then rebuild gdb.
Quoted 11 lines
Let me know if it fixes your problem.
Thanks,
Kevin
Signature · 2 lines
Kevin Buettner [email protected], [email protected]
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/