From: Matthew Malcomson <hardenedapple@gmail.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Add gdb.current_arch() function to python module -- equivalent of guile (current-arch)
Date: Thu, 09 Feb 2017 10:46:00 -0000 [thread overview]
Message-ID: <e3f040c0-70fe-5c32-cfff-e2e96b469bd1@gmail.com> (raw)
In-Reply-To: <CAH=s-PO-L6BKTybPVWjfF_8jmzoWu=HqnZVRn44SmmKhqZv8ng@mail.gmail.com>
FWIW I've nothing against your suggestion (other than it's sometimes a
pain to get one object just to get access to a method to obtain a
different object), but thought I should mention that "current" arch is
already part of an extension language interface.
https://sourceware.org/gdb/current/onlinedocs/gdb/Architectures-In-Guile.html
On 08/02/17 22:15, Yao Qi wrote:
> On Wed, Feb 8, 2017 at 5:46 PM, Matthew Malcomson
> <hardenedapple@gmail.com> wrote:
>> The problem is that without this patch I can't get an Architecture object
>> without first having a Frame object, and I can't get a Frame object without
>> starting my target program.
>>
>> Adding a gdb.current_arch() function is in order to get the Architecture
>> object I need without starting the target program.
>>
> IMO, "current" arch is unclear as an extension language interface. Yes, we
> do have function get_current_arch, but it is just a c function, we are free to
> change it in the future.
> It would be better to add function Inferior.architecture. I don't have much
> GDB python expertise, so I'd like to hear what other people think.
>
prev parent reply other threads:[~2017-02-09 10:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-06 17:02 Matthew Malcomson
2017-02-08 17:15 ` Yao Qi
2017-02-08 17:46 ` Matthew Malcomson
2017-02-08 22:15 ` Yao Qi
2017-02-09 10:46 ` Matthew Malcomson [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=e3f040c0-70fe-5c32-cfff-e2e96b469bd1@gmail.com \
--to=hardenedapple@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.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