This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] Prevent runaway (infinite loop) in mips-tdep.c
- From: Michael Snyder <msnyder at redhat dot com>
- To: cagney <cagney at redhat dot com>, gdb-patches at sources dot redhat dot com
- Date: Wed, 21 Apr 2004 00:20:53 +0000
- Subject: [RFA] Prevent runaway (infinite loop) in mips-tdep.c
Hi Andrew,
This change will prevent the caller(s) of mips_mdebug_frame_id from
infinite-looping when we get badly lost on the stack frame.
2004-04-21 Michael Snyder <msnyder@redhat.com>
* mips-tdep.c (mips_mdebug_frame_cache): Call error to prevent
infinite looping by caller.
(heuristic_proc_start): Warning() already prefixes "Warning: ".
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.287
diff -p -r1.287 mips-tdep.c
*** mips-tdep.c 29 Mar 2004 17:58:05 -0000 1.287
--- mips-tdep.c 21 Apr 2004 00:15:54 -0000
*************** mips_mdebug_frame_cache (struct frame_in
*** 1508,1514 ****
/* I'm not sure how/whether this can happen. Normally when we
can't find a proc_desc, we "synthesize" one using
heuristic_proc_desc and set the saved_regs right away. */
! return cache;
/* Extract the frame's base. */
cache->base = (frame_unwind_register_signed (next_frame, NUM_REGS + PROC_FRAME_REG (proc_desc))
--- 1508,1514 ----
/* I'm not sure how/whether this can happen. Normally when we
can't find a proc_desc, we "synthesize" one using
heuristic_proc_desc and set the saved_regs right away. */
! error ("Can't find frame info.");
/* Extract the frame's base. */
cache->base = (frame_unwind_register_signed (next_frame, NUM_REGS + PROC_FRAME_REG (proc_desc))
*************** heuristic_proc_start (CORE_ADDR pc)
*** 1887,1893 ****
static int blurb_printed = 0;
warning
! ("Warning: GDB can't find the start of the function at 0x%s.",
paddr_nz (pc));
if (!blurb_printed)
--- 1887,1893 ----
static int blurb_printed = 0;
warning
! ("GDB can't find the start of the function at 0x%s.",
paddr_nz (pc));
if (!blurb_printed)