diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-03-21 16:42:39 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-03-21 16:42:39 +0000 |
commit | 64485362e8de1cf93e55c3498e2af97cbf520f4b (patch) | |
tree | 3c34c2e96a51e2761b25aeccddd0b7c374c6f32e /gdb/frame.h | |
parent | 9742079a314711c13d269e9e583b7b82dc42f1a6 (diff) | |
download | gdb-64485362e8de1cf93e55c3498e2af97cbf520f4b.zip gdb-64485362e8de1cf93e55c3498e2af97cbf520f4b.tar.gz gdb-64485362e8de1cf93e55c3498e2af97cbf520f4b.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/frame.h')
-rw-r--r-- | gdb/frame.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gdb/frame.h b/gdb/frame.h index 561ae27..5d98801 100644 --- a/gdb/frame.h +++ b/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 *); |