[PATCH] Add gdb.current_arch() function to python module -- equivalent of guile (current-arch)
Matthew Malcomson
hardenedapple@gmail.com
Thu Feb 9 10:46:00 GMT 2017
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.
>
More information about the Gdb-patches
mailing list