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 2/3] Add Progspace.objfile_for_address
Date: Tue, 11 Jul 2023 18:51:26 +0300	[thread overview]
Message-ID: <83mt0278g1.fsf@gnu.org> (raw)
In-Reply-To: <20230711-dap-modules-v1-2-b4f6067c1b2e@adacore.com> (message from Tom Tromey via Gdb-patches on Tue, 11 Jul 2023 08:48:53 -0600)

> Date: Tue, 11 Jul 2023 08:48:53 -0600
> From: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>
> 
> This adds a new objfile_for_address method to gdb.Progspace.  This
> makes it easy to find the objfile for a given address.
> 
> There's a related PR; and while this change would have been sufficient
> for my original need, it's not clear to me whether I should close the
> bug.  Nevertheless I think it makes sense to at least mention it here.
> 
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=19288
> ---
>  gdb/NEWS                                  |  3 +++
>  gdb/doc/python.texi                       |  6 ++++++
>  gdb/progspace.c                           | 16 ++++++++++++++++
>  gdb/progspace.h                           |  4 ++++
>  gdb/python/py-progspace.c                 | 27 +++++++++++++++++++++++++++
>  gdb/testsuite/gdb.python/py-progspace.exp |  7 +++++++
>  6 files changed, 63 insertions(+)

Thanks.

> diff --git a/gdb/NEWS b/gdb/NEWS
> index b924834d3d7..a97b5fb9364 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -230,6 +230,9 @@ info main
>  
>    ** gdb.Value now has the 'assign' method.
>  
> +  ** gdb.Progspace now has the new method "objfile_for_address".  This
> +     returns the gdb.Objfile, if any, that covers a given address.
> +
>  *** Changes in GDB 13

This part is OK.

> diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
> index 9a342f34bf0..9bb907d1982 100644
> --- a/gdb/doc/python.texi
> +++ b/gdb/doc/python.texi
> @@ -5068,6 +5068,12 @@ Return the name of the shared library holding the given @var{address}
>  as a string, or @code{None}.
>  @end defun
>  
> +@findex Progspace.objfile_for_address
> +@defun Progspace.objfile_for_address (address)

Why did you need a @findex here?  AFAIR, @defun makes an index entry
automatically, so this will just create duplicate index entry.

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

  reply	other threads:[~2023-07-11 15:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-11 14:48 [PATCH 0/3] Implement the DAP "modules" request Tom Tromey
2023-07-11 14:48 ` [PATCH 1/3] Remove unused imports Tom Tromey
2023-07-11 14:48 ` [PATCH 2/3] Add Progspace.objfile_for_address Tom Tromey
2023-07-11 15:51   ` Eli Zaretskii [this message]
2023-07-21 15:48     ` Tom Tromey
2023-07-11 14:48 ` [PATCH 3/3] Implement DAP modules request Tom Tromey
2023-07-12 14:42 ` [PATCH 0/3] Implement the DAP "modules" request Alexandra Petlanova Hajkova
2023-07-21 18:05   ` 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=83mt0278g1.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).