Target Architecture Definition

GDB’s target architecture defines what sort of machine-language programs GDB can work with, and how it works with them.

The target architecture object is implemented as the C structure struct gdbarch *. The structure, and its methods, are generated using the Bourne shell script gdbarch.sh. Running the script will create new-gdbarch.c and new-gdbarch.h and report any differences from gdbarch.c and gdbarch.h. Having created the new files, use them to replace the existing files once you are happy they are correct.

Adding a new field/method to struct gdbarch * is done by registering it in the function_list function in the shell script, with a line containing colon separated values. Refer to the script for a description of each value. In particular, the function do_read is used to break up each input line into fields. The variable read defined immediately previously is the list of fields. The comments in do_read give some hint as the the meaning of each field.

None: Internals Target-Architecture-Definition (last edited 2016-05-23 14:39:55 by JeremyBennett)

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