From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8615 invoked by alias); 26 Jul 2003 02:10:43 -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 8606 invoked from network); 26 Jul 2003 02:10:41 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.166.107) by sources.redhat.com with SMTP; 26 Jul 2003 02:10:41 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id A3DAA2B7F; Fri, 25 Jul 2003 22:10:40 -0400 (EDT) Message-ID: <3F21E320.4090007@redhat.com> Date: Sat, 26 Jul 2003 02:10:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com, amichelotti@ipitec.it, Michael Snyder Subject: Re: patch for info threads problem with target arm-elf (PR 1199). References: <3F200D12.6000103@ipitec.it> <3F21CAA4.30400@redhat.com> <20030726002921.GA5573@nevyn.them.org> <3F21D8BE.8050401@redhat.com> <20030726014845.GA18738@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-07/txt/msg00460.txt.bz2 > - /* Avoid coredumps which would happen if we tried to access a NULL > - deprecated_selected_frame. */ > - if (!target_has_stack) > - error ("No stack."); > + /* Check that there really is a frame. This happens when a simulator > + is connected but not loaded or running, for instance. */ > + if (saved_frame_level < 0) > + error ("No frame."); This would only happen to old architectures (legacy_get_prev_frame). With new architectures (get_prev_frame), frame creation is so lazy that an inner most frame is (hopefully?) always created. Can you make this check conditional on legacy_frame_p? Andrew