This page was produced by an automated import process, and may have formatting errors; feel free to fix.

Native Debugging

GDB's configuration for native support is mostly controlled by:

Various shell variables are defined inside this file, and they are latter AC_SUBST'd in the Makefile. The updated list of shell variables supported inside gdb/configure.nat can always be found in the header of the file, but here is a non-comprehensive list of important variables:

NAT_FILE - The header file with definitions for the native target.

NATDEPFILES - Source files required for native debugging on the native target.

nat_makefile_frag - Name of the (optional) Makefile fragment file required to build the native target.  The fragment is incorporated into the Makefile that configure constructs from

The NAT_FILE variable usually has the form config/nm-xyz.h, where xyz is the target name. This header file contains C macro definitions describing the native system environment, such as child process control and core file support. nm.h is a link to this file, created by configure.

Contains any miscellaneous C code required for this native support of this machine. On some machines it doesn’t exist at all.

There are some “generic” versions of routines that can be used by various systems. These can be customized in various ways by macros defined in your nm-''xyz''.h file. If these routines work for the xyz host, you can just include the generic file’s name (with ‘.o’, not ‘.c’) in NATDEPFILES.

Otherwise, if your machine needs custom support routines, you will need to write routines that perform the same functions as the generic file. Put them into ''xyz''-nat.c, and put ''xyz''-nat.o into NATDEPFILES.

This contains the target_ops vector that supports Unix child processes on systems which use ptrace and wait to control the child.

This contains the target_ops vector that supports Unix child processes on systems which use /proc to control the child.

This does the low-level grunge that uses Unix system calls to do a “fork and exec” to start up a child process.

This is the low level interface to inferior processes for systems using the Unix ptrace call in a vanilla way.

None: Internals Native-Debugging (last edited 2017-05-30 18:34:32 by SergioDuriganJr)

All content (C) 2008 Free Software Foundation. For terms of use, redistribution, and modification, please see the WikiLicense page.