From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] gdb/python: Reuse gdb.RegisterGroup objects where possible
Date: Mon, 13 Jul 2020 12:23:27 -0600 [thread overview]
Message-ID: <87wo376zq8.fsf@tromey.com> (raw)
In-Reply-To: <14e217dbd8200e3b07baf255e754bea738093d64.1594197735.git.andrew.burgess@embecosm.com> (Andrew Burgess's message of "Wed, 8 Jul 2020 09:48:12 +0100")
>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:
Andrew> gdb/ChangeLog:
Andrew> * python/py-registers.c : Add 'unordered_map' include.
Andrew> (gdbpy_new_reggroup): Renamed to...
Andrew> (gdbpy_get_reggroup): ...this. Update to only create register
Andrew> group descriptors when needed.
Andrew> (gdbpy_reggroup_iter_next): Update.
The idea looks good to me.
Andrew> + /* Map from GDB's internal reggroup objects to the Python representation.
Andrew> + GDB's reggroups are global, and are never deleted, so using a map like
Andrew> + this is safe. */
Andrew> + static std::unordered_map<struct reggroup *,const reggroup_object *>
Andrew> + gdbpy_reggroup_object_map;
The same comment about "const", etc, applies here as in the previous
patch.
Tom
next prev parent reply other threads:[~2020-07-13 18:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-08 8:48 [PATCH 0/2] Improvements to Python Register Descriptor API Andrew Burgess
2020-07-08 8:48 ` [PATCH 1/2] gdb/python: Reuse gdb.RegisterDescriptor objects where possible Andrew Burgess
2020-07-13 18:21 ` Tom Tromey
2020-07-08 8:48 ` [PATCH 2/2] gdb/python: Reuse gdb.RegisterGroup " Andrew Burgess
2020-07-13 18:23 ` Tom Tromey [this message]
2020-07-14 17:14 ` [PATCHv2 0/2] Improvements to Python Register Descriptor API Andrew Burgess
2020-07-14 17:14 ` [PATCHv2 1/2] gdb/python: Reuse gdb.RegisterDescriptor objects where possible Andrew Burgess
2020-07-22 13:10 ` Pedro Alves
2020-07-22 14:05 ` Andrew Burgess
2020-07-22 14:32 ` Pedro Alves
2020-07-22 15:10 ` Andrew Burgess
2020-07-14 17:14 ` [PATCHv2 2/2] gdb/python: Reuse gdb.RegisterGroup " Andrew Burgess
2020-07-21 18:26 ` [PATCHv2 0/2] Improvements to Python Register Descriptor API 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=87wo376zq8.fsf@tromey.com \
--to=tom@tromey.com \
--cc=andrew.burgess@embecosm.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).