This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Stepping problem with GDB



> From: Jonathan Larmour [mailto:jifl at eCosCentric dot com]
> 
> 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.

After playing around with gdb a little more, it seems that after
stepping and printing values out, and then trying to continue, some
threads to do not appear to continue running when they should. It seems
like things in the threads or gdb is flaky and maybe getting corrupted. 

So I was wondering if there were any requirements or guidelines on
memory for the gdb server, such as stack size. My application code is
pretty big with a lot of symbols (elf file size 9.2MB and bin 2.2MB), so
I'm not sure if step processing or print processing on the server needs
memory, or is this all done on the client? If this a server side thing,
would the adjustments need to be made in redboot, ecos app, or both?

Thanks,
George

--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]