[Crash-utility] [PATCH] MIPS64: Get the correct dump NOTE offsets

HAGIO KAZUHITO(萩尾 一仁) k-hagio-ab at nec.com
Thu Jun 3 07:41:34 UTC 2021


-----Original Message-----
> When using the dump compressed file dumpfile compressed by makedumpfile,
> use the following command:
>    # crash vmlinux dumpfile -d 1
> 
> When you add the "-d num" option and want to view the debugging information,
> it is found that you cannot enter the crash> command line normally, and stay
> in the following position:
>    ...
>              notes[3]: 20ec075fc (NT_PRSTATUS)
>         snapshot_task: 0
>        num_qemu_notes: 0
> 
> The reason is that it is stuck in the dump_note_offsets(fp) call, because the
> MIPS64 match is not added, so that the NOTE offsets cannot be obtained.
> 
> When the match of MIPS64 is added, it can successfully enter the crash> command
> line.
> 
> Signed-off-by: Youling Tang <tangyouling at loongson.cn>

Looks good.

Acked-by: Kazuhito Hagio <k-hagio-ab at nec.com>

Kazu

> ---
>  diskdump.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/diskdump.c b/diskdump.c
> index 3effb52..6680695 100644
> --- a/diskdump.c
> +++ b/diskdump.c
> @@ -1700,7 +1700,7 @@ dump_note_offsets(FILE *fp)
>  			qemu = FALSE;
>  			if (machine_type("X86_64") || machine_type("S390X") ||
>  			    machine_type("ARM64") || machine_type("PPC64") ||
> -			    machine_type("SPARC64")) {
> +			    machine_type("SPARC64") || machine_type("MIPS64")) {
>  				note64 = (void *)dd->notes_buf + tot;
>  				len = sizeof(Elf64_Nhdr);
>  				if (STRNEQ((char *)note64 + len, "QEMU"))
> --
> 2.1.0





More information about the Crash-utility mailing list