gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > can't get arm-gdb working with VBA

#5742 - mpowell - Wed May 07, 2003 10:05 pm

I just installed a fresh version of DevKitAdv, Insight arm-gdb, and VisualBoyAdvance.

I just for the life of me can't get debugging going with them.

I compiled with gcc -g option to get debugging info in the elf file. (my .elf file and .bin file run fine on VBA)
I launch VisualBoyAdvance.exe, then select Tools\GDB\Load and Wait, pick my .bin file. Port to wait on 55555. OK. It sits with a dialog box "Waiting for connection on port: 55555"
I launch arm-gdb.exe, File Open the .elf file. Int Main () function comes up from my source. I click the console button. Type target remote 127.1.1.0:55555 and I get the following in the command shell
(gdb) target remote 127.1.1.0:55555
Remote debugging using 127.1.1.0:55555
0x08000000 in _start ()

(gdb)

The VBA dialog box goes away. It's menu bar goes all white. And it says (Not Responding) in the title bar.

Is this just really slow and I'm not being patient enough? Or am I doing something wrong or not doing something?

I've read that you should start VisualBoyAdvance with the -Gtcp:55555 option but when I type
VisualBoyAdvance -Gtcp:55555 pb.elf
It complains that -Gtcp:55555 is not a supported file type.
And when I type
VisualBoyAdvance pb.elf -Gtcp:55555
The VBA comes up with a white menu, grey screen, and once I click on the window (Not Responding) comes up in it's title bar.

Does anyone have any ideas?

#5798 - cheese_block - Thu May 08, 2003 7:50 pm

Had a lot of trouble myself with gdb/insight.

I currently use this script,

@ECHO ----Starting VBA and debugger
@start I:\VBA-SDL\VisualBoyAdvance-SDL.exe -Gtcp $(PROJECT).gba
@I:\Development\Debugging\insight\bin\arm-gdb.exe $(PROJECT).elf

which starts VBA (the SDL version) and leaves it listening for gdb. Insight then starts, (with the correct source code) and I hit run, select Target Remote/Tcp, Hostname 127.0.0.1 and port 55555. VBA then starts and you can hit F11 at any time to jump into the code. Shame it doesn't start automatically. Insight is a bit slow and crashes occasionally, but it's not bad. I want to find out if you can use pipe to speed things up.

#5821 - mpowell - Fri May 09, 2003 2:09 am

I was using the VisualBoyAdvance Dev version instead of the SDL version which works. Thanks!

#5848 - cheese_block - Sat May 10, 2003 9:33 am

Did you manage to get it all to start automatically? If so could you post the script you used.

Wonder why the normal VBA has a GDB option? must be some way of getting it to work without having to use the SDL version

#5909 - mpowell - Mon May 12, 2003 5:57 pm

debug.bat is a batch file with the following lines and pb is my project...

path = c:\devKitAdv\bin;c:\devKitAdv\bin_3rd_Party
start visualBoyAdvance-SDL -d -Gtcp pb.elf
arm-gdb pb.elf --command=gdb.txt