diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-09-13 17:22:49 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-10-04 11:03:54 -0700 |
commit | b77af26e973705e8fd96cff102fc978ee44043da (patch) | |
tree | 5da84b6520fbcf44ef8d9af06307785744eef835 /gdbstub | |
parent | ad75a51e84af9638e4ec51aa1e6ec5f3ff642558 (diff) |
accel/tcg: Replace CPUState.env_ptr with cpu_env()
Reviewed-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'gdbstub')
-rw-r--r-- | gdbstub/gdbstub.c | 4 | ||||
-rw-r--r-- | gdbstub/user-target.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 349d348c7b..8eea21450c 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -423,7 +423,7 @@ static const char *get_feature_xml(const char *p, const char **newp, static int gdb_read_register(CPUState *cpu, GByteArray *buf, int reg) { CPUClass *cc = CPU_GET_CLASS(cpu); - CPUArchState *env = cpu->env_ptr; + CPUArchState *env = cpu_env(cpu); GDBRegisterState *r; if (reg < cc->gdb_num_core_regs) { @@ -441,7 +441,7 @@ static int gdb_read_register(CPUState *cpu, GByteArray *buf, int reg) static int gdb_write_register(CPUState *cpu, uint8_t *mem_buf, int reg) { CPUClass *cc = CPU_GET_CLASS(cpu); - CPUArchState *env = cpu->env_ptr; + CPUArchState *env = cpu_env(cpu); GDBRegisterState *r; if (reg < cc->gdb_num_core_regs) { diff --git a/gdbstub/user-target.c b/gdbstub/user-target.c index 6e21c3161c..c4bba4c72c 100644 --- a/gdbstub/user-target.c +++ b/gdbstub/user-target.c @@ -310,7 +310,7 @@ void gdb_handle_v_file_open(GArray *params, void *user_ctx) uint64_t mode = get_param(params, 2)->val_ull; #ifdef CONFIG_LINUX - int fd = do_guest_openat(gdbserver_state.g_cpu->env_ptr, 0, filename, + int fd = do_guest_openat(cpu_env(gdbserver_state.g_cpu), 0, filename, flags, mode, false); #else int fd = open(filename, flags, mode); |