diff options
| author | Richard Henderson | 2022-04-28 06:03:12 +0200 |
|---|---|---|
| committer | Richard Henderson | 2022-06-28 01:05:06 +0200 |
| commit | 5f9ca6f3c5111fadb0b1e76755ceaf738a98db4c (patch) | |
| tree | a4ff025b0247f19696ea8be1555f7772a8237334 /include | |
| parent | accel/stubs: Add tcg stub for probe_access_flags (diff) | |
| download | qemu-5f9ca6f3c5111fadb0b1e76755ceaf738a98db4c.tar.gz qemu-5f9ca6f3c5111fadb0b1e76755ceaf738a98db4c.tar.xz qemu-5f9ca6f3c5111fadb0b1e76755ceaf738a98db4c.zip | |
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')
| -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 03300376d3..4f08dfc098 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 */ |
