Palmos Multi Section Debugging for Prc-tools-2.3
      Name                       Last modified       Size  

[ ] MsectGdb2.3-1.tar.bz2 30-Dec-2003 16:08 987k [ ] MsectGdb2.3-1Patch.tar.bz2 30-Dec-2003 16:08 14k [ ] MsectGdbLinux2.3-1.tar.bz2 24-Mar-2004 03:27 1.0M [DIR] Pmgdb-PODS-0.1.1/ 06-Apr-2004 17:40 - [DIR] Previous Versions/ 30-Dec-2003 03:03 -
README for PalmOS multi-section debugging for prc-tools-2.3 ----------------------------------------------------------- This is the first version of my multi-section debugging patches for prc-tools-2.3: MsectGdb2.3-1. Gdb with these patches applied will identify itself as 'GNU gdb 5.3-tvo-20031229 For a version compatible with Palm OS Developer Suite 0.1.1 look in Pmgdb-PODS-0.1.1. Changes since MsectGdb2.2-3 - Straight port to prc-tools-2.3. Updated comments and doc files to refer only to multiple sections and not to multiple segments. Removed PARAMS macro from remote-palmos.c, since all of gdb-5.3 is ANSI C now. Changes since MsectGdb2.2-2 - Fixed a bug which made gdb skip the PilotMain breakpoint for an application with 10 or more code sections. Thanks to Steve Wetherill for tracking down this one. Changes since MsectGdb2.2-1 - Functions with inner blocks not in the default code section were not treated correctly by ld and gdb. The start and end addresses of the innerblocks got messed up. This created havoc in the symbol lookup code creating things as references to wrong line numbers, source files and functions when stepping into a function in an extra code section which contains inner blocks. This should be fixed now. Thanks to Andrew Razuwaev, who provided his code which made me squash this bug. Changes since MsectGdb2.1-3 - Prc-tools-2.3 changed m68k-palmos-ld to use an internal linker script instead of an external linker script specified in the gcc specs file. Hence the change to the linker script (provide a linker symbol for __text__) in the multisection patches moved also from gcc to binutils. - Because of the change to using an internal script the linker does not produce the expected order of sections in the linker output in the multi section case. This is fixed by modifying the extra linker script produced by m68k-palmos-multigen. - Removed patches to work with PalmOS 5 Simulator and to stop at first executable line of PilotMain, since they are already included in prc-tools-2.3. Changes since MsectGdb2.1-2 - Changed symbol look-up code. In the case of code from several code sections in the same source file (e.g. static functions without a section attribute and public functions with a section attribute) the symbol look-up code could choose the symbol table of the wrong source file. This resulted in wrong function names reported or not stopping at a breakpoint at all. This should be fixed now. - Changed setting of PilotMain breakpoint. The original code did set the breakpoint at the address PilotMain+4, which is (in most cases) in the middle of the function prologue. Now the breakpoint is set at the first executable statement after the prologue, i.e. at the start of the first executable C code line. This also means the line number reported at the break is now really the first executable line of PilotMain, and not the last line before PilotMain. Changes since original 2.1 patches (MsectGdb2.1): - changed logic in the blockvector resorting in objfile_relocate. The original logic was wrong and made gdb commands like 'info functions' produce the wrong results. Also setting breakpoints directly on functions did not work reliably. Both problems should be solved now. - Changes in remote-palmos.c to make it possible to use m68k-palmos-gdb with the PalmOS 5 Simulator. Also the PilotMain breakpoint now generates a SIGSTOP when running on a real device and on the PalmOS 5 Simulator. Changes since my patches for prc-tools-2.0.91: - uses a linker symbol to provide the __text__ address for a single code section application (i.e. no need to replace libcrt.a) - gdbstub <-> remote_wait interaction more robust by using an extra magic word. This means that any combination of apps compiled with prc-tools-2.1 gdbstub/my gdbstub and my gdb/prc-tools-2.1 gdb works. This was not the case for my previous patch. The changed files from prc-tools-2.3-cygwin.tar.bz2 are in MsectGdb2.3-1.tar.bz2: usr/bin/m68k-palmos-gdb.exe usr/bin/m68k-palmos-as.exe usr/bin/m68k-palmos-ld.exe usr/bin/m68k-palmos-multigen.exe usr/m68k-palmos/bin/as.exe usr/m68k-palmos/lib/gdbstub.o usr/m68k-palmos/lib/mown-gp/gdbstub.o usr/m68k-palmos/bin/ld.exe usr/m68k-palmos/lib/ldscripts/m68kpalmos.x usr/m68k-palmos/lib/ldscripts/m68kpalmos.xbn usr/m68k-palmos/lib/ldscripts/m68kpalmos.xn usr/m68k-palmos/lib/ldscripts/m68kpalmos.xr usr/m68k-palmos/lib/ldscripts/m68kpalmos.xu Nathan Kurz has sent me a tar file with the Linux version of my patches (Thanks Nathan). I have not been able to test it, so it is provided as is. The changed files are in MsectGdbLinux2.3-1.tar.bz2: usr/bin/m68k-palmos-gdb usr/bin/m68k-palmos-as usr/bin/m68k-palmos-ld usr/bin/m68k-palmos-multigen usr/m68k-palmos/bin/as usr/m68k-palmos/lib/gdbstub.o usr/m68k-palmos/lib/mown-gp/gdbstub.o usr/m68k-palmos/bin/ld usr/m68k-palmos/lib/ldscripts/m68kpalmos.x usr/m68k-palmos/lib/ldscripts/m68kpalmos.xbn usr/m68k-palmos/lib/ldscripts/m68kpalmos.xn usr/m68k-palmos/lib/ldscripts/m68kpalmos.xr usr/m68k-palmos/lib/ldscripts/m68kpalmos.xu The patch details (including this file) are in MsectGdb2.3-1Patch.tar.bz2. Both tar.bz2 archives are available at To install the binaries under Cygwin: - make sure you have prc-tools-2.3 installed - in a Cygwin shell do 'cd /; tar jxvf /MsectGdb2.3-1.tar.bz2'. To rebuild the binaries under Cygwin or Linux: - unpack the source archives and apply the patches included with prc-tools-2.3. - apply my patches (file MsectGdb2.3-1.diff) - run configure, make etc. as per the installation instructions. Other files in MsectGdb2.3-1Patch.tar.bz2: - Multi-Segment-GDB.txt: Intro to multi-section debugging with GDB - PatchSummary2.3-1.txt: Changelog style overview of my patches - MsectGdb2.3-1.diff: The actual patches to be fed to the 'patch' program. Enjoy. Ton van Overbeek, 2003-12-29 2004-03-24 Linux version provided by Nathan Kurz added 2004-04-06 Pointer to PODS version added