summaryrefslogtreecommitdiffstats
path: root/target/m68k
diff options
context:
space:
mode:
authorRichard Henderson2022-04-30 01:21:43 +0200
committerRichard Henderson2022-06-28 01:05:52 +0200
commit64c8c6a99221877f0e92f973c66e0e66a10ab2ff (patch)
tree71aa75614aebd2bdcb4f3bd082e2701b1666aa16 /target/m68k
parentsemihosting: Create semihost_sys_gettimeofday (diff)
downloadqemu-64c8c6a99221877f0e92f973c66e0e66a10ab2ff.tar.gz
qemu-64c8c6a99221877f0e92f973c66e0e66a10ab2ff.tar.xz
qemu-64c8c6a99221877f0e92f973c66e0e66a10ab2ff.zip
gdbstub: Adjust gdb_syscall_complete_cb declaration
Change 'ret' to uint64_t. This resolves a FIXME in the m68k and nios2 semihosting that we've lost data. Change 'err' to int. There is nothing target-specific about the width of the errno value. Reviewed-by: Luc Michel <lmichel@kalray.eu> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/m68k')
-rw-r--r--target/m68k/m68k-semi.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/target/m68k/m68k-semi.c b/target/m68k/m68k-semi.c
index b886ebf714..8c186c0e9f 100644
--- a/target/m68k/m68k-semi.c
+++ b/target/m68k/m68k-semi.c
@@ -95,7 +95,7 @@ static void translate_stat(CPUM68KState *env, target_ulong addr, struct stat *s)
unlock_user(p, addr, sizeof(struct gdb_stat));
}
-static void m68k_semi_return_u32(CPUM68KState *env, uint32_t ret, uint32_t err)
+static void m68k_semi_return_u32(CPUM68KState *env, uint32_t ret, int err)
{
target_ulong args = env->dregs[1];
if (put_user_u32(ret, args) ||
@@ -110,7 +110,7 @@ static void m68k_semi_return_u32(CPUM68KState *env, uint32_t ret, uint32_t err)
}
}
-static void m68k_semi_return_u64(CPUM68KState *env, uint64_t ret, uint32_t err)
+static void m68k_semi_return_u64(CPUM68KState *env, uint64_t ret, int err)
{
target_ulong args = env->dregs[1];
if (put_user_u32(ret >> 32, args) ||
@@ -124,16 +124,12 @@ static void m68k_semi_return_u64(CPUM68KState *env, uint64_t ret, uint32_t err)
static int m68k_semi_is_fseek;
-static void m68k_semi_cb(CPUState *cs, target_ulong ret, target_ulong err)
+static void m68k_semi_cb(CPUState *cs, uint64_t ret, int err)
{
M68kCPU *cpu = M68K_CPU(cs);
CPUM68KState *env = &cpu->env;
if (m68k_semi_is_fseek) {
- /*
- * FIXME: We've already lost the high bits of the fseek
- * return value.
- */
m68k_semi_return_u64(env, ret, err);
m68k_semi_is_fseek = 0;
} else {