qemu-e2k/linux-user
Ilya Leoshkevich 77ae5761f3 linux-user: Emulate /proc/self/smaps
/proc/self/smaps is an extension of /proc/self/maps: it provides the
same lines, plus additional information about each range.

GDB uses /proc/self/smaps when available, which means that
generate-core-file tries it first before falling back to
/proc/self/maps. This, in turn, causes it to dump the host mappings,
since /proc/self/smaps is not emulated and is just passed through.

Fix by emulating /proc/self/smaps. Provide true values only for
Size, KernelPageSize, MMUPageSize and VmFlags. Leave all other values
at 0, which is a valid conservative estimate.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230621203627.1808446-4-iii@linux.ibm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230630180423.558337-34-alex.bennee@linaro.org>
2023-07-03 12:52:34 +01:00
..
aarch64
alpha
arm include/exec: Change reserved_va semantics to last byte 2023-03-28 15:23:10 -07:00
cris
generic
hexagon Hexagon (linux-user/hexagon): handle breakpoints 2023-05-18 12:40:52 -07:00
hppa
i386 target/i386: emulate 64-bit ring 0 for linux-user if LM feature is set 2023-06-29 10:49:43 +02:00
include
loongarch64 target/loongarch: Add LSX data type VReg 2023-05-06 11:19:42 +08:00
m68k
microblaze
mips linux-user: Fix mips fp64 executables loading 2023-05-17 07:20:29 +02:00
mips64
nios2
openrisc
ppc ppc: spapr: cleanup cr get/set with helpers. 2023-05-05 12:34:22 -03:00
riscv
s390x linux-user/s390x: Fix single-stepping SVC 2023-06-05 07:27:23 +02:00
sh4
sparc
x86_64
xtensa
cpu_loop-common.h
elfload.c linux-user: elfload: Specify -R is an option for qemu-user binaries 2023-06-10 09:40:46 +03:00
errnos.c.inc
exit.c *: Add missing includes of qemu/plugin.h 2023-03-22 15:06:57 +00:00
fd-trans.c
fd-trans.h
flat.h
flatload.c linux-user: Pass last not end to probe_guest_base 2023-03-28 15:23:10 -07:00
ioctls.h
linux_loop.h
linuxload.c
loader.h linux-user/elfload: Introduce elf_hwcap_str() on s390x 2023-06-05 20:48:34 +02:00
main.c linux-user, bsd-user: Preserve incoming order of environment variables in the target 2023-06-13 11:28:53 +02:00
meson.build
mmap.c linux-user: Avoid mmap of the last byte of the reserved_va 2023-07-01 08:33:08 +02:00
qemu.h linux-user: Add "safe" parameter to do_guest_openat() 2023-07-03 12:52:34 +01:00
semihost.c
signal-common.h
signal.c
socket.h
strace.c
strace.h
strace.list
syscall_defs.h linux-user/sparc: Don't use 16-bit UIDs on SPARC V9 2023-03-30 15:03:23 +02:00
syscall_types.h
syscall.c linux-user: Emulate /proc/self/smaps 2023-07-03 12:52:34 +01:00
thunk.c
trace-events
trace.h
uaccess.c
uname.c
uname.h
user-internals.h linux-user: Pass last not end to probe_guest_base 2023-03-28 15:23:10 -07:00
user-mmap.h
vm86.c