Re: [uCsimm] gdbserver for uClinux on 68EZ328

From: David McCullough (
Date: Mon Aug 07 2000 - 19:21:18 EDT

Jivin Scott Cytacki lays it down ...
> My original problem: (which I still haven't figured out)
> I can "continue" only if it is the very first command I try. Every
> other time I continue the ucsimm crashes with different errors each
> time.
> However, I can use the "go" command multiple times without a problem.

Not sure about this one. One problem with ptrace is that it doesn't verify
the read areas. This means gdb will crash the CPU if it accesses any
invalid memory. I have attached a patch that I used to get gdb/gdbserver
running properly on the coldfire port.

You could try this and see if it helps. It definately helps when you do a
backtrace and gdb runs off the end of the stack and reads junk ;-)

> Another interesting problem. The "print" command doesn't print the
> correct values for my variables.

I had a similar problem on the coldfire, however because you guys are
using PIC/coff this advice may be way off track :-)

Basically gdb could not deal with an elf file that contained relocs.
The fix was to create an executable, non-relocatable, linked at
address 0, and run gdb on that. gdb gets the code/data/bss
addresses from gdbserver and relocates all the symbolic info to
those addresses,

If that fails, check the data/bss values coming back from gdbserver.

Hope this helps,


David McCullough:  Ph: +61 7 3279 1822  Lineo (The Embedded Linux Company)   Fx: +61 7 3279 1820  PO Box 925, Kenmore QLD 4069, Australia

This message resent by the list server

This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:37 EST