diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2023-12-01 11:27:30 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-12-14 16:04:49 +0000 |
commit | 1f624181f8a1b47710b6eda3934f1a74b1821657 (patch) | |
tree | 466bfc7e6e9d4d956911b6bacc39f4b8ee7c1e60 /gdb/value.h | |
parent | 7f0f3b0f5659f21815ef87e1e9e120213a4f347b (diff) | |
download | fsf-binutils-gdb-1f624181f8a1b47710b6eda3934f1a74b1821657.zip fsf-binutils-gdb-1f624181f8a1b47710b6eda3934f1a74b1821657.tar.gz fsf-binutils-gdb-1f624181f8a1b47710b6eda3934f1a74b1821657.tar.bz2 |
gdb: add gdbarch_pseudo_register_write that takes a frame
Add a new variant of gdbarch_pseudo_register_write that takes a
frame_info in order to write raw registers. Use this new method when
available:
- in put_frame_register, when trying to write a pseudo register to a given frame
- in regcache::cooked_write
No implementation is migrated to use this new method (that will come in
subsequent patches), so no behavior change is expected here.
The objective is to fix writing pseudo registers to non-current
frames. See previous commit "gdb: read pseudo register through
frame" for a more detailed explanation.
Change-Id: Ie7fe364a15a4d86c2ecb09de2b4baa08c45555ac
Reviewed-By: John Baldwin <jhb@FreeBSD.org>
Diffstat (limited to 'gdb/value.h')
-rw-r--r-- | gdb/value.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/value.h b/gdb/value.h index 935d9eb..d7bda1e 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -1661,6 +1661,13 @@ private: value *pseudo_from_raw_part (frame_info_ptr next_frame, int pseudo_reg_num, int raw_reg_num, int raw_offset); +/* Write PSEUDO_BUF, the contents of a pseudo register, to part of raw register + RAW_REG_NUM starting at RAW_OFFSET. */ + +void pseudo_to_raw_part (frame_info_ptr next_frame, + gdb::array_view<const gdb_byte> pseudo_buf, + int raw_reg_num, int raw_offset); + /* Create a value for pseudo register PSEUDO_REG_NUM by concatenating raw registers RAW_REG_1_NUM and RAW_REG_2_NUM. @@ -1670,10 +1677,25 @@ value *pseudo_from_raw_part (frame_info_ptr next_frame, int pseudo_reg_num, value *pseudo_from_concat_raw (frame_info_ptr next_frame, int pseudo_reg_num, int raw_reg_1_num, int raw_reg_2_num); +/* Write PSEUDO_BUF, the contents of a pseudo register, to the two raw registers + RAW_REG_1_NUM and RAW_REG_2_NUM. */ + +void pseudo_to_concat_raw (frame_info_ptr next_frame, + gdb::array_view<const gdb_byte> pseudo_buf, + int raw_reg_1_num, int raw_reg_2_num); + /* Same as the above, but with three raw registers. */ value *pseudo_from_concat_raw (frame_info_ptr next_frame, int pseudo_reg_num, int raw_reg_1_num, int raw_reg_2_num, int raw_reg_3_num); +/* Write PSEUDO_BUF, the contents of a pseudo register, to the three raw + registers RAW_REG_1_NUM, RAW_REG_2_NUM and RAW_REG_3_NUM. */ + +void pseudo_to_concat_raw (frame_info_ptr next_frame, + gdb::array_view<const gdb_byte> pseudo_buf, + int raw_reg_1_num, int raw_reg_2_num, + int raw_reg_3_num); + #endif /* !defined (VALUE_H) */ |