diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 40d765184f..3cd85e78f8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,16 @@ +2003-01-08 Andrew Cagney + + * cris-tdep.c (cris_frame_init_saved_regs): Use + get_frame_saved_regs and SIZEOF_FRAME_SAVED_REGS when copying a + saved_regs buffer. + * sh-tdep.c (sh_nofp_frame_init_saved_regs): Ditto. + (sh64_nofp_frame_init_saved_regs): Ditto. + (sh_fp_frame_init_saved_regs): Ditto. + * arm-tdep.c: Use deprecated_set_frame_saved_regs_hack. + * mips-tdep.c (mips_init_extra_frame_info): Ditto. + * mcore-tdep.c (analyze_dummy_frame): Ditto. + * mn10300-tdep.c (analyze_dummy_frame): Ditto. + 2003-01-08 Daniel Jacobowitz * minsyms.c (lookup_minimal_symbol): Update comment. diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 5d8fbfc0ce..7ff473f2de 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -3029,10 +3029,12 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* 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 *) - xcalloc (1, (sizeof (CORE_ADDR) - * (gdbarch_num_regs (gdbarch) - + gdbarch_num_pseudo_regs (gdbarch)))); + { + CORE_ADDR *saved_regs = xcalloc (1, (sizeof (CORE_ADDR) + * (gdbarch_num_regs (gdbarch) + + gdbarch_num_pseudo_regs (gdbarch)))); + deprecated_set_frame_saved_regs_hack (prologue_cache, saved_regs); + } return gdbarch; } diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index 065ba3d2f4..3f274160e9 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -1174,7 +1174,7 @@ cris_frame_init_saved_regs (struct frame_info *fi) /* I don't see this ever happening, considering the context in which cris_frame_init_saved_regs is called (always when we're not in a dummy frame). */ - memcpy (&fi->saved_regs, dummy_regs, sizeof (fi->saved_regs)); + memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS); } else { diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c index 71acfd2bd8..134f9ddbdb 100644 --- a/gdb/mcore-tdep.c +++ b/gdb/mcore-tdep.c @@ -290,8 +290,10 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame) if (dummy == NULL) { struct frame_extra_info *extra_info; + CORE_ADDR *saved_regs; dummy = deprecated_frame_xmalloc (); - dummy->saved_regs = (CORE_ADDR *) xmalloc (SIZEOF_FRAME_SAVED_REGS); + saved_regs = (CORE_ADDR *) xmalloc (SIZEOF_FRAME_SAVED_REGS); + deprecated_set_frame_saved_regs_hack (dummy, saved_regs); extra_info = XMALLOC (struct frame_extra_info); deprecated_set_frame_extra_info_hack (dummy, extra_info); } diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index f6aecd8202..4615b3bdbf 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -2476,7 +2476,7 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci) frame_extra_info_zalloc (fci, sizeof (struct frame_extra_info)); - fci->saved_regs = NULL; + deprecated_set_frame_saved_regs_hack (fci, NULL); get_frame_extra_info (fci)->proc_desc = proc_desc == &temp_proc_desc ? 0 : proc_desc; if (proc_desc) diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index 1921e4bcac..e1f86176ca 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -154,8 +154,10 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame) if (dummy == NULL) { struct frame_extra_info *extra_info; + CORE_ADDR *saved_regs; dummy = deprecated_frame_xmalloc (); - dummy->saved_regs = xmalloc (SIZEOF_FRAME_SAVED_REGS); + saved_regs = xmalloc (SIZEOF_FRAME_SAVED_REGS); + deprecated_set_frame_saved_regs (dummy, saved_regs); extra_info = XMALLOC (struct frame_extra_info); deprecated_set_frame_extra_info_hack (dummy, extra_info); } diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index cb7059b668..08281badd0 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -1078,7 +1078,7 @@ sh_nofp_frame_init_saved_regs (struct frame_info *fi) /* DANGER! This is ONLY going to work if the char buffer format of the saved registers is byte-for-byte identical to the CORE_ADDR regs[NUM_REGS] format used by struct frame_saved_regs! */ - memcpy (fi->saved_regs, dummy_regs, sizeof (fi->saved_regs)); + memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS); return; } @@ -1418,7 +1418,7 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi) /* DANGER! This is ONLY going to work if the char buffer format of the saved registers is byte-for-byte identical to the CORE_ADDR regs[NUM_REGS] format used by struct frame_saved_regs! */ - memcpy (fi->saved_regs, dummy_regs, sizeof (fi->saved_regs)); + memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS); return; } @@ -1619,7 +1619,7 @@ sh_fp_frame_init_saved_regs (struct frame_info *fi) /* DANGER! This is ONLY going to work if the char buffer format of the saved registers is byte-for-byte identical to the CORE_ADDR regs[NUM_REGS] format used by struct frame_saved_regs! */ - memcpy (fi->saved_regs, dummy_regs, sizeof (fi->saved_regs)); + memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS); return; }