GDB support for XFree86® modules

Patches to add support to GDB for XFree86 modules were originally developed by Paul Flinders in 1998 during the development phase of XFree86 4.0. These patches were for gdb 4.17 on Linux. Paul has since updated them a couple of times, and his latest patches are for gdb 5.1, and can be found at his web site. Michal Ludvig updated these patches to gdb 6.0.

I have used both of these patches to produce a set up updated patches for gdb versions 5.3, 6.0, and 6.4. I have added support for building and using them on some other ELF platforms, such as Solaris/x86, NetBSD 3.0 and FreeBSD. I have also fixed some memory allocation bugs in the gdb 6.0 support, a bug that prevented auto-reading of module symbols, and one or two build problems that showed up on some platforms. The patch for gdb 6.4 also fixes some issues with the XFree86 module support that showed up in conjunction with the 64-bit target support for Solaris/x86.

I find that gdb 5.3 works better than 6.0 and 6.4 in general on all of the above platforms. It does a much better job of handling the stack traces and frame data. This appears to be unrelated to the XFree86 module support.

The source patches are as follows:

These patches are relative to the GDB source releases available from the GDB ftp site. Apply them at the top level source directory with:

patch -p1 < patchfile

If you have any problems or comments regarding the patches, you can reach me at

[About Me]

XFree86 is a registered trademark of The XFree86 Project, Inc.

Linux is a registered trademark of Linus Torvalds.

FreeBSD is a registered trademark of The FreeBSD Foundation.

NetBSD is a registered trademark of The NetBSD Foundation.

Solaris is a trademark of Sun Microsystems, Inc.

Last modified: 23 January 2006