Next: Register Information Functions, Previous: Raw and Cooked Registers, Up: Register Representation [Contents][Index]
These struct gdbarch
functions and variables specify the number
and type of registers in the architecture.
Read or write the program counter. The default value of both
functions is NULL
(no function available). If the program
counter is just an ordinary register, it can be specified in
struct gdbarch
instead (see pc_regnum
below) and it will
be read or written using the standard routines to access registers. This
function need only be specified if the program counter is not an
ordinary register.
Any register information can be obtained using the supplied register cache, regcache. See Register Caching.
These functions should be defined if there are any pseudo-registers.
The default value is NULL
. regnum is the number of the
register to read or write (which will be a cooked register
number) and buf is the buffer where the value read will be
placed, or from which the value to be written will be taken. The
value in the buffer may be converted to or from a signed or unsigned
integral value using one of the utility functions (see Using Different Register and Memory Data
Representations).
The access should be for the specified architecture, gdbarch. Any register information can be obtained using the supplied register cache, regcache. See Register Caching.
This specifies the register holding the stack pointer, which may be a raw or pseudo-register. It defaults to -1 (not defined), but it is an error for it not to be defined.
The value of the stack pointer register can be accessed withing GDB as the variable $sp.
This specifies the register holding the program counter, which may be a
raw or pseudo-register. It defaults to -1 (not defined). If
pc_regnum
is not defined, then the functions read_pc
and
write_pc
(see above) must be defined.
The value of the program counter (whether defined as a register, or
through read_pc
and write_pc
) can be accessed withing
GDB as the variable $pc.
This specifies the register holding the processor status (often called the status register), which may be a raw or pseudo-register. It defaults to -1 (not defined).
If defined, the value of this register can be accessed withing GDB as the variable $ps.
This specifies the first floating point register. It defaults to
0. fp0_regnum
is not needed unless the target offers support
for floating point.
Next: Register Information Functions, Previous: Raw and Cooked Registers, Up: Register Representation [Contents][Index]