So I built my self a SIO cable and it works well (sioshell works fine). I would really like to debug remotely with gdb but for the life of me I can't get his going.
I have tried both OS X and Linux with similar results. I'm going to use my results on Linux since it sounds like most people are having success with linux.
Slackware 10.2, libusb 0.1.12, psplink0.9g, and a fresh build using the psp toolchain.
I am attempting to debug the sprite sample from the sdk. I have built with the -g flag and copied the elf over to the root of the MS. In psplink I have disabled the USB and WiFi shells, enabled the SIO shell, disabled USB host filling, and enabled USB debugging.
I start usbhostfs_pc -d, then run debug sprite.elf in the shell, then run psp-gdb sprite.elf and type target remote :10001 in gdb.
The output in usbhostfs_pc is:
- Accepting gdb connection from 127.0.0.1
HOST->GDB (+$Hc-1#09)
HOST->GDB ($Hc-1#09)
HOST->GDB ($Hc-1#09)
HOST->GDB ($Hc-1#09)
HOST->GDB (-)
HOST->GDB (-)
HOST->GDB (-)
HOST->GDB (+$qC#b4)
HOST->GDB ($qC#b4)
HOST->GDB ($qC#b4)
HOST->GDB ($qC#b4)
HOST->GDB (-)
HOST->GDB (-)
HOST->GDB (-)
HOST->GDB (+$qOffsets#4b)
HOST->GDB ($qOffsets#4b)
HOST->GDB ($qOffsets#4b)
HOST->GDB ($qOffsets#4b)
HOST->GDB (-)
HOST->GDB (-)
HOST->GDB (-)
HOST->GDB (+)
Closing gdb connection
The output in gdb is:
- (gdb) target remote :10001
Remote debugging using :10001
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Malformed response to offset query, timeout
Nothing happens on the psp.
Any ideas?
Edit: For the hell of it, I grapped the source from svn for psplink and tried uncommenting the DEBUG define in gdb-stub.c. I followed the same procedure above again with nothing happening on the PSP. Similir output is displayed in usbhostfs_pc, and just cause I didn't want to fire up the linux box this is Mac OSX 10.4.6 with libusb 0.1.12 and I tried psplink h (whatever is lattest in svn).
Edit2: Ok, didn't feel like going to work today so I did some more tinkering. And wouldn't you know it, gdb is debugging like a champ. After setting usbhost=1 I started to get somewhere. In hindsight I guess this should have been obvious. I should also note that I got this working on my Linux box with a fresh copy of psplink from svn (and libusb 0.1.12). It still doesn't work in OS X but I have not given up yet!