qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for 6.2 42/49] bsd-user: add stubbed out core dump support


From: Richard Henderson
Subject: Re: [PATCH for 6.2 42/49] bsd-user: add stubbed out core dump support
Date: Tue, 10 Aug 2021 07:27:31 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 8/7/21 11:42 AM, Warner Losh wrote:
From: Warner Losh <imp@FreeBSD.org>

Add a stubbed-out version of the bsd-user fork's core dump support. This
allows elfload.c to be almost the same between what's upstream and
what's in qemu-project upstream w/o the burden of reviewing the core
dump support.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>

Sponsored by:           Netflix
---
  bsd-user/elfcore.c | 10 ++++++++++
  bsd-user/elfload.c | 24 ++++++++++++++++++++++--
  bsd-user/qemu.h    |  6 ++++++
  3 files changed, 38 insertions(+), 2 deletions(-)
  create mode 100644 bsd-user/elfcore.c

diff --git a/bsd-user/elfcore.c b/bsd-user/elfcore.c
new file mode 100644
index 0000000000..e3c161942d
--- /dev/null
+++ b/bsd-user/elfcore.c
@@ -0,0 +1,10 @@
+/* Stubbed out version of core dump support, explicitly in public domain */
+
+static int elf_core_dump(int signr, CPUArchState *env)
+{
+    struct elf_note en;
+
+    bswap_note(&en);
+
+    return 0;
+}

No warnings from this, e.g. uninitialized variable?
If you have a chance, run this through clang-12 (mainline).
It it getting much better at identifying such stuff.

Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]