Problems with gdb remote debugging (68LC302)

Wolfgang Fritz
Wed Jan 2 03:30:00 GMT 2002


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

Target system: 68LC302 development board
Host system: Linux

Target and host connected via asynch serial interface.
Cross development tools:

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

2. Breakpoints don't work at all.
gdb tries to set a breakpoint with $Z0,134f,2 which the stub does not
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

Any help, pointers to web sites, docs etc. are welcome.

Thanks in advance,


Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list