X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fframe.h;h=5d9880183a2d7f8a766805729e7e434a8c7b0ccc;hb=666547aa9ebfac79a2f7607e0621f6a55c8c6f30;hp=561ae278ab1cdfbc13d378b5eb0283ea7f3081a4;hpb=b6ba6518e9254bc25f88088228e93ac966ebccd1;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/frame.h b/gdb/frame.h index 561ae278ab..5d9880183a 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 *);