This is the mail archive of the
mailing list for the systemtap project.
Re: Printing binary data in embedded C
Perry Cheng <firstname.lastname@example.org> writes:
> I've been trying to convert some of my existing scripts from printing
> ascii data to binary data to improve probe speed. I've stated using the
> %b modifier via _stp_printf with success. [...]
There is a bug #5189 to support printf("%*s", string, length), which should
help. Can you elaborate though why you're using embedded-C?
> [...] If not, how fragile is it for me to clone _stp_print and then
> replace the call to strlen with the my buffer length?
The runtime functions are generally considered internal interfaces
between the translator and the runtime, and not to be used by
embedded-C code. We have not received enough information to motivate
formal publshing of some subset of that API for use by embedded-C.