diff options
author | Tom Tromey <tromey@adacore.com> | 2020-04-08 14:33:35 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2020-04-08 14:47:59 -0600 |
commit | d6225aff7a4f11c3443515c0d8dad12351b97575 (patch) | |
tree | 15a0f1a7bd457f0e21a3a2f55d5c36d79c233638 /gdbserver/win32-low.h | |
parent | 71fbdbafe07a4edb2ac88705e03e2cb14b3c77da (diff) | |
download | gdb-d6225aff7a4f11c3443515c0d8dad12351b97575.zip gdb-d6225aff7a4f11c3443515c0d8dad12351b97575.tar.gz gdb-d6225aff7a4f11c3443515c0d8dad12351b97575.tar.bz2 |
Add read_pc / write_pc support to win32-low
This changes win32-low.c to implement the read_pc and write_pc
methods. A subsequent patch will need these.
Note that I have no way to test, or even compile, the win32-arm-low.c
change.
gdbserver/ChangeLog
2020-04-08 Tom Tromey <tromey@adacore.com>
* win32-low.h (win32_process_target::read_pc)
(win32_process_target::write_pc): Declare.
* win32-low.c (win32_process_target::read_pc)
(win32_process_target::write_pc): New methods.
* win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
functions.
(the_low_target): Update.
* win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
functions.
(the_low_target): Update.
Diffstat (limited to 'gdbserver/win32-low.h')
-rw-r--r-- | gdbserver/win32-low.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdbserver/win32-low.h b/gdbserver/win32-low.h index 917f727..56ff8a9 100644 --- a/gdbserver/win32-low.h +++ b/gdbserver/win32-low.h @@ -63,6 +63,11 @@ struct win32_target_ops const unsigned char *breakpoint; int breakpoint_len; + /* Get the PC register from REGCACHE. */ + CORE_ADDR (*get_pc) (struct regcache *regcache); + /* Set the PC register in REGCACHE. */ + void (*set_pc) (struct regcache *regcache, CORE_ADDR newpc); + /* Breakpoint/Watchpoint related functions. See target.h for comments. */ int (*supports_z_point_type) (char z_type); int (*insert_point) (enum raw_bkpt_type type, CORE_ADDR addr, @@ -142,6 +147,10 @@ public: int get_tib_address (ptid_t ptid, CORE_ADDR *addr) override; const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override; + + CORE_ADDR read_pc (regcache *regcache) override; + + void write_pc (regcache *regcache, CORE_ADDR pc) override; }; /* Retrieve the context for this thread, if not already retrieved. */ |