[Coco] xroar host debugger project?

Ciaran Anscomb cocomalt at 6809.org.uk
Sun Sep 18 02:16:28 EDT 2022


Joel Rees via Coco wrote:
> > [...]
> > Is the "disassemble" command enough?
> [...]
> 
> 
> If I got intimate enough
> with XRoar to know where your RAM emulation array is, I could probably
> use un-patched gdb to show me the array contents. But looking for that
> last night, I didn't see what I expected.
> 
> And if I get that familiar, I'm thinking maybe I could dig a little
> deeper and add the debugger UI. It looks like most of the internal
> pieces are in place. (Famous last words, sure.)

Can I just be sure you're not talking about attaching GDB to an XRoar
process here?  I'm talking about the port XRoar can listen on (with the
-gdb option) that GDB can connect to.

You've mentioned remote targets so I don't _think_ this is a point of
confusion, but just in case...  ;)

So you don't need to know where the XRoar process keeps its RAM, you
just attach GDB to it (preferably patched to know about 6809) and just
ask for the emulated information.

The theory was that a more fancy GUI could talk the same protocol and
control the emulated machine through the GDB TCP connection, but I think
the guy that wanted to work on it back then got hit by a bad case of life.

(And if you yourself want to attempt similar, GDB supports custom
protocol additions - the 'q' commands - so we should be able to allow
inspecting/changing other bits of hardware than the RAM, too).

> Building the patched version of gdb -- will that require messing
> around in /dev or such? Or can the patched debugger run in userland?

No, userland: http://www.6809.org.uk/dragon/m6809-gdb.shtml

I did write a quick & dirty getting started note here:

http://www.6809.org.uk/tmp/xroar/m6809-gdb.txt

..ciaran


More information about the Coco mailing list