From 8dccd430c9de0e6cf747ae4bb1bf9d944fe3397c Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 18 Mar 2011 18:42:41 +0000 Subject: gdb/ * dwarf2loc.c (read_pieced_value): Handle get_frame_register_bytes returning that the register piece is unavailable/optimized out. (write_pieced_value): Handle get_frame_register_bytes returning that the register piece is unavailable/optimized out when doing a read-modify write of a bitfield. * findvar.c (value_from_register): Handle get_frame_register_bytes returning that the register piece is unavailable/optimized out. * frame.c (get_frame_register_bytes): New parameters `optimizedp' and `unavailablep'. Throw error on bad debug info. Use frame_register instead of frame_register_read, to fill in the new arguments. * frame.h (get_frame_register_bytes): New parameters `optimizedp' and `unavailablep'. * valops.c: (value_assign): Adjust, and handle get_frame_register_bytes failing. * spu-tdep.c: Include exceptions.h. (spu_software_single_step): Adjust, and handle get_frame_register_bytes failing. (spu_get_longjmp_target): Ditto. * gdbarch.sh (register_to_value): Change to return int. New parameters `optimizedp' and `unavailablep'. * gdbarch.h, gdbarch.c: Regenerate. * i386-tdep.c (i386_register_to_value): Adjust to new gdbarch_register_to_value interface. * i387-tdep.c (i387_register_to_value): Ditto. * i387-tdep.h (i387_register_to_value): Ditto. * alpha-tdep.c (alpha_register_to_value): Ditto. * ia64-tdep.c (ia64_register_to_value): Ditto. * m68k-tdep.c (m68k_register_to_value): Ditto. * mips-tdep.c (mips_register_to_value): Ditto. * rs6000-tdep.c (rs6000_register_to_value): Ditto. --- gdb/gdbarch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/gdbarch.h') diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 7284f76..50221d7 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -384,8 +384,8 @@ typedef int (gdbarch_convert_register_p_ftype) (struct gdbarch *gdbarch, int reg extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type); extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p); -typedef void (gdbarch_register_to_value_ftype) (struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf); -extern void gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf); +typedef int (gdbarch_register_to_value_ftype) (struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep); +extern int gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep); extern void set_gdbarch_register_to_value (struct gdbarch *gdbarch, gdbarch_register_to_value_ftype *register_to_value); typedef void (gdbarch_value_to_register_ftype) (struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf); -- cgit v1.1