Matt J. Gumbley | Website:
Blog: On The Edge of Occam's Razor

GDB Remote Debug Stub for EPOC

Table Of Contents

1 Project Status

This project or information is dead. I cannot release any code or further information on it, other than what you'll find on this page. All communication regarding it will be silently deleted. Apologies.

Formerly, it was on hold, awaiting information on how EPOC handles exceptions, and how I might patch the exception vector table. Here's the README from the current development snapshot. I haven't got a snapshot archive for you to look at yet; hopefully sometime soon.

GDBStub - GDB (GNU Debugger) Remote Debug Stub for EPOC/MARM

(C) 1999,2000 Matt J. Gumbley


Where I was at.
The gdbstub.mmp project will build, but won't link - I need to build this 
as a static interface dll. In the meantime, I'm statically linking the
object (or rather, am trying to).

UIDs have been allocated: 0x10005EF1 will be used for the DLL

The STUBEX test program runs, but doesn't currently set up the exception
handlers. I need to investigate how this might be done - this might require
some EPOC knowledge that I currently don't have (in particular, setting vectors
in the exception handler table from user mode).

Test Programs
SERTEST tests the SERIAL class.
SERTEST2 tests the SERIAL class through the SERWRAP wrapper.
CLINK tests calling C++ from C, and C from C++.

Brief Guide
To enable remote debugging of one of your programs, you must link your code
with the static interface DLL, GDBSTUB.DLL. (.DLL, .LIB and .H files are
supplied for this). An example program is provided, called STUBEX.

The first line of your code should be a call to set_debug_traps().

Place calls to breakpoint() wherever you require breakpoints. You could of
course, do this immediately after set_debug_traps. gdb will then take over your
program as soon as it starts.

Build the GDBSTUB.MMP project.
makmake /makework gdbstub marm
makmake gdbstub marm
nmake gdbstub.marm

You could try a WINS build, but I don't think you'd get very far ;-)

The authors of gdb and ddd.
Ben Williamson for providing advice, the stub code, and patches.
Steve Longerbean, for writing the stub for StrongARM.
Symbian Ltd., for choosing to use the GNU toolchain.
ARM Ltd., for ARM technical information.

(C) Matt J. Gumbley 1998-2005 - All Tights Reversed