diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-12-13 19:18:07 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-12-17 11:39:14 +0100 |
| commit | 41799debdcc19d65fb6e0499cbbb74a489a822ea (patch) | |
| tree | 8b7107794ac883476fb0f79717e405cb58669c3e /sys/test/test.txt | |
| parent | 286edfb78e2e77c644b32d161e8e1b188406a5c5 (diff) | |
prog: introduce more readable format for data args
Fixes #460
File names, crypto algorithm names, etc in programs are completely unreadable:
bind$alg(r0, &(0x7f0000408000)={0x26, "6861736800000000000000000000",
0x0, 0x0, "6d6435000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000
00000000000"}, 0x58)
Introduce another format for printable strings.
New args are denoted by '' ("" for old args).
New format is enabled for printable chars, \x00
and \t, \r, \n.
Example:
`serialize(&(0x7f0000408000)={"6861736800000000000000000000", "4849000000"})`,
vs:
`serialize(&(0x7f0000408000)={'hash\x00', 'HI\x00'})`,
Diffstat (limited to 'sys/test/test.txt')
| -rw-r--r-- | sys/test/test.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/test/test.txt b/sys/test/test.txt index 561de0db8..69f987a16 100644 --- a/sys/test/test.txt +++ b/sys/test/test.txt @@ -555,3 +555,14 @@ mutate5(filename ptr[in, filename], flags flags[open_flags]) fd mutate6(fd fd, data ptr[in, array[int8]], size bytesize[data]) open_flags = 0xabababababababab, 0xcdcdcdcdcdcdcdcd + +# Serialization tests. + +serialize(a ptr[in, serialize_struct]) + +serialize_struct { + a string[serialize_strings, 10] + b string[serialize_strings, 5] +} + +serialize_strings = "aaa", "bbb" |
