Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Felix Lee <felix.1@canids.net>
Cc: gdb-patches@sources.redhat.com
Subject: Re: backtrace changes current source location
Date: Sat, 30 Oct 2004 00:02:00 -0000	[thread overview]
Message-ID: <4182D9AD.5010003@gnu.org> (raw)
In-Reply-To: <20041029220723.CCE45501085@stray.canids>

Thanks!

Felix Lee wrote:
> Andrew Cagney <cagney@gnu.org>:
> 
>>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


  reply	other threads:[~2004-10-30  0:02 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20041026075115.4A2C354AAB5@stray.canids>
     [not found] ` <20041026132924.GA26886@nevyn.them.org>
     [not found]   ` <drow@false.org>
2004-10-26 15:01     ` Felix Lee
2004-10-27 17:35       ` Andrew Cagney
2004-10-27 17:40         ` Daniel Jacobowitz
2004-10-28  0:52         ` Felix Lee
2004-10-29 15:22           ` Andrew Cagney
2004-10-29 15:36             ` Daniel Jacobowitz
2004-10-29 22:07             ` Felix Lee
2004-10-30  0:02               ` Andrew Cagney [this message]
2004-10-30  3:28                 ` Felix Lee
2004-11-01  4:38                   ` Felix Lee
2004-11-01 16:04                     ` Andrew Cagney
2004-11-01 16:13                     ` Daniel Jacobowitz
2004-11-05  8:51     ` Felix Lee
2006-10-04 20:43     ` [patch] Pushing Inferior Function Arguments onto Stack on PowerPC64 machines David Edelsohn
2006-10-04 20:52       ` Daniel Jacobowitz
2005-08-15 13:37 Procedure for large drop? Paul Hilfinger
2005-08-15 14:15 ` Daniel Jacobowitz
2005-08-15 21:50   ` Paul Hilfinger
2005-08-16  2:36     ` Jason Molenda
2005-08-20 22:15   ` Paul Hilfinger
2005-08-22 19:00     ` Daniel Jacobowitz
2006-10-04 19:00 [patch] Pushing Inferior Function Arguments onto Stack on PowerPC64 machines janani
2006-10-04 19:11 ` Daniel Jacobowitz
2006-10-04 19:14   ` Daniel Jacobowitz
2006-10-04 20:19   ` Mark Kettenis
2006-10-04 20:27     ` Andreas Schwab
     [not found]   ` <OFE88464A1.C58B072A-ON872571FD.006ABA69-862571FD.006C7CFB@us.ibm.com>
2006-10-04 20:26     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4182D9AD.5010003@gnu.org \
    --to=cagney@gnu.org \
    --cc=felix.1@canids.net \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox