This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/4] Make gdb.PendingFrame.read_register handle "user" registers
- From: Pedro Alves <palves at redhat dot com>
- To: Kevin Buettner <kevin at buettner dot to>, gdb-patches at sourceware dot org
- Date: Wed, 12 Oct 2016 14:08:39 +0100
- Subject: Re: [PATCH 3/4] Make gdb.PendingFrame.read_register handle "user" registers
- Authentication-results: sourceware.org; auth=none
- References: <20160928014455.438266a2@pinnacle.lan> <20160928015602.600071c6@pinnacle.lan>
On 09/28/2016 09:56 AM, Kevin Buettner wrote:
> Make gdb.PendingFrame.read_register handle "user" registers.
>
> The C function, pending_framepy_read_register(), which implements
> the python interface gdb.PendingFrame.read_register does not handle
> the so called "user" registers like "pc". An assertion error is
> triggered due to the user registers having numbers larger than or
> equal to gdbarch_num_regs(gdbarch).
>
> With the VALUE_FRAME_ID tweak in place, the call to
> get_frame_register_value() can simply be replaced by a call to
> value_of_register(), which handles both real registers as well as the
> user registers.
>
> gdb/ChangeLog:
>
> * python/py-unwind.c (pending_framepy_read_register): Use
> value_of_register() instead of get_frame_register_value().
OK.
Thanks,
Pedro Alves