This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Stepping problem with GDB
George Sosnowski wrote:
I'm running ecos on a powerpc 860 MBX-based board.
I boot up to redboot and connect to the serial port via
Gdb and load my ecos application image.
When I run and hit a breakpoint, I use "step" to try to step
into the function call. Instead of actually stepping into the function
it hits another breakpoint further in the function. It appears to
behave as "cont" instead of "step".
Is this something someone else has seen or knows
what I could be doing wrong?
Probably nothing as such: sometimes it fails because GDB's heuristics
about where to place the next breakpoint fail; sometimes it fails because
something in the eCos stub for that architecture fails, for example a
branch opcode it doesn't understand. See
hal/powerpc/arch/current/src/ppc_stub.c for where this magic lives. You'd
be able to tell using stepi instead of step and seeing if it still
hyperspaces then.
But my guess is actually the former - GDB's heuristics, and the best
workaround is to make GDB's job a bit easier and don't try and debug
optimised code. Instead compile without -O2.
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss