Use frame_unwind_register_value in frame_unwind_register_unsigned
gdb: 2017-04-05 Yao Qi <yao.qi@linaro.org> * frame.c (frame_unwind_register_unsigned): Call frame_unwind_register_value.
This commit is contained in:
parent
55a9897675
commit
2cad08ea7d
2 changed files with 25 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2017-04-05 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
|
* frame.c (frame_unwind_register_unsigned): Call
|
||||||
|
frame_unwind_register_value.
|
||||||
|
|
||||||
2017-04-05 Yao Qi <yao.qi@linaro.org>
|
2017-04-05 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
* gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
|
* gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
|
||||||
|
|
23
gdb/frame.c
23
gdb/frame.c
|
@ -1270,10 +1270,27 @@ frame_unwind_register_unsigned (struct frame_info *frame, int regnum)
|
||||||
struct gdbarch *gdbarch = frame_unwind_arch (frame);
|
struct gdbarch *gdbarch = frame_unwind_arch (frame);
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
int size = register_size (gdbarch, regnum);
|
int size = register_size (gdbarch, regnum);
|
||||||
gdb_byte buf[MAX_REGISTER_SIZE];
|
struct value *value = frame_unwind_register_value (frame, regnum);
|
||||||
|
|
||||||
frame_unwind_register (frame, regnum, buf);
|
gdb_assert (value != NULL);
|
||||||
return extract_unsigned_integer (buf, size, byte_order);
|
|
||||||
|
if (value_optimized_out (value))
|
||||||
|
{
|
||||||
|
throw_error (OPTIMIZED_OUT_ERROR,
|
||||||
|
_("Register %d was not saved"), regnum);
|
||||||
|
}
|
||||||
|
if (!value_entirely_available (value))
|
||||||
|
{
|
||||||
|
throw_error (NOT_AVAILABLE_ERROR,
|
||||||
|
_("Register %d is not available"), regnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
ULONGEST r = extract_unsigned_integer (value_contents_all (value), size,
|
||||||
|
byte_order);
|
||||||
|
|
||||||
|
release_value (value);
|
||||||
|
value_free (value);
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONGEST
|
ULONGEST
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue