aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch-gen.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbarch-gen.h')
-rw-r--r--gdb/gdbarch-gen.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/gdb/gdbarch-gen.h b/gdb/gdbarch-gen.h
index 7b34dce..80d4013 100644
--- a/gdb/gdbarch-gen.h
+++ b/gdb/gdbarch-gen.h
@@ -200,12 +200,25 @@ typedef struct value * (gdbarch_pseudo_register_read_value_ftype) (struct gdbarc
extern struct value * gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, frame_info_ptr next_frame, int cookednum);
extern void set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value);
+/* Write bytes in BUF to pseudo register with number PSEUDO_REG_NUM.
+
+ Raw registers backing the pseudo register should be written to using
+ NEXT_FRAME. */
+
+extern bool gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch);
+
+typedef void (gdbarch_pseudo_register_write_ftype) (struct gdbarch *gdbarch, frame_info_ptr next_frame, int pseudo_reg_num, gdb::array_view<const gdb_byte> buf);
+extern void gdbarch_pseudo_register_write (struct gdbarch *gdbarch, frame_info_ptr next_frame, int pseudo_reg_num, gdb::array_view<const gdb_byte> buf);
+extern void set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype *pseudo_register_write);
+
/* Write bytes to a pseudo register.
This is marked as deprecated because it gets passed a regcache for
implementations to write raw registers in. This doesn't work for unwound
frames, where the raw registers backing the pseudo registers may have been
- saved elsewhere. */
+ saved elsewhere.
+
+ Implementations should be migrated to implement pseudo_register_write instead. */
extern bool gdbarch_deprecated_pseudo_register_write_p (struct gdbarch *gdbarch);