From: Kevin Buettner Date: Wed, 30 Jul 2003 20:44:46 +0000 (+0000) Subject: * mn10300-tdep.c (analyze_dummy_frame): Pass ``pc'' so that X-Git-Tag: ezannoni_pie-20030916-branchpoint~560 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f0d8db192735d4610f8a1bd3db8b67bf4b13f906;p=platform%2Fupstream%2Fbinutils.git * mn10300-tdep.c (analyze_dummy_frame): Pass ``pc'' so that the prologue analyzer won't need to attempt to extract the pc value from the woefully incomplete dummy frame. (mn10300_analyze_prologue): Avoid calls to get_frame_pc() when possible. Disable code which modifies the frame. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9829857..93baf91 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2003-07-30 Kevin Buettner + + * mn10300-tdep.c (analyze_dummy_frame): Pass ``pc'' so that + the prologue analyzer won't need to attempt to extract the pc + value from the woefully incomplete dummy frame. + (mn10300_analyze_prologue): Avoid calls to get_frame_pc() when + possible. Disable code which modifies the frame. + 2003-07-28 Andrew Cagney * annotate.c (annotate_breakpoints_headers): Restrict annotation diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index 3519495..7e84eb9 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -169,7 +169,7 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame) get_frame_extra_info (dummy)->status = 0; get_frame_extra_info (dummy)->stack_size = 0; memset (get_frame_saved_regs (dummy), '\000', SIZEOF_FRAME_SAVED_REGS); - mn10300_analyze_prologue (dummy, 0); + mn10300_analyze_prologue (dummy, pc); return dummy; } @@ -401,8 +401,13 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc) char *name; /* Use the PC in the frame if it's provided to look up the - start of this function. */ - pc = (fi ? get_frame_pc (fi) : pc); + start of this function. + + Note: kevinb/2003-07-16: We used to do the following here: + pc = (fi ? get_frame_pc (fi) : pc); + But this is (now) badly broken when called from analyze_dummy_frame(). + */ + pc = (pc ? pc : get_frame_pc (fi)); /* Find the start of this function. */ status = find_pc_partial_function (pc, &name, &func_addr, &func_end); @@ -432,6 +437,9 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc) if (status != 0) return pc; +#if 0 + /* Note: kevinb/2003-07-16: We shouldn't be making these sorts of + changes to the frame in prologue examination code. */ /* If we're physically on an "rets" instruction, then our frame has already been deallocated. Note this can also be true for retf and ret if they specify a size of zero. @@ -452,9 +460,10 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc) deprecated_update_frame_base_hack (fi, read_sp ()); return get_frame_pc (fi); } +#endif /* Figure out where to stop scanning. */ - stop = fi ? get_frame_pc (fi) : func_end; + stop = fi ? pc : func_end; /* Don't walk off the end of the function. */ stop = stop > func_end ? func_end : stop;