Unix History: Why does hexdump default to word alignment?
Elazar Leibovich
elazarl at gmail.com
Fri Dec 2 09:39:28 IST 2011
On Fri, Dec 2, 2011 at 9:28 AM, guy keren <choo at actcom.co.il> wrote:
> you can use a debugger only for the basic code. you cannot use a debugger
> when you're dealing with multiple threads that access the same shared data
> and could have race conditions. in those cases you need to run a test, find
> that the eventual data is incorrect, and track back using logs and friends,
> to find the culprit(s).
>
I think that what Nadav meant, is instead of adding
log_raw_data_to_file(file);
you can set a breakpoint there, and watch the data with gdb's x.
Like you I find the printf-debugging approach more appealing, but it might
be that I'm just stuck in the past, and reluctant to try new tools.
>
> this is the common case in storage systems - but also in other types of
> systems.
Other type I ran into, is when passing binary data from process A to
process B using pipes, it's extremely quick to test the actual data with
./proc | hexdump -C, then by redirecting the output to a file, or tapping
the network/pipe.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20111202/c4f66db8/attachment.html>
More information about the Linux-il
mailing list