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

Dave Anderson anderson at redhat.com
Tue Dec 16 21:40:04 UTC 2014



----- 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: help-D.patch
Type: text/x-patch
Size: 17346 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20141216/5d9c5d33/attachment.bin>


More information about the Crash-utility mailing list