From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6523 invoked by alias); 20 Apr 2002 23:08:16 -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 6508 invoked from network); 20 Apr 2002 23:08:15 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 20 Apr 2002 23:08:15 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 687593D1A; Sat, 20 Apr 2002 19:08:04 -0400 (EDT) Message-ID: <3CC1F4D3.9020104@cygnus.com> Date: Sat, 20 Apr 2002 16:08:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.9) Gecko/20020328 X-Accept-Language: en-us, en MIME-Version: 1.0 To: thorpej@wasabisystems.com Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH/RFA] Fix busted logic in find_saved_register() References: <20020420144817.W1627@dr-evil.shagadelic.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00690.txt.bz2 > find_saved_register() is used by mips_get_saved_register() and > the alpha_get_saved_register() in my (updated) multi-arch changes > for the Alpha target. > > While investigating some testsuite failures, it appeared that > there is no way thjat find_saved_register() could possibly work > on either MIPS or Alpha, since the first thing it does on either > of those platforms is dereference a NULL pointer (said pointer is > initlaized to NULL at the top of the function). > > I believe the following patch makes find_saved_register() actually > implement the logic it claims to. It certainly fixes the problem > I had with GDB dumping core, and fixes the relevant testsuite failures. > > OK to commit? > > * frame.c (find_saved_register): Avoid a NULL pointer > dereference and actually walk the frame list. Yes. Looks like my: 2002-04-17 Andrew Cagney * frame.c (find_saved_register): Find saved registers in the next not prev frame. Fix PR gdb/365. flushed out another problem. You mention that the alpha is calling that function. Is that directly or indirectly? I'm going to eliminate the MIPS direct call. Andrew