From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17602 invoked by alias); 29 Oct 2004 22:07:28 -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 17482 invoked from network); 29 Oct 2004 22:07:27 -0000 Received: from unknown (HELO capitol.mail.pas.earthlink.net) (207.217.120.180) by sourceware.org with SMTP; 29 Oct 2004 22:07:27 -0000 Received: from ip216-26-76-19.dsl.du.teleport.com ([216.26.76.19] helo=stray.canids) by capitol.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 1CNeu4-00029z-00; Fri, 29 Oct 2004 15:07:24 -0700 Received: from stray.canids (localhost.localdomain [127.0.0.1]) by stray.canids (Postfix) with ESMTP id CCE45501085; Fri, 29 Oct 2004 15:07:23 -0700 (PDT) From: Felix Lee To: Andrew Cagney 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> In-Reply-To: <41825FD5.1030607@gnu.org> on Fri, 29 Oct 2004 11:20:53 EDT from Andrew Cagney Date: Fri, 29 Oct 2004 22:07:00 -0000 Message-Id: <20041029220723.CCE45501085@stray.canids> X-SW-Source: 2004-10/txt/msg00486.txt.bz2 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. 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. I'll submit a new patch with the changes you suggest. --