diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-04-27 21:03:12 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2022-06-28 04:35:06 +0530 |
commit | 5f9ca6f3c5111fadb0b1e76755ceaf738a98db4c (patch) | |
tree | a4ff025b0247f19696ea8be1555f7772a8237334 /include/semihosting | |
parent | b89350e83044ee6e6e6628dd99845f3d1f53bd52 (diff) | |
download | qemu-5f9ca6f3c5111fadb0b1e76755ceaf738a98db4c.zip qemu-5f9ca6f3c5111fadb0b1e76755ceaf738a98db4c.tar.gz qemu-5f9ca6f3c5111fadb0b1e76755ceaf738a98db4c.tar.bz2 |
semihosting: Add target_strlen for softmmu-uaccess.h
Mirror the interface of the user-only function of the same name.
Use probe_access_flags for the common case of ram, and
cpu_memory_rw_debug for the uncommon case of mmio.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
v3: Use probe_access_flags (pmm)
Diffstat (limited to 'include/semihosting')
-rw-r--r-- | include/semihosting/softmmu-uaccess.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/semihosting/softmmu-uaccess.h b/include/semihosting/softmmu-uaccess.h index 0330037..4f08dfc 100644 --- a/include/semihosting/softmmu-uaccess.h +++ b/include/semihosting/softmmu-uaccess.h @@ -53,4 +53,7 @@ void softmmu_unlock_user(CPUArchState *env, void *p, target_ulong addr, target_ulong len); #define unlock_user(s, args, len) softmmu_unlock_user(env, s, args, len) +ssize_t softmmu_strlen_user(CPUArchState *env, target_ulong addr); +#define target_strlen(p) softmmu_strlen_user(env, p) + #endif /* SEMIHOSTING_SOFTMMU_UACCESS_H */ |