This is the mail archive of the
mailing list for the systemtap project.
Re: Binary output with byte granularity
> >>Is there a way in SystemTap to output binary data with byte
> >>granularity? [...]
> >printf ("%1b", value)
> That prints one byte. How do I print all the bytes of binary data in a
> buffer of arbitrary length? [...]
Well, we don't have buffers of arbitrary length in the script
language, so this issue doesn't arise there. (But see bug #4706.)
If the buffer excluded \0, then one could use ordinary %s to format
it; if we needed a programmable substring length, we could add a "*"
width specifier as in libc -- printf("%*s", 40, "foo"). Worthwhile?