Closed janmaartenbuis closed 1 year ago
@janmaartenbuis : If you still have this patch, could you share it as a github gist or similar as trying to sort out GDB for the Wii when using newer GDB than 7.7.1 ...
This repo contains only upstream gdb & patches for devkitARM-gdb. This is not the appropriate place for this issue nor is the issue with gdb.
@WinterMute sorry, my bad. For me the issue was very much GDB. Any suggestion where I could share this then?
@WinterMute : Can you please indicate where in the devkitPro org, the repository for gdb for Wii / Gamecube is generated / built from then? I haven't been able to locate this and thought that this was the source repo...
@janmaartenbuis : You can create a public gist as per https://docs.github.com/en/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists ... Once done, drop me a message at
@WinterMute, @devkitPro: Sorry for the noise. Will not bother you further.
@WinterMute sorry, my bad. For me the issue was very much GDB. Any suggestion where I could share this then?
Would very much prefer if you kept it to yourself. The issue lies primarily with libogc's debug stub which requires updating for latest gdb.
@WinterMute : Can you please indicate where in the devkitPro org, the repository for gdb for Wii / Gamecube is generated / built from then? I haven't been able to locate this and thought that this was the source repo...
The gdb we supply for devkitPPC is built from vanilla sources. If we ever patch gdb then there will be a branch in this repository.
We would also very much appreciate it if people weren't encouraged to share and use inappropriate patches.
@WinterMute As you wish. Just trying to be helpful.
@WinterMute : I understand that, but I think you have an issue with the powerpc-eabi-gdb shipped with r43 i.e. 20230501 release hence why I am doing this. That is v7.6.2 which I assume is to allow it to work correctly with the debugging stub for the Wii since that breaks for remote debugging after v7.7.1.
However, that version of GDB only understands DWARF v4 and lower. However, your updates to the GCC toolchain now mean that -g builds the library code with DWARF v5 by default, hence the gdb shipped can't load the debug symbols of any executable which has been linked against libogc etc. :|
The solution is for you to fix the library build scripts to pass "-gdwarf-4" and I will need to add the same to my application build scripts to work with GDB v7.6.2 ...
The other solution would be to update the toolchain to a newer GDB version... but as you have indicated that would need updates / changes to the Wii debugging stub code. I didn't spot this previously, but that is https://github.com/devkitPro/libogc/tree/master/libdb if I am correct?
The other solution would be to update the toolchain to a newer GDB version... but as you have indicated that would need updates / changes to the Wii debugging stub code. I didn't spot this previously, but that is https://github.com/devkitPro/libogc/tree/master/libdb if I am correct?
It is, yes. I found some time to look at it sorted the problem & updated gdb to 13.2 so it's all good now.
@WinterMute : Thank you very much for doing that. I can shelve the pending PRs I was making to add -gdwarf-4 in far too many places :) Can I check a couple of points:
@digitall Tested with real usb gecko on Wii & tcp/ip on cube. Logs attached on https://github.com/devkitPro/libogc/pull/154
Do feel free to PR qSupported packet support, would be much appreciated.
@WinterMute: Thanks. Will look at adding in qSupported if I can and any other packets. One further point, it isn't well documented that the GDB_NETWORK_TCP only works on the Gamecube with the Broad Band Adapter, though I suppose you could connect a BBA to the EXI ports on a Wii, but I haven't seen a cable / adaptor to do that.
Since the USB Gecko is practically impossible to get now (and I don't have one) and building a Shuriken is a problem since the XC9500 CPLD is also unobtainium, I was aiming to look at using GDB_NETWORK_TCP on the Wii. This was done once previously, but the code was not upstreamed to libogc and the links for the code patches are now all dead: https://wiibrew.org/wiki/User:Qiang0/Debugging#Debugging_Homebrew_apps_without_Gecko_USB
However, I assume this would entail using the IOS network API calls instead of the bba.h API. Any views on whether this would work and do you have a copy of that RAR file?
From what I know, the reason an older version of GDB is included in this repo is because of the connection error that appears in later GDB versions. I've traced the assert error in the GDB source code and I think I've fixed it. I've been using GDB 12.1 (build for ppc) on Linux in combination with the gdbstub for debugging GameCube homebrew over the BBA and it works fine. I don't have permission to push to this repo, but I'd be happy to share my fix if you're interested.