Author Topic: m68k gdb stub  (Read 2614 times)

0 Members and 1 Guest are viewing this topic.

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
m68k gdb stub
« on: February 28, 2015, 01:14:22 pm »
hi guys
does anyone has a pretty well written gdb stub for m68k ?
i have seen something in the gdb sources, but it is not well written

wandering if to fix it, or if to rewrite it, or if someone has already rewritten it
in case let me know.

minimal features required to interface the gdb serial protocol
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: m68k gdb stub
« Reply #1 on: March 01, 2015, 01:09:51 am »
Wow, I haven't worked on the 68k since... I don't know.. 1986, 89 maybe :)

what are you doing with it?
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: m68k gdb stub
« Reply #2 on: March 01, 2015, 01:16:45 am »
The HP *standard* 68k gdb stub is the one you don't like?  That's ancient; I would have thought it was tuned to perfection!
(OTOH, that was also probably the first gdb stub ever written.)
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: m68k gdb stub
« Reply #3 on: March 01, 2015, 10:53:09 am »
what are you doing with it?

a 68K board, with a Yamaha V9958 VDU (it's RGB-S video output) and a CS8900 lan
it's an hobby project, i need the gdb-stub to do code-inject, and common debug
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: m68k gdb stub
« Reply #4 on: March 01, 2015, 10:58:09 am »
The HP *standard* 68k gdb stub is the one you don't like?

don't know, i have downloaded gdb sources and found a stub for m68k in the "stub" folder
but it is very ugly piece of code: C89, assembly inline mixed, and too much GNU dependent

my sierra C compiler has reported ~100 errors and ~400 warnings
i have removed the assembly inline from the C source, and then tried with gcc: 2 errors, ~200 warnings

btw, i think i will rewrite it from scratches
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: m68k gdb stub
« Reply #5 on: March 02, 2015, 07:04:41 am »
Wow.  It is in pretty bad shape, isn't it.
You might want to look at some of the newer 68k variants.  CPU32 and Coldfire, for instance.
For example, this version: https://code.google.com/p/coldfire-gdb-stub/source/browse/trunk/src/gdb_src/coldfire-stub.c
at least gets rid of the page-long multi-line strings in "asm" commands.

I don't think you'll be able to get away without some assembler and compiler dependencies.  You're dealing with low-level traps and data arrangements, which are almost certainly not fully accessible to "true" C.
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: m68k gdb stub
« Reply #6 on: March 02, 2015, 09:38:49 am »
excellent idea, thank you  :-+ :-+ :-+
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf