From: Andrew Cagney Date: Sun, 5 Jan 2003 13:31:26 +0000 (+0000) Subject: 2003-01-05 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=15a5b3eeaf29a0d6e55274892b5d153386d266d4;p=binutils-gdb.git 2003-01-05 Andrew Cagney * arm-tdep.c (prologue_cache): Change to a pointer. (_initialize_arm_tdep): Allocate prologue_cache. (check_prologue_cache): Update. (save_prologue_cache): Update. (arm_gdbarch_init): Update. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0cdae238669..703f654c08e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2003-01-05 Andrew Cagney + + * arm-tdep.c (prologue_cache): Change to a pointer. + (_initialize_arm_tdep): Allocate prologue_cache. + (check_prologue_cache): Update. + (save_prologue_cache): Update. + (arm_gdbarch_init): Update. + 2003-01-04 Daniel Jacobowitz * stabsread.c (update_method_name_from_physname): Call complaint() diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index e988db41fc5..dba7dad583d 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -658,20 +658,20 @@ thumb_scan_prologue (struct frame_info *fi) in a row (once to get the frame chain, and once to fill in the extra frame information). */ -static struct frame_info prologue_cache; +static struct frame_info *prologue_cache; static int check_prologue_cache (struct frame_info *fi) { int i; - if (get_frame_pc (fi) == get_frame_pc (&prologue_cache)) + if (get_frame_pc (fi) == get_frame_pc (prologue_cache)) { - fi->extra_info->framereg = prologue_cache.extra_info->framereg; - fi->extra_info->framesize = prologue_cache.extra_info->framesize; - fi->extra_info->frameoffset = prologue_cache.extra_info->frameoffset; + fi->extra_info->framereg = prologue_cache->extra_info->framereg; + fi->extra_info->framesize = prologue_cache->extra_info->framesize; + fi->extra_info->frameoffset = prologue_cache->extra_info->frameoffset; for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++) - get_frame_saved_regs (fi)[i] = get_frame_saved_regs (&prologue_cache)[i]; + get_frame_saved_regs (fi)[i] = get_frame_saved_regs (prologue_cache)[i]; return 1; } else @@ -686,13 +686,13 @@ save_prologue_cache (struct frame_info *fi) { int i; - deprecated_update_frame_pc_hack (&prologue_cache, get_frame_pc (fi)); - prologue_cache.extra_info->framereg = fi->extra_info->framereg; - prologue_cache.extra_info->framesize = fi->extra_info->framesize; - prologue_cache.extra_info->frameoffset = fi->extra_info->frameoffset; + deprecated_update_frame_pc_hack (prologue_cache, get_frame_pc (fi)); + prologue_cache->extra_info->framereg = fi->extra_info->framereg; + prologue_cache->extra_info->framesize = fi->extra_info->framesize; + prologue_cache->extra_info->frameoffset = fi->extra_info->frameoffset; for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++) - get_frame_saved_regs (&prologue_cache)[i] = get_frame_saved_regs (fi)[i]; + get_frame_saved_regs (prologue_cache)[i] = get_frame_saved_regs (fi)[i]; } @@ -3024,13 +3024,13 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* We can't use SIZEOF_FRAME_SAVED_REGS here, since that still references the old architecture vector, not the one we are building here. */ - if (get_frame_saved_regs (&prologue_cache) != NULL) - xfree (get_frame_saved_regs (&prologue_cache)); + if (get_frame_saved_regs (prologue_cache) != NULL) + xfree (get_frame_saved_regs (prologue_cache)); /* We can't use NUM_REGS nor NUM_PSEUDO_REGS here, since that still references the old architecture vector, not the one we are building here. */ - prologue_cache.saved_regs = (CORE_ADDR *) + prologue_cache->saved_regs = (CORE_ADDR *) xcalloc (1, (sizeof (CORE_ADDR) * (gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch)))); @@ -3158,10 +3158,9 @@ The valid values are:\n"); add_com ("othernames", class_obscure, arm_othernames, "Switch to the next set of register names."); - /* Fill in the prologue_cache fields. */ - prologue_cache.saved_regs = NULL; - prologue_cache.extra_info = (struct frame_extra_info *) - xcalloc (1, sizeof (struct frame_extra_info)); + /* Allocate the prologue_cache. */ + prologue_cache = deprecated_frame_xmalloc (); + deprecated_set_frame_extra_info_hack (prologue_cache, xcalloc (1, sizeof (struct frame_extra_info))); /* Debugging flag. */ add_show_from_set (add_set_cmd ("arm", class_maintenance, var_zinteger,