[PATCH] changed the -x switch to print only non-ascii chars in hexadecimal

rae l rank1cheng at users.sourceforge.net
Fri Dec 14 04:46:02 UTC 2007


Now the -x and -xx switches are almost the same:
-x switch to search a non-ascii char and print the whole string in
hexadecimal if find one;
-xx switch to direct print the whole string in hexdecimal.

but sometimes we need only print the non-ascii chars in hexadecimal,
neither the whole string as -x does, nor the default octal, so I
changed the -x behavior:

one running example:

	./strace -x /usr/bin/echo -e "\7\1\x1fhello, world"

	write(1, "\x07\x01\x1fhello, world\n", 16  hello, world

-- 
Denis Cheng
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output-only-nonprint-as-hexchar.patch
Type: text/x-patch
Size: 1833 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20071214/75dad27d/attachment.bin>


More information about the Strace-devel mailing list