Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Prevent runaway (infinite loop) in mips-tdep.c
@ 2004-04-21  0:20 Michael Snyder
  2004-04-21  0:53 ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Snyder @ 2004-04-21  0:20 UTC (permalink / raw)
  To: cagney, gdb-patches

[-- Attachment #1: Type: text/plain, Size: 141 bytes --]

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.


[-- Attachment #2: mips --]
[-- Type: text/plain, Size: 1757 bytes --]

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)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-04-22 21:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-21  0:20 [RFA] Prevent runaway (infinite loop) in mips-tdep.c Michael Snyder
2004-04-21  0:53 ` Daniel Jacobowitz
2004-04-21 17:58   ` Michael Snyder
2004-04-21 19:18     ` Daniel Jacobowitz
2004-04-21 19:23     ` Andrew Cagney
2004-04-22 21:11       ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox