From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17813 invoked by alias); 21 Apr 2004 00:20:59 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 17802 invoked from network); 21 Apr 2004 00:20:57 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 21 Apr 2004 00:20:57 -0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i3L0KuFe008283 for ; Tue, 20 Apr 2004 20:20:56 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i3L0Ksw12200; Tue, 20 Apr 2004 20:20:54 -0400 Received: from redhat.com (dhcp-172-16-25-160.sfbay.redhat.com [172.16.25.160]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i3L0KrC17367; Tue, 20 Apr 2004 17:20:53 -0700 Message-ID: <4085BE65.3000402@redhat.com> Date: Wed, 21 Apr 2004 00:20:00 -0000 From: Michael Snyder User-Agent: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.4.2) Gecko/20040301 MIME-Version: 1.0 To: cagney , gdb-patches@sources.redhat.com Subject: [RFA] Prevent runaway (infinite loop) in mips-tdep.c Content-Type: multipart/mixed; boundary="------------060109030000020308050001" X-RedHat-Spam-Score: 0 X-SW-Source: 2004-04/txt/msg00475.txt.bz2 This is a multi-part message in MIME format. --------------060109030000020308050001 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 141 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. --------------060109030000020308050001 Content-Type: text/plain; name="mips" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mips" Content-length: 1757 2004-04-21 Michael Snyder * 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) --------------060109030000020308050001--