This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: Problems with gdb remote debugging (68LC302) [WORKAROUND]


Followup to my own message (see below):

Both problems disappear when using gdb-4.18.

For problem 2:
Looking at the gdb source, gdb-5.x should recognize that the stub does
not support the Z command and work around it, but it does not do that.
May be the problem is in the stub. If I find the time, I'll further
investigate on that.

Nevertheless I'm interested in solutions to these problems any time.

Wolfgang

Wolfgang Fritz schrieb:
> 
> Hi,
> 
> I am trying to get remote debugging with gdb to work and I'm presently
> stuck with 2 problems. Let ee first describe the development environment
> here:
> 
> Target system: 68LC302 development board
> Host system: Linux
> 
> Target and host connected via asynch serial interface.
> Cross development tools:
> 
> binutils-2.10.2
> gcc-2.95.3
> newlib-1.9
> gdb-5.0/5.1 (tried both)
> 
> Built for m68k-coff.
> 
> I use the modified gdb stub for 68k which is included in the
> newlib/libgloss source.
> The stub example in the gdb sources is basically the same.
> 
> I connect gdb to the target with
> 
> target async /dev/ttyS1
> 
> I have the stub basically running, I can examine variables, memory,
> program code on the target system, but I have the following problems:
> 
> 1. Single step
> With all single step instructions (step, stepi etc.) gdb says:
> 
> (gdb) stepi
> The program is running.  Exit anyway? (y or n)
> 
> If I say y, gdb quits, if I say n, the target executes the single step.
> Could this be a configuration problem? This is with both gdb-5.0 and
> gdb-5.1
> 
> 2. Breakpoints don't work at all.
> gdb tries to set a breakpoint with $Z0,134f,2 which the stub does not
> support.
> In my gdb docs this command is mentioned, but optional. Can I tell gdb
> to set the trap instruction via a meory write? I think there must be a
> way not to use the Z command, because the gdbstubs project on
> sourceforge doesn't support it either.
> 
> Of course it would be possible to expand the stub to support the Z
> command, but I have the strong feeling that I'm missing something
> simple.
> 
> Any help, pointers to web sites, docs etc. are welcome.
> 
> Thanks in advance,
> 
> Wolfgang
> 
> ------
> Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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