diff options
Diffstat (limited to 'testsuite/systemtap.printf/bin3.stp')
-rw-r--r-- | testsuite/systemtap.printf/bin3.stp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/systemtap.printf/bin3.stp b/testsuite/systemtap.printf/bin3.stp new file mode 100644 index 00000000..ac86059d --- /dev/null +++ b/testsuite/systemtap.printf/bin3.stp @@ -0,0 +1,18 @@ +# test of 16-bit binary prints +# need to use big_endian2() to get consistent results across +# different-endian architectures. + +probe begin +{ + set_endian(2) + printf("%2b", 0x12) + printf("%2b", 0x34) + printf("%2b%2b", 0xabcd, 0x5678) + a = 0x12345678 + b = 0xabcd + c = 0x8888 + d = 0xcdef + printf("%2b%2b%2b%2b", a, b, c, d) + printf("a=%2b b=%2b c=%2b d=%2b",a,b,c,d) + exit() +} |