[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] gdb & gcc 4.3.2

Eero Tamminen wrote:

On the Aranym side you would need the minimal Gdb server thing, on the PC
side a cross-gdb (host x86, target m68k) and a debug version of the binary
running in the Aranym.  Then just tell DDD to start the cross-gdb.

It should look something like this:
- Aranym:
  # m68k-gdbserver HOST-IP:PORT m68k-binary-stripped
- PC:
  $ ddd --debugger 'i386-m68k-gdb 68k-binary-unstripped'
- in DDD Gdb prompt:
  (gdb) target remote HOST-IP:PORT

I've used this few times with Scratchbox for debugging ARM binaries and it
works fine.  In MiNT case it should be even easier as the MiNT binaries are
statically linked and you don't need to care about dynamic library paths.

The only/real problem is getting i386-m68k cross-gdb (gdbserver itself is
part of Gdb build).

Many thanks for these detailed instructions, they helped a lot.
Now remote debugging for MiNT has become a reality !

The "i386-m68k cross-gdb" is called m68k-atari-mint-gdb was easy to get : it was just a matter of cross-compiling the already-patched gdb for MiNT.

The only/real problem was about gdbserver: I had to add some code into it because MiNT does not use virtual memory. GDB must be informed of the actual memory location of the executable.

Cross-compiling is usually a piece of cake, but I must admit that cross-compiling gdb and ncurses was a nightmare, because the old versions I used are not cross friendly... That's another good reason to upgrade to the new versions !

Vincent Rivière