diff options
Diffstat (limited to 'gdb/python/py-unwind.c')
-rw-r--r-- | gdb/python/py-unwind.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c index 52184bd..65c705f 100644 --- a/gdb/python/py-unwind.c +++ b/gdb/python/py-unwind.c @@ -407,7 +407,12 @@ pending_framepy_read_register (PyObject *self, PyObject *args) TRY { - val = get_frame_register_value (pending_frame->frame_info, regnum); + /* Fetch the value associated with a register, whether it's + a real register or a so called "user" register, like "pc", + which maps to a real register. In the past, + get_frame_register_value() was used here, which did not + handle the user register case. */ + val = value_of_register (regnum, pending_frame->frame_info); if (val == NULL) PyErr_Format (PyExc_ValueError, "Cannot read register %d from frame.", |