public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 10/11] Add global_context parameter to gdb.parse_and_eval
Date: Thu, 04 May 2023 17:54:07 +0300	[thread overview]
Message-ID: <834joskv00.fsf@gnu.org> (raw)
In-Reply-To: <20230504-frameless-v1-10-4191201740b0@adacore.com> (message from Tom Tromey via Gdb-patches on Thu, 04 May 2023 08:21:31 -0600)

> Date: Thu, 04 May 2023 08:21:31 -0600
> From: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>
> 
> This adds a 'global_context' parse_and_eval to gdb.parse_and_eval.
> This lets users request a parse that is done at "global scope".
> 
> I considered letting callers pass in a block instead, with None
> meaning "global" -- but then there didn't seem to be a clean way to
> express the default for this parameter.
> ---
>  gdb/NEWS                              |  4 ++++
>  gdb/doc/python.texi                   |  7 ++++++-
>  gdb/python/python.c                   | 28 ++++++++++++++++++++++------
>  gdb/testsuite/gdb.python/py-value.c   |  3 +++
>  gdb/testsuite/gdb.python/py-value.exp |  5 +++++
>  5 files changed, 40 insertions(+), 7 deletions(-)

Thanks.

> diff --git a/gdb/NEWS b/gdb/NEWS
> index e3c095de09e..4bf5603b550 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -162,6 +162,10 @@ info main
>       (program-counter) values, and can be used as the frame-id when
>       calling gdb.PendingFrame.create_unwind_info.
>  
> +  ** gdb.parse_and_eval now has a new "global_context" parameter.
> +     This can be used to request that the parse only examine global
> +     symbols.
> +

This part is OK.

> --- a/gdb/doc/python.texi
> +++ b/gdb/doc/python.texi
> @@ -419,11 +419,16 @@ using the @code{gdb.Value} constructor.
>  @end defun
>  
>  @findex gdb.parse_and_eval
> -@defun gdb.parse_and_eval (expression)
> +@defun gdb.parse_and_eval (expression, @r{[}, global_context@r{]})
                                        ^
That comma is redundant, right?

Reviewed-By: Eli Zaretskii <eliz@gnu.org>

  reply	other threads:[~2023-05-04 14:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-04 14:21 [PATCH 00/11] Fix frame-less expression evaluation in DAP Tom Tromey
2023-05-04 14:21 ` [PATCH 01/11] Avoid forward declaration in parse.c Tom Tromey
2023-05-04 14:21 ` [PATCH 02/11] Move innermost_block_tracker to expression.h Tom Tromey
2023-05-04 14:21 ` [PATCH 03/11] Introduce and use parser flags Tom Tromey
2023-05-04 14:21 ` [PATCH 04/11] Simplify parser_state constructor Tom Tromey
2023-05-04 14:21 ` [PATCH 05/11] Boolify parser_state::comma_terminates Tom Tromey
2023-05-04 14:21 ` [PATCH 06/11] Rearrange parser_state Tom Tromey
2023-05-04 14:21 ` [PATCH 07/11] Add PARSER_DEBUG flag Tom Tromey
2023-05-04 14:21 ` [PATCH 08/11] Add PARSER_LEAVE_BLOCK_ALONE flag Tom Tromey
2023-05-04 14:21 ` [PATCH 09/11] Add flags to parse_and_eval Tom Tromey
2023-05-04 14:21 ` [PATCH 10/11] Add global_context parameter to gdb.parse_and_eval Tom Tromey
2023-05-04 14:54   ` Eli Zaretskii [this message]
2023-05-23 20:17     ` Tom Tromey
2023-05-04 14:21 ` [PATCH 11/11] Handle DAP evaluate request without a frame ID Tom Tromey
2023-05-23 20:17 ` [PATCH 00/11] Fix frame-less expression evaluation in DAP Tom Tromey

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