qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] elf2dmp: Don't abandon when Prcb is set to 0


From: Viktor Prutyanov
Subject: Re: [PATCH] elf2dmp: Don't abandon when Prcb is set to 0
Date: Mon, 12 Jun 2023 13:42:41 +0300

> Prcb may be set to 0 for some CPUs if the dump was taken before they
> start. The dump may still contain valuable information for started CPUs
> so don't abandon conversion in such a case.
> 
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
> contrib/elf2dmp/main.c | 5 +++++
> 1 file changed, 5 insertions(+)
> 
> diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c
> index d77b8f98f7..91c58e4424 100644
> --- a/contrib/elf2dmp/main.c
> +++ b/contrib/elf2dmp/main.c
> @@ -312,6 +312,11 @@ static int fill_context(KDDEBUGGER_DATA64 *kdbg,
> return 1;
> }
> 
> + if (!Prcb) {
> + eprintf("Context for CPU #%d is missing\n", i);
> + continue;
> + }
> +
> if (va_space_rw(vs, Prcb + kdbg->OffsetPrcbContext, 
> &Context, sizeof(Context), 0)) {
> eprintf("Failed to read CPU #%d ContextFrame location\n", i);
> 
> --
> 2.40.1

Hi Akihiko,

How this fix can be tested?

NumberProcessors field is still set to qemu_elf.state_nr, how does WinDbg react 
to this?

Viktor



reply via email to

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