[Crash-utility] Make note information human readable when help -D

"Zhou, Wenjian/周文剑" zhouwj-fnst at cn.fujitsu.com
Wed Dec 17 02:13:03 UTC 2014


I test it, and it works well.

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