This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

HAVE_I387_REGS


gdb 5.2.x introduced HAVE_I387_REGS in the configuration for
i386 targets.  I am applying these changes to a target which
does not dump FP registers to the core file, so this may be
the first test of this #define not being set.

For this non-FP target, "i registers" complains about registers
like $SP not being convertible to floating point.  From the
following defines, FP_REGNUM_P instead of giving a definitive
false when HAVE_I387_REGS is not defined, will just change the
range of numbers it says are floating point.  In particular it
makes regnos 0-7 look like floating point; those are my GPRs.



gdb/config/i386/tm-i386.h:

> /* First FPU data register.  */
> #ifdef HAVE_I387_REGS
> #define FP0_REGNUM 16
> #else
> #define FP0_REGNUM 0
> #endif


gdb/i386-tdep.h:

/* Return non-zero if N corresponds to a FPU data registers.  */
#define FP_REGNUM_P(n)  (FP0_REGNUM <= (n) && (n) < FPC_REGNUM)

/* "Generic" floating point control register.  */
#define FPC_REGNUM      (FP0_REGNUM + 8)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]