[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4.5 18/29] gdbstub: fix address type of gdb_set_cpu_pc
From: |
Richard Henderson |
Subject: |
[PATCH v4.5 18/29] gdbstub: fix address type of gdb_set_cpu_pc |
Date: |
Thu, 2 Mar 2023 18:57:54 -0800 |
From: Alex Bennée <alex.bennee@linaro.org>
The underlying call uses vaddr and the comms API uses unsigned long
long which will always fit. We don't need to deal in target_ulong
here.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230302190846.2593720-19-alex.bennee@linaro.org>
---
gdbstub/gdbstub.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index 7301466ff5..b8aead03bd 100644
--- a/gdbstub/gdbstub.c
+++ b/gdbstub/gdbstub.c
@@ -535,7 +535,7 @@ static void gdb_process_breakpoint_remove_all(GDBProcess *p)
}
-static void gdb_set_cpu_pc(target_ulong pc)
+static void gdb_set_cpu_pc(vaddr pc)
{
CPUState *cpu = gdbserver_state.c_cpu;
@@ -1290,7 +1290,7 @@ static void handle_file_io(GArray *params, void *user_ctx)
static void handle_step(GArray *params, void *user_ctx)
{
if (params->len) {
- gdb_set_cpu_pc((target_ulong)get_param(params, 0)->val_ull);
+ gdb_set_cpu_pc(get_param(params, 0)->val_ull);
}
cpu_single_step(gdbserver_state.c_cpu, gdbserver_state.sstep_flags);
--
2.34.1
- [PATCH v4.5 11/29] gdbstub: move chunks of user code into own files, (continued)
- [PATCH v4.5 11/29] gdbstub: move chunks of user code into own files, Richard Henderson, 2023/03/02
- [PATCH v4.5 03/29] gdbstub: Make syscall_complete/[gs]et_reg target-agnostic typedefs, Richard Henderson, 2023/03/02
- [PATCH v4.5 04/29] gdbstub: clean-up indent on gdb_exit, Richard Henderson, 2023/03/02
- [PATCH v4.5 16/29] gdbstub: introduce gdb_get_max_cpus, Richard Henderson, 2023/03/02
- [PATCH v4.5 13/29] gdbstub: abstract target specific details from gdb_put_packet_binary, Richard Henderson, 2023/03/02
- [PATCH v4.5 14/29] gdbstub: specialise handle_query_attached, Richard Henderson, 2023/03/02
- [PATCH v4.5 15/29] gdbstub: specialise target_memory_rw_debug, Richard Henderson, 2023/03/02
- [PATCH v4.5 07/29] includes: move tb_flush into its own header, Richard Henderson, 2023/03/02
- [PATCH v4.5 17/29] gdbstub: specialise stub_can_reverse, Richard Henderson, 2023/03/02
- [PATCH v4.5 19/29] gdbstub: don't use target_ulong while handling registers, Richard Henderson, 2023/03/02
- [PATCH v4.5 18/29] gdbstub: fix address type of gdb_set_cpu_pc,
Richard Henderson <=
- [PATCH v4.5 20/29] gdbstub: move register helpers into standalone include, Richard Henderson, 2023/03/02
- [PATCH v4.5 22/29] gdbstub: only compile gdbstub twice for whole build, Richard Henderson, 2023/03/02
- [PATCH v4.5 21/29] gdbstub: move syscall handling to new file, Richard Henderson, 2023/03/02
- [PATCH v4.5 25/29] gdbstub: split out softmmu/user specifics for syscall handling, Richard Henderson, 2023/03/02
- [PATCH v4.5 27/29] gdbstub: Adjust gdb_do_syscall to only use uint32_t and uint64_t, Richard Henderson, 2023/03/02
- [PATCH v4.5 24/29] include: split target_long definition from cpu-defs, Richard Henderson, 2023/03/02
- [PATCH v4.5 23/29] testing: probe gdb for supported architectures ahead of time, Richard Henderson, 2023/03/02
- [PATCH v4.5 26/29] gdbstub: Remove gdb_do_syscallv, Richard Henderson, 2023/03/02