qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 14/16] bsd-user: Implment core dumps


From: Warner Losh
Subject: Re: [PATCH 14/16] bsd-user: Implment core dumps
Date: Sat, 8 Apr 2023 23:00:46 -0600



On Sat, Apr 8, 2023 at 1:15 PM Richard Henderson <richard.henderson@linaro.org> wrote:
On 4/5/23 14:36, Warner Losh wrote:
> From: Stacey Son <sson@FreeBSD.org>
>
> Bring in the code that was originally copied from linxu-user/elfload.c
> and moved to elfcore.c. This code then removed the Linux specific bits,
> replacing them with FreeBSD specific bits. The commit history for this
> is not at all what we'd like (it was done in one go by sson in
> 227070562fc in one commit, with very few followup tweaks). Since the
> original commit, this code has been moved, and updated by sson and ed
> slightly. That makes it hard to split into smaller commits.
>
> Signed-off-by: Stacey Son <sson@FreeBSD.org>
> Signed-off-by: Ed Schouten <ed@nuxi.nl>
> Signed-off-by: Warner Losh <imp@bsdimp.com>
> ---
>   bsd-user/elfcore.c | 1318 +++++++++++++++++++++++++++++++++++++++++++-
>   1 file changed, 1315 insertions(+), 3 deletions(-)
>
> diff --git a/bsd-user/elfcore.c b/bsd-user/elfcore.c
> index c49d9280e2d..2905f2b8414 100644
> --- a/bsd-user/elfcore.c
> +++ b/bsd-user/elfcore.c
> @@ -1,10 +1,1322 @@
> -/* Stubbed out version of core dump support, explicitly in public domain */
> +/*
> + *  ELF loading code
> + *
> + *  Copyright (c) 2015 Stacey D. Son
> + *
> + *  This program is free software; you can redistribute it and/or modify
> + *  it under the terms of the GNU General Public License as published by
> + *  the Free Software Foundation; either version 2 of the License, or
> + *  (at your option) any later version.
> + *
> + *  This program is distributed in the hope that it will be useful,
> + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
> + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + *  GNU General Public License for more details.
> + *
> + *  You should have received a copy of the GNU General Public License
> + *  along with this program; if not, see <http://www.gnu.org/licenses/>.
> + */
> +#include "qemu/osdep.h"
>   
> -static int elf_core_dump(int signr, CPUArchState *env)
> +#ifdef USE_ELF_CORE_DUMP

Would this ever be unset?

I was sure that some architectures didn't use this. However, they all have them, so I'll
remove it.
 
Typo in subject.

Doh! Yes. Thanks.
 
I'm not going to review this one line by line, but

Acked-by: Richard Henderson <richard.henderson@linaro.org>

I've looked at this at a high level, and it seems legit...  But it is a bit daunting... And for a 'debug' feature,
I'm OK with 'working and looks OK'... If it were more central, I'd worry more about it, but we still have
about 20k lines to upstream and I'd rather more of them be looked at than this if push comes to shove....

Warner
 
r~

reply via email to

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