Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFC/RFA] gdb.cp/classes.exp: Don't try to print local variable out of scope
Date: Tue, 09 Mar 2004 14:17:00 -0000	[thread overview]
Message-ID: <20040309141751.GA25558@nevyn.them.org> (raw)
Message-ID: <20040309141700.HBW5uOidN51jliUIrzDlH13xRBesmiPitMW3RQpZ9B0@z> (raw)
In-Reply-To: <20040309125959.GD25204@cygbert.vinschen.de>

On Tue, Mar 09, 2004 at 01:59:59PM +0100, Corinna Vinschen wrote:
> 	* gdb.cp/misc.cc (enums1): Add a line to extend scope of
> 	local variable obj_with_enum.
> 
> Index: gdb.cp/misc.cc
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/misc.cc,v
> retrieving revision 1.1
> diff -u -p -r1.1 misc.cc
> --- gdb.cp/misc.cc	23 Aug 2003 03:55:59 -0000	1.1
> +++ gdb.cp/misc.cc	8 Mar 2004 19:59:17 -0000
> @@ -433,6 +433,7 @@ void enums1 ()
>    obj_with_enum.x = 0;
>    enums2 ();
>    obj_with_enum.priv_enum = ClassWithEnum::green;
> +  obj_with_enum.priv_enum = ClassWithEnum::yellow;
>  }
>  
>  class ClassParam {
> 

Personally, I recommend using a different (new) variable; otherwise,
we'll be back here in a release when GCC decides to do a little bit
more dead code elimination at -O0.

Otherwise, I agree with your analysis and recommend this patch for
approval.  I've been thinking that it would be nice to have a way to
view recently out-of-scope variables, but I couldn't work out either
the mechanism or the interface, so...

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  parent reply	other threads:[~2004-03-09 14:17 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-19  0:09 Corinna Vinschen
2004-03-09 13:00 ` Corinna Vinschen
2004-03-19  0:09 ` Daniel Jacobowitz [this message]
2004-03-09 14:17   ` Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2004-03-19  0:09 Michael Elizabeth Chastain
2004-03-10  2:06 ` Michael Elizabeth Chastain
2004-03-19  0:09 Michael Elizabeth Chastain
2004-03-09 16:15 ` Michael Elizabeth Chastain
2004-03-19  0:09 ` Andrew Cagney
2004-03-09 20:38   ` Andrew Cagney
2004-03-09 21:27   ` Daniel Jacobowitz
2004-03-09 22:32     ` Andrew Cagney
2004-03-19  0:09       ` Daniel Jacobowitz
2004-03-10  0:56         ` Daniel Jacobowitz
2004-03-19  0:09         ` Andrew Cagney
2004-03-10  1:51           ` Andrew Cagney
2004-03-10  3:05           ` Daniel Jacobowitz
2004-03-19  0:09             ` Daniel Jacobowitz
2004-03-10  3:23               ` Daniel Jacobowitz
2004-03-10 22:21               ` Andrew Cagney
2004-03-10 22:29                 ` Daniel Jacobowitz
2004-03-15 18:47                   ` Andrew Cagney
2004-03-19  0:09                     ` Andrew Cagney
2004-03-19  0:09                   ` Daniel Jacobowitz
2004-03-19  0:09                 ` Andrew Cagney
2004-03-19  0:09             ` Daniel Jacobowitz
2004-03-19  0:09       ` Andrew Cagney
2004-03-19  0:09     ` Daniel Jacobowitz
2004-03-19  0:09 Michael Elizabeth Chastain
2004-03-10 23:58 ` Michael Elizabeth Chastain
2004-03-19  0:09 Michael Elizabeth Chastain
2004-03-09 15:27 ` Michael Elizabeth Chastain
2004-03-19  0:09 Michael Elizabeth Chastain
2004-03-09 15:11 ` Michael Elizabeth Chastain
2004-03-09 15:40 ` Corinna Vinschen
2004-03-19  0:09   ` Corinna Vinschen
2004-03-19  0:09 ` Daniel Jacobowitz
2004-03-09 15:20   ` 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=20040309141751.GA25558@nevyn.them.org \
    --to=drow@false.org \
    --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