From: Matheus Branco Borella <dark.ryu.550@gmail.com>
To: tom@tromey.com
Cc: gdb-patches@sourceware.org, dark.ryu.550@gmail.com
Subject: Re: Re: [PATCH v2] Add support for symbol addition to the Python API
Date: Sat, 24 Feb 2024 14:35:21 -0300 [thread overview]
Message-ID: <20240224173520.29558-1-dark.ryu.550@gmail.com> (raw)
In-Reply-To: <875xz1eb3g.fsf@tromey.com>
Tom Tromey <tom@tromey.com> writes:
> I guess because nothing makes any blocks. However this seems like a
> kind of big issue to me, because it means that by-name lookups will
> appear to succeed ("function xyz is at address 0xaaaaa") but then
> stopping in that function won't show the name.
The big issue with properly supporting the PC-based lookups, and minsyms
in general, is that we don't actually have a properly set up BFD struct.
And, as far as I know, there's no way to actually create one without go-
ing through the trouble of generating an actual binary file in memory
and having the library read back from it.
So I did the best I could that wouldn't also have to involve potentially
fairly invasive changes to the rest of GDB.
Of course, I could be wrong and there might be a way to properly do what
I'm trying to do, but if there is one, I couldn't find it.
> gdb exposes a gdb.Architecture, maybe we could let the Python code
> specify this.
Yeah, that makes sense. I'll change it so that it uses gdb.Architecture.
> objfile_to_objfile_object returns a new reference so I think the incref
> is wrong here.
>
> We try to avoid explicit inc/dec-refs in gdb anyway.
Yes, I didn't realize the gdbpy_ref increased the refcount
automatically.
I don't have anything to add for the other points, so suffice to say
I'll fix everything you pointed out and submit a v3 as soon as I can.
Thanks for your time.
prev parent reply other threads:[~2024-02-24 17:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-27 1:24 [PATCH] " Matheus Branco Borella
2023-06-27 3:53 ` [PING] " Matheus Branco Borella
2023-07-04 15:14 ` Andrew Burgess
2023-07-07 23:13 ` Matheus Branco Borella
2024-01-13 1:36 ` [PATCH v2] " Matheus Branco Borella
2024-02-06 17:50 ` Tom Tromey
2024-02-24 17:35 ` Matheus Branco Borella [this message]
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=20240224173520.29558-1-dark.ryu.550@gmail.com \
--to=dark.ryu.550@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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).