From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20429 invoked by alias); 30 Oct 2004 00:02:46 -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 20328 invoked from network); 30 Oct 2004 00:02:32 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 30 Oct 2004 00:02:32 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9U02WZ2030366 for ; Fri, 29 Oct 2004 20:02:32 -0400 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9U02Qr01722; Fri, 29 Oct 2004 20:02:26 -0400 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id B3DBC129D8B; Fri, 29 Oct 2004 20:00:48 -0400 (EDT) Message-ID: <4182D9AD.5010003@gnu.org> Date: Sat, 30 Oct 2004 00:02:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) MIME-Version: 1.0 To: Felix Lee Cc: gdb-patches@sources.redhat.com Subject: Re: backtrace changes current source location References: <20041026075115.4A2C354AAB5@stray.canids> <20041026132924.GA26886@nevyn.them.org> <20041026150127.6ED3E54AAB5@stray.canids> <417FDC11.7060700@gnu.org> <20041028005157.259D34E8F0A@stray.canids> <41825FD5.1030607@gnu.org> <20041029220723.CCE45501085@stray.canids> In-Reply-To: <20041029220723.CCE45501085@stray.canids> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg00487.txt.bz2 Thanks! Felix Lee wrote: > Andrew Cagney : > >>Can you find out why selected sal is being corrupted, code shouldn't be >>modifying it. > > > this is happening in stack.c:print_frame_info(). any time > information about a frame is printed, sal is set to that frame's > location. the motivation for that change was an MI issue where > sal didn't get set when it should be. > > it seems reasonable to me to always set sal when a frame gets > printed, but this is inconvenient in the case of backtraces. > backtraces seem like an exception, rather than a flaw in the > general strategy, which is why I chose to save/restore sal in > backtrace. Should: (gdb) info frame 5 change things to frame 5's sal? > my feeling is that sal is a user convenience for reducing typing, > and programs talking to gdb should not depend on it being > predictable, since it's easy for a program to specify precisely > what source location they're interested in. but I don't feel > strongly about that. Right. MI and/or CLI should locally determine current-sal, and pass it down to print_frame_info. > I'll submit a new patch with the changes > you suggest. I'm actually not yet suggesting anything yet :-). I'm just trying to understand why two ends of GDB end up fighting over what the value of current-sal should be :-( Lets get the testcase in. Andrew