diff options
author | Kevin Buettner <kevinb@redhat.com> | 2000-10-05 01:13:53 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2000-10-05 01:13:53 +0000 |
commit | 077276e87bab27e860b7d16c0be1172e3a37c42c (patch) | |
tree | bbbd06881806aa8ee9b0ec9b63354f7074568be0 /gdb | |
parent | d1e28e240d3640e3093e88939090cf0ef5f5c35f (diff) | |
download | gdb-077276e87bab27e860b7d16c0be1172e3a37c42c.zip gdb-077276e87bab27e860b7d16c0be1172e3a37c42c.tar.gz gdb-077276e87bab27e860b7d16c0be1172e3a37c42c.tar.bz2 |
Add a limit parameter for scanning the prologue.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 19 |
2 files changed, 15 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2b23a15..963d4f4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2000-10-04 Kevin Buettner <kevinb@redhat.com> + + * rs6000-tdep.c (skip_prologue): Add new parameter lim_pc. + Update all callers. + 2000-10-03 Kevin Buettner <kevinb@redhat.com> * remote-bug.c (bug_xfer_memory, bug_insert_breakpoint, diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index ccb4299..fa06340 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -118,7 +118,8 @@ void (*rs6000_set_host_arch_hook) (int) = NULL; static CORE_ADDR branch_dest (int opcode, int instr, CORE_ADDR pc, CORE_ADDR safety); -static CORE_ADDR skip_prologue (CORE_ADDR, struct rs6000_framedata *); +static CORE_ADDR skip_prologue (CORE_ADDR, CORE_ADDR, + struct rs6000_framedata *); static void frame_get_saved_regs (struct frame_info * fi, struct rs6000_framedata * fdatap); static CORE_ADDR frame_initial_stack_address (struct frame_info *); @@ -135,7 +136,7 @@ static CORE_ADDR rs6000_skip_prologue (CORE_ADDR pc) { struct rs6000_framedata frame; - pc = skip_prologue (pc, &frame); + pc = skip_prologue (pc, 0, &frame); return pc; } @@ -381,7 +382,7 @@ rs6000_software_single_step (unsigned int signal, int insert_breakpoints_p) #define GET_SRC_REG(x) (((x) >> 21) & 0x1f) static CORE_ADDR -skip_prologue (CORE_ADDR pc, struct rs6000_framedata *fdata) +skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata) { CORE_ADDR orig_pc = pc; CORE_ADDR last_prologue_pc; @@ -403,7 +404,7 @@ skip_prologue (CORE_ADDR pc, struct rs6000_framedata *fdata) fdata->nosavedpc = 1; pc -= 4; - for (;;) + while (lim_pc == 0 || pc < lim_pc - 4) { pc += 4; @@ -700,7 +701,7 @@ rs6000_pop_frame (void) saved %pc value in the previous frame. */ addr = get_pc_function_start (frame->pc); - (void) skip_prologue (addr, &fdata); + (void) skip_prologue (addr, frame->pc, &fdata); wordsize = TDEP->wordsize; if (fdata.frameless) @@ -1106,7 +1107,7 @@ rs6000_frameless_function_invocation (struct frame_info *fi) return 0; } - (void) skip_prologue (func_start, &fdata); + (void) skip_prologue (func_start, fi->pc, &fdata); return fdata.frameless; } @@ -1132,7 +1133,7 @@ rs6000_frame_saved_pc (struct frame_info *fi) if (!func_start) return 0; - (void) skip_prologue (func_start, &fdata); + (void) skip_prologue (func_start, fi->pc, &fdata); if (fdata.lr_offset == 0 && fi->next != NULL) { @@ -1167,7 +1168,7 @@ frame_get_saved_regs (struct frame_info *fi, struct rs6000_framedata *fdatap) if (fdatap == NULL) { fdatap = &work_fdata; - (void) skip_prologue (get_pc_function_start (fi->pc), fdatap); + (void) skip_prologue (get_pc_function_start (fi->pc), fi->pc, fdatap); } frame_saved_regs_zalloc (fi); @@ -1243,7 +1244,7 @@ frame_initial_stack_address (struct frame_info *fi) /* find out if this function is using an alloca register.. */ - (void) skip_prologue (get_pc_function_start (fi->pc), &fdata); + (void) skip_prologue (get_pc_function_start (fi->pc), fi->pc, &fdata); /* if saved registers of this frame are not known yet, read and cache them. */ |