diff --git a/gdb/ChangeLog b/gdb/ChangeLog index caad792d62f..5b53dad52d3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-11-16 Kevin Buettner + + * python/py-unwind.c (pending_framepy_read_register): Use + value_of_register() instead of get_frame_register_value(). + 2016-11-16 Kevin Buettner * value.h (VALUE_FRAME_ID): Rename to VALUE_NEXT_FRAME_ID. Update diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c index 52184bd4e0d..65c705f04ca 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.",