public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Hilfinger <Hilfinger@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Have block_innermost_frame start from selected frame
Date: Sat, 31 Dec 2011 08:58:00 -0000	[thread overview]
Message-ID: <8339c1td3u.fsf@gnu.org> (raw)
In-Reply-To: <20111230215222.86B713FEE8@kwai.gnat.com>

> From: Paul Hilfinger <Hilfinger@adacore.com>
> Date: Fri, 30 Dec 2011 16:52:22 -0500 (EST)
> 
> @@ -7304,12 +7304,13 @@ examine the variable @code{b} while your program is executing inside
>  the block where @code{b} is declared.
>  
>  @cindex variable name conflict
> -There is an exception: you can refer to a variable or function whose
> +You can refer to a variable or function whose
>  scope is a single source file even if the current execution point is not
>  in this file.  But it is possible to have more than one such variable or
>  function with the same name (in different source files).  If that
>  happens, referring to that name has unpredictable effects.  If you wish,
> -you can specify a static variable in a particular function or file,
> +you can specify a static variable in a particular function or file by
> +qualifying its name
>  using the colon-colon (@code{::}) notation:
>  
>  @cindex colon-colon, context for variables/functions

This hunk seems to be limited to changes in style, rather than
content.  Can you tell why you thought these style changes are needed,
in particular the first one?

Also, I have reservations about using the term "qualifying" for this
notation.  Since we already use "scope resolution" for them in the C++
context, why not use "scope resolution" for C and other languages as
well?

> +unqualified name of the variable.  However, you may also use this notation
> +to refer to local variables in frames enclosing the selected frame:

I'm not sure "enclosing frame" is clear enough.  I think we tend to
use "outer frame" elsewhere in the manual.  Alternatively, you could
use "enclosing scope".

> +@smallexample
> +(@value{GDBP}) p a
> +(@value{GDBP}) p bar::a
> +(@value{GDBP}) up 2
> +(@value{GDBP}) p a
> +(@value{GDBP}) p bar::a
> +
> +@end smallexample

Please remove the empty line before "@end smallexample".

Anyway, this begs the question: is the scope resolution available only
for print commands, or also in other commands, like `watch'?  If the
latter can also use this, then I think we should mention that, here
and where watchpoints are described.  If the `watch' command cannot
use this, then it sounds like we are inconsistent here.

Thanks.

  reply	other threads:[~2011-12-31  7:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-30 21:54 Paul Hilfinger
2011-12-31  8:58 ` Eli Zaretskii [this message]
2011-12-31 21:40   ` Paul Hilfinger
2012-01-09  7:17   ` Paul Hilfinger
2012-01-09 17:14     ` Eli Zaretskii
2012-01-09 19:59       ` Paul Hilfinger
2012-01-10  5:21     ` Joel Brobecker
2012-01-10 10:28       ` Eli Zaretskii
2012-01-10 10:40       ` Joel Brobecker
2012-01-11 10:59         ` [PATCH 1/3] Have block_innermost_frame start from selected frame and document Hilfinger
2012-01-11 15:54           ` [PATCH 2/3] Add testcase for locals identified with FUNCTION::VAR syntax Hilfinger
2012-01-11 10:59             ` [PATCH 3/3] Add test for use of "<block>::<variable>" syntax for locals in watch Hilfinger
  -- strict thread matches above, loose matches on Subject: below --
2011-12-27 19:59 [RFA] Have block_innermost_frame start from selected frame Paul Hilfinger
2011-12-28 13:10 ` Jan Kratochvil
2011-12-28 15:41   ` Joel Brobecker
2011-12-28 16:00     ` Jan Kratochvil
2011-12-28 17:23       ` Joel Brobecker
2011-12-29 20:30   ` Paul Hilfinger
2011-12-29 23:13     ` Jan Kratochvil
2011-12-28 15:16 ` Jan Kratochvil

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=8339c1td3u.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=Hilfinger@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).