2012-03-01 Pedro Alves <palves@redhat.com>
PR gdb/13767 gdb/ * frame.c (read_frame_register_unsigned): New. * frame.h (read_frame_register_unsigned): Declare. * i387-tdep.c (print_i387_status_word): New parameter `status_p'. Handle it. (print_i387_control_word): New parameter `control_p'. Handle it. (i387_print_float_info): Handle unavailable float registers. gdb/testsuite/ * gdb.trace/unavailable.exp (gdb_unavailable_floats): New. (gdb_collect_globals_test): Call it.
This commit is contained in:
parent
d3dc44a619
commit
ad5f7d6ef7
6 changed files with 192 additions and 59 deletions
20
gdb/frame.c
20
gdb/frame.c
|
@ -1031,6 +1031,26 @@ get_frame_register_unsigned (struct frame_info *frame, int regnum)
|
|||
return frame_unwind_register_unsigned (frame->next, regnum);
|
||||
}
|
||||
|
||||
int
|
||||
read_frame_register_unsigned (struct frame_info *frame, int regnum,
|
||||
ULONGEST *val)
|
||||
{
|
||||
struct value *regval = get_frame_register_value (frame, regnum);
|
||||
|
||||
if (!value_optimized_out (regval)
|
||||
&& value_entirely_available (regval))
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int size = register_size (gdbarch, VALUE_REGNUM (regval));
|
||||
|
||||
*val = extract_unsigned_integer (value_contents (regval), size, byte_order);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
put_frame_register (struct frame_info *frame, int regnum,
|
||||
const gdb_byte *buf)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue