This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add gdb.current_arch() function to python module -- equivalent of guile (current-arch)


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.

-- 
Yao (齐尧)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]