mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 10:35:12 +08:00
* frame.h (SIZEOF_FRAME_SAVED_REGS): Report an error if macro
already defined. From 2000-08-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>: * stabsread.c (define_symbol): A parameter ('R'), a local ('r'), or a reference ('a') can be in a pseudo register. * infcmd.c (do_registers_info): Must take into account the pseudo registers to print their value. (registers_info): Likewise. * stack.c (frame_info): Likewise. * frame.h (SIZEOF_FRAME_SAVED_REGS): Save the pseudo registers.
This commit is contained in:
parent
9742079a31
commit
64485362e8
@ -1,3 +1,17 @@
|
||||
2001-03-20 Andrew Cagney <ac131313@redhat.com>
|
||||
|
||||
* frame.h (SIZEOF_FRAME_SAVED_REGS): Report an error if macro
|
||||
already defined.
|
||||
|
||||
From 2000-08-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>:
|
||||
* stabsread.c (define_symbol): A parameter ('R'), a local ('r'),
|
||||
or a reference ('a') can be in a pseudo register.
|
||||
* infcmd.c (do_registers_info): Must take into account the pseudo
|
||||
registers to print their value.
|
||||
(registers_info): Likewise.
|
||||
* stack.c (frame_info): Likewise.
|
||||
* frame.h (SIZEOF_FRAME_SAVED_REGS): Save the pseudo registers.
|
||||
|
||||
2001-03-21 Eli Zaretskii <eliz@is.elta.co.il>
|
||||
|
||||
Unified support for hardware breakpoints and watchpoints on
|
||||
|
14
gdb/frame.h
14
gdb/frame.h
@ -81,7 +81,7 @@ struct frame_info
|
||||
address where the sp was saved. */
|
||||
/* Allocated by frame_saved_regs_zalloc () which is called /
|
||||
initialized by FRAME_INIT_SAVED_REGS(). */
|
||||
CORE_ADDR *saved_regs; /*NUM_REGS */
|
||||
CORE_ADDR *saved_regs; /*NUM_REGS + NUM_PSEUDO_REGS*/
|
||||
|
||||
#ifdef EXTRA_FRAME_INFO
|
||||
/* XXXX - deprecated */
|
||||
@ -114,11 +114,17 @@ enum print_what
|
||||
LOC_AND_ADDRESS
|
||||
};
|
||||
|
||||
/* Allocate additional space for appendices to a struct frame_info. */
|
||||
/* Allocate additional space for appendices to a struct frame_info.
|
||||
NOTE: Much of GDB's code works on the assumption that the allocated
|
||||
saved_regs[] array is the size specified below. If you try to make
|
||||
that array smaller, GDB will happily walk off its end. */
|
||||
|
||||
#ifndef SIZEOF_FRAME_SAVED_REGS
|
||||
#define SIZEOF_FRAME_SAVED_REGS (sizeof (CORE_ADDR) * (NUM_REGS))
|
||||
#ifdef SIZEOF_FRAME_SAVED_REGS
|
||||
#error "SIZEOF_FRAME_SAVED_REGS can not be re-defined"
|
||||
#endif
|
||||
#define SIZEOF_FRAME_SAVED_REGS \
|
||||
(sizeof (CORE_ADDR) * (NUM_REGS+NUM_PSEUDO_REGS))
|
||||
|
||||
extern void *frame_obstack_alloc (unsigned long size);
|
||||
extern void frame_saved_regs_zalloc (struct frame_info *);
|
||||
|
||||
|
@ -1467,7 +1467,7 @@ void
|
||||
do_registers_info (int regnum, int fpregs)
|
||||
{
|
||||
register int i;
|
||||
int numregs = NUM_REGS;
|
||||
int numregs = NUM_REGS + NUM_PSEUDO_REGS;
|
||||
|
||||
for (i = 0; i < numregs; i++)
|
||||
{
|
||||
@ -1591,7 +1591,7 @@ registers_info (char *addr_exp, int fpregs)
|
||||
end = addr_exp;
|
||||
while (*end != '\0' && *end != ' ' && *end != '\t')
|
||||
++end;
|
||||
numregs = NUM_REGS;
|
||||
numregs = NUM_REGS + NUM_PSEUDO_REGS;
|
||||
|
||||
regnum = target_map_name_to_register (addr_exp, end - addr_exp);
|
||||
if (regnum >= 0)
|
||||
|
@ -1802,9 +1802,10 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
|
||||
SYMBOL_TYPE (sym) = read_type (&p, objfile);
|
||||
SYMBOL_CLASS (sym) = LOC_REGPARM;
|
||||
SYMBOL_VALUE (sym) = STAB_REG_TO_REGNUM (valu);
|
||||
if (SYMBOL_VALUE (sym) >= NUM_REGS)
|
||||
if (SYMBOL_VALUE (sym) >= NUM_REGS + NUM_PSEUDO_REGS)
|
||||
{
|
||||
complain (®_value_complaint, SYMBOL_VALUE (sym), NUM_REGS,
|
||||
complain (®_value_complaint, SYMBOL_VALUE (sym),
|
||||
NUM_REGS + NUM_PSEUDO_REGS,
|
||||
SYMBOL_SOURCE_NAME (sym));
|
||||
SYMBOL_VALUE (sym) = SP_REGNUM; /* Known safe, though useless */
|
||||
}
|
||||
@ -1817,9 +1818,10 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
|
||||
SYMBOL_TYPE (sym) = read_type (&p, objfile);
|
||||
SYMBOL_CLASS (sym) = LOC_REGISTER;
|
||||
SYMBOL_VALUE (sym) = STAB_REG_TO_REGNUM (valu);
|
||||
if (SYMBOL_VALUE (sym) >= NUM_REGS)
|
||||
if (SYMBOL_VALUE (sym) >= NUM_REGS + NUM_PSEUDO_REGS)
|
||||
{
|
||||
complain (®_value_complaint, SYMBOL_VALUE (sym), NUM_REGS,
|
||||
complain (®_value_complaint, SYMBOL_VALUE (sym),
|
||||
NUM_REGS + NUM_PSEUDO_REGS,
|
||||
SYMBOL_SOURCE_NAME (sym));
|
||||
SYMBOL_VALUE (sym) = SP_REGNUM; /* Known safe, though useless */
|
||||
}
|
||||
@ -2066,9 +2068,10 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
|
||||
SYMBOL_TYPE (sym) = read_type (&p, objfile);
|
||||
SYMBOL_CLASS (sym) = LOC_REGPARM_ADDR;
|
||||
SYMBOL_VALUE (sym) = STAB_REG_TO_REGNUM (valu);
|
||||
if (SYMBOL_VALUE (sym) >= NUM_REGS)
|
||||
if (SYMBOL_VALUE (sym) >= NUM_REGS + NUM_PSEUDO_REGS)
|
||||
{
|
||||
complain (®_value_complaint, SYMBOL_VALUE (sym), NUM_REGS,
|
||||
complain (®_value_complaint, SYMBOL_VALUE (sym),
|
||||
NUM_REGS + NUM_PSEUDO_REGS,
|
||||
SYMBOL_SOURCE_NAME (sym));
|
||||
SYMBOL_VALUE (sym) = SP_REGNUM; /* Known safe, though useless */
|
||||
}
|
||||
|
@ -1001,7 +1001,7 @@ frame_info (char *addr_exp, int from_tty)
|
||||
print_address_numeric (fi->saved_regs[SP_REGNUM], 1, gdb_stdout);
|
||||
printf_filtered ("\n");
|
||||
count = 0;
|
||||
numregs = NUM_REGS;
|
||||
numregs = NUM_REGS + NUM_PSEUDO_REGS;
|
||||
for (i = 0; i < numregs; i++)
|
||||
if (fi->saved_regs[i] && i != SP_REGNUM)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user