I finally had some luck today using a debug version of libmbed.a that I generated on
a Windows 11 machine using WSL 24.04 and then I copied both the generated
debug: to a location that Windows would see and I would symbolically see
in my <sketchbook>/hardware/arduino-git/mbed to.
cp -r mbed /mnt/d/mbed_debug
in addition, I copied out the sources that were stored out in /tmp
cp -r /tmp/mbed-os-program/mbed-os /mnt/d/mbed-os
Then I uploaded a sketch in IDE2 to my GIGA board and the clicked to start the debugger.
Once the debugger started and hit my first breakpoint, I entered the command:
info sources
into the Debug Console
Which showed all of the source files that the debugger knew about:
And it had a lot of entries like:
/tmp/mbed-os-program/./mbed-os/hal/usb/include/usb/USBPhyEvents.h
I then had to try many different versions of the set substitute-path command
before it found one it liked:
The one it liked this time was:
set substitute-path /tmp/mbed-os-program/./mbed-os d:/mbed_os
and if do the info sources again, they show up like:
d:/mbed_os/connectivity/drivers/emac/COMPONENT_WHD/interface/WhdSTAInterface.h
And I was able to step into the HAL function:
