This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Binary output with byte granularity
- From: Martin Hunt <hunt at redhat dot com>
- To: dcnltc at us dot ibm dot com
- Cc: Mike Mason <mmlnx at us dot ibm dot com>, systemtap at sourceware dot org
- Date: Mon, 15 Oct 2007 15:41:22 -0400
- Subject: Re: Binary output with byte granularity
- Organization: Red Hat Inc.
- References: <4713BA02.9020109@us.ibm.com> <4713BCD7.6050605@us.ibm.com>
Someday I really have to write up all the printf options.... It will
probably need its own man page. For now see
testsuite/systemtap.printf/bin*.stp for examples.
On Mon, 2007-10-15 at 12:17 -0700, Dave Nomura wrote:
> I worked around this problem by doing:
> _stp_printf("%4b", *w);
> for outputting 4 byte data. You could probably do something similar for
> 1 byte data.
> Mike Mason wrote:
> > Is there a way in SystemTap to output binary data with byte
> > granularity? The only thing I've found is _stp_print_binary() in
> > embedded C. That outputs in 64-bit chunks. What I'd like to do is
> > output a buffer of raw binary data that may not be on a 64-bit
> > boundary. In this case, it's to generate wireshark-compatible packet
> > data from cifs.
> >
> > Thanks,
> > Mike
> >
>
>