[Crash-utility] Make note information human readable when help -D
Dave Anderson
anderson at redhat.com
Wed Dec 17 21:07:55 UTC 2014
----- Original Message -----
> I test it, and it works well.
OK thanks -- although further testing showed that the patch needed a bit more work
in netdump.c to prevent calling display_ELF_note() if:
(1) the architecture is not x86 or x86-64
(2) the note type is not NT_PRSTATUS or QEMU, because it would also erroneously pass
pointers to other note types such as NT_PRPSINFO and NT_TASKSTRUCT.
Queued for crash-7.1.0:
https://github.com/crash-utility/crash/commit/e36a1eb28b30c12deb72ffc515747801facae913
Thanks,
Dave
>
> On 12/17/2014 05:40 AM, Dave Anderson wrote:
> >
> >
> > ----- Original Message -----
> >
> >> All have been addressed except this. Originally, I used the function
> >> netdump_print(), but BUFSIZE in netdump_print() is not enough. So I
> >> changed it to fprintf().
> >
> > Hello Zhou,
> >
> > Looking at this further, the usage of the static char buffers is
> > just plain ugly, so let's just get rid them entirely, and simplify
> > things even further.
> >
> > I did a bit of tinkering with your patch-set:
> >
> > (1) Instead of passing a char * to display_ELF_note(), the last argument
> > has been changed to be the relevant FILE * for printing. The 4
> > display
> > functions then simply fprintf to that FILE * instead of into a char
> > buffer.
> >
> > (2) I changed the 4 display functions to use the space(count) function,
> > and vary the count argument based upon where the call is coming
> > from. That way, the note data output "lines up" nicely with either
> > the ELF or compressed kdump displays that they are part of.
> >
> > (3) And I tinkered with the output formats so as to more closely
> > be aligned with typical crash output, such as removing the "0x"
> > preceding hexadecimal values, etc...
> >
> > Can you verify the attached "help-D.patch"? I don't have any 32-bit QEMU
> > dumps
> > to test it with. It was created against the current git tree.
> >
> > Thanks,
> > Dave
> >
>
>
> --
> Thanks
> Zhou Wenjian
>
More information about the Crash-utility
mailing list