Long ago, John Marshall wrote: > As for the problem with m68k-palmos-gdb not being able to see > anything beyond the main code resource, I suspect this can be fixed > reasonably easily by extending the gdb end of the debugger protocol. > But this won't be a high priority for me for a while, since > temporarily moving interesting functions into the main code section > ought to be a workable workaround. It seems that GDB 5.0 with the patches from prc-tools still does not handle multiple code sections well. Functions in the main text section work fine, but anything in the other sections is invisible. Moving functions into the main section before debugging them is possible, but quite clumsy in practice. So I started trying to figure what would need to be changed in GDB to make things work correctly. After quite a few hours of pouring over the GDB code, I've concluded that the main problem is that the coff handling functions in GDB (not the patches, but GDB itself) simply do not allow for code sections other than .text. I started trying to fix this directly, but gave up when I realized I was way over my head. Then I realized I could just massage the symbols so they all look like they all come from .text. This approach seems ugly though workable, but I'm going crazy trying to figure out what the correct offsets within and for each section are. The values I see with 'm68k-palmos-objdump -x' imply that the functions themselves are relative to the start of each section, but the debugging (.bf and .ef) symbols are relative to something else. Does anyone know what this something else is? The other problem I'm having has to do with relocation. I can determine pretty well how the symbol file looks like on disk, but I don't have a good idea how a multi-section resource looks like in memory on a Palm Pilot (or in Pose, which I'm using more often). What do the section offsets become? They don't seem to stay contiguous -- or at least if I pretend they are nothing works. Input from anyone more clueful than I greatfully appreciated, --nate -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
