XRoar, GDB with CoCo

Hardware Hacking, Programming and Game Solutions/Cheats
Post Reply
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

XRoar, GDB with CoCo

Post by pser1 »

@Ciaran
Hi, I have GDB working perfect with XRoar and any Dragon with or without DOS emulations ...

But I cannot get it to work with a CoCo2 emulation.
This is the log result of my attempts:

Code: Select all

d:\XRoar v0.33.1-2015-33312 w64\CoCo2>cd..
d:\XRoar v0.33.1-2015-33312 w64>copy ..\XRoar\DOS-ROMS\disk12a.rom disk12a.rom
        1 archivo(s) copiado(s).
d:\XRoar v0.33.1-2015-33312 w64>copy ..\XRoar\ROMs\bas14.rom bas14.rom
        1 archivo(s) copiado(s).
d:\XRoar v0.33.1-2015-33312 w64>copy ..\XRoar\ROMs\extbas11.rom extbas11.rom
        1 archivo(s) copiado(s).
d:\XRoar v0.33.1-2015-33312 w64>start xroar -machine cocous -bas bas14.rom -extbas
 extbas11.rom -machine-cart rsdos -cart-rom disk12a.rom -force-crc-match -tape
-fast -joy-left 0,0:1:0 -kbd-translate -lp-file ..\XRoar\sortida.txt
d:\XRoar v0.33.1-2015-33312 w64>pause "press a key when XRoar is working"
Presione una tecla para continuar . . .

d:\XRoar v0.33.1-2015-33312 w64>m6809-gdb
GNU gdb (GDB) 7.6.50.20130426-cvs
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-w64-mingw32 --target=m6809".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.

(gdb) target remote localhost:65520
localhost:65520: El sistema ha intentado unir una unidad a un directorio de una
unidad ya unida.
(gdb)
- free translation of error message:
The system has attempted to link a unit (or whatever) to a directory of an already linked unit.
I have tried changing the 65520 for any other number, always the same result ...
What am I doing wrong, please?

thanks in advance
pere
User avatar
tormod
Posts: 416
Joined: Sat Apr 27, 2013 12:06 pm
Location: Switzerland
Contact:

Re: XRoar, GDB with CoCo

Post by tormod »

I don't see -gdb on your command line?
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XRoar, GDB with CoCo

Post by pser1 »

Hi Tormod,
gdb is started with this line from the bat file:

d:\XRoar v0.33.1-2015-33312 w64>m6809-gdb

then, with gdb started I enter this command
target remote localhost:65520
and fails. But the same with a Dragon emulation works nicely

cheers
pere
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XRoar, GDB with CoCo

Post by pser1 »

Hi Tormod,
I have added the -gdb in the xroar command and then sent the m6809-gbd
It works or seems to work now ... I will make som tests

Strangely with Dragon emulation I have never put this -gdb in the xroar command and it
works perfect for me.

thanks a lot for the advice!

cheers
pere
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XRoar, GDB with CoCo

Post by pser1 »

One more comment.
The first try, I had everything correct using these commands:

Code: Select all

start xroar -gdb -machine cocous -bas bas14.rom -extbas extbas11.rom -machine-cart mpi -mpi-load-cart 3=rsdos -mpi-load-cart 0=or90S1T0 -mpi-slot 3 -force-crc-match -tape-fast -joy-left 0,0:1:0 -kbd-translate -lp-file ..\XRoar\sortida.txt 
m6809-gdb -ex "layout asm" -ex "layout regs" --eval-command="target remote localhost:65520"
the two expected windows for registers and asm appear empty and shows this message
"Register 9 is not available"

By default xroar uses a 6809, but if I force the use of a 6309, then the two windows show up and everything works alright

Code: Select all

start xroar -gdb -machine cocous -machine-cpu 6309 -bas bas14.rom -extbas extbas11.rom -machine-cart mpi -mpi-load-cart 3=rsdos -mpi-load-cart 0=or90S1T0 -mpi-slot 3 -force-crc-match -tape-fast -joy-left 0,0:1:0 -kbd-translate -lp-file ..\XRoar\sortida.txt 
m6809-gdb -ex "layout asm" -ex "layout regs" --eval-command="target remote localhost:65520"
This was my problem from the beginning, then every change I made put things worse as Murphy predicted!

cheers
pere
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: XRoar, GDB with CoCo

Post by sixxie »

A little strange that your Dragons fire up with GDB support but CoCos don't (by default). I can't replicate that. GDB being on is a global, so not going to be affected by machine-specific configuration in an "xroar.conf" file either.

Colour me baffled.
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XRoar, GDB with CoCo

Post by pser1 »

Hi Ciaran,
I explained it wrongly.
Both Dragon and CoCo start alright, without problems with the -gdb option.

What surprised me was that, if I used any of these machines without the option
-machine-cpu 63909
then GDB shows the message
"Register 9 is not available" and the two windows I wanted to see appear empty
I had issued:
m6809-gdb -ex "layout asm" -ex "layout regs" --eval-command="target remote localhost:65520"
so that registers and asm listing appear, but this only works if CPU is a 6309, apparently.
Probably because it is looking for registers EF that don't exist in a 6809
This is no problem for me, because 90% of BAT files I am using do add the 6309 option, so don't worry about it.

cheers
pere
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: XRoar, GDB with CoCo

Post by sixxie »

pser1 wrote: What surprised me was that, if I used any of these machines without the option
-machine-cpu 63909
then GDB shows the message
"Register 9 is not available" and the two windows I wanted to see appear empty
Oh, that's not a good failure mode. The GDB protocol code returns the 6309 regs as undefined when it's a 6809. Guess the gdb code doesn't like that...
Post Reply