2019-12-08 14:31:14 +00:00
|
|
|
|
NAME=ps+ libc++ 32bit
|
|
|
|
|
FILE=../bins/elf/stdstring32-libc++.LOAD1
|
|
|
|
|
EXPECT=<<EOF
|
|
|
|
|
a
|
|
|
|
|
abcdefghij
|
|
|
|
|
|
|
|
|
|
abcdefghijk
|
|
|
|
|
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
|
|
|
|
|
EOF
|
|
|
|
|
ARGS=-n -m 0x08049ee8
|
|
|
|
|
CMDS=<<EOF
|
|
|
|
|
on ../bins/elf/stdstring32-libc++.heap 0x09eb8000 > /dev/null
|
|
|
|
|
f obj.empty_str 12 0x0804a064
|
|
|
|
|
f obj.long_str1 12 0x0804a04c
|
|
|
|
|
f obj.short_str1 12 0x0804a034
|
|
|
|
|
f obj.long_str2 12 0x0804a058
|
|
|
|
|
f obj.short_str2 12 0x0804a040
|
|
|
|
|
e asm.bits=32
|
|
|
|
|
ps+ @ obj.short_str1
|
|
|
|
|
ps+ @ obj.short_str2
|
|
|
|
|
ps+ @ obj.empty_str
|
|
|
|
|
ps+ @ obj.long_str1
|
|
|
|
|
ps+ @ obj.long_str2
|
|
|
|
|
EOF
|
|
|
|
|
RUN
|
|
|
|
|
|
|
|
|
|
NAME=ps+ libc++ 64bit
|
|
|
|
|
FILE=../bins/elf/stdstring64-libc++.LOAD1
|
|
|
|
|
EXPECT=<<EOF
|
|
|
|
|
a
|
|
|
|
|
abcdefghijklmnopqrstuv
|
|
|
|
|
|
|
|
|
|
abcdefghijklmnopqrstuvw
|
|
|
|
|
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
|
|
|
|
|
EOF
|
|
|
|
|
ARGS=-n -m 0x00600dc8
|
|
|
|
|
CMDS=<<EOF
|
|
|
|
|
on ../bins/elf/stdstring64-libc++.heap 0x0128b000 > /dev/null
|
|
|
|
|
f obj.empty_str 24 0x006010b8
|
|
|
|
|
f obj.long_str1 24 0x00601088
|
|
|
|
|
f obj.short_str1 24 0x00601058
|
|
|
|
|
f obj.long_str2 24 0x006010a0
|
|
|
|
|
f obj.short_str2 24 0x00601070
|
|
|
|
|
e asm.bits=64
|
|
|
|
|
ps+ @ obj.short_str1
|
|
|
|
|
ps+ @ obj.short_str2
|
|
|
|
|
ps+ @ obj.empty_str
|
|
|
|
|
ps+ @ obj.long_str1
|
|
|
|
|
ps+ @ obj.long_str2
|
|
|
|
|
EOF
|
|
|
|
|
RUN
|
|
|
|
|
|
|
|
|
|
NAME=psj ascii (#9064)
|
|
|
|
|
FILE=-
|
|
|
|
|
EXPECT=<<EOF
|
|
|
|
|
{"string":"...\"..\u00ef\u00bf\u00bd\u00ef\u00bf\u00bd\u00ef","offset":0,"section":"unknown","length":13,"type":"utf"}
|
|
|
|
|
EOF
|
|
|
|
|
CMDS=<<EOF
|
|
|
|
|
wz ..."..<2E><><EFBFBD><EFBFBD>...
|
|
|
|
|
psj 13
|
|
|
|
|
EOF
|
|
|
|
|
RUN
|
|
|
|
|
|
|
|
|
|
NAME=psx escapes newlines (#10037)
|
|
|
|
|
FILE=-
|
2020-01-17 13:58:18 +00:00
|
|
|
|
CMDS=<<EOF
|
2019-12-08 14:31:14 +00:00
|
|
|
|
wz abc\n123\n
|
|
|
|
|
psx 9
|
2020-01-17 13:58:18 +00:00
|
|
|
|
EOF
|
|
|
|
|
EXPECT=<<EOF
|
2019-12-08 14:31:14 +00:00
|
|
|
|
abc\x0a123\x0a\x00
|
2020-01-17 13:58:18 +00:00
|
|
|
|
EOF
|
2019-12-08 14:31:14 +00:00
|
|
|
|
RUN
|
|
|
|
|
|
|
|
|
|
NAME=ps N and initial nulls (#10037)
|
|
|
|
|
FILE=-
|
2020-01-17 13:58:18 +00:00
|
|
|
|
CMDS=<<EOF
|
2019-12-08 14:31:14 +00:00
|
|
|
|
ps 1
|
|
|
|
|
ps 2
|
|
|
|
|
ps 3
|
|
|
|
|
ps 4
|
|
|
|
|
ps 8
|
2020-01-17 13:58:18 +00:00
|
|
|
|
EOF
|
|
|
|
|
EXPECT=<<EOF
|
2019-12-08 14:31:14 +00:00
|
|
|
|
\x00
|
|
|
|
|
\x00\x00
|
|
|
|
|
\x00\x00\x00
|
|
|
|
|
\x00\x00\x00\x00
|
|
|
|
|
\x00\x00\x00\x00\x00\x00\x00\x00
|
2020-01-17 13:58:18 +00:00
|
|
|
|
EOF
|
2019-12-08 14:31:14 +00:00
|
|
|
|
RUN
|
|
|
|
|
|
|
|
|
|
NAME=ps+ libc++ 16bit error
|
|
|
|
|
FILE=-
|
|
|
|
|
CMDS=<<EOF
|
2020-01-19 06:09:41 +00:00
|
|
|
|
e asm.arch=x86
|
2019-12-08 14:31:14 +00:00
|
|
|
|
e asm.bits=16
|
2020-01-19 06:09:41 +00:00
|
|
|
|
f obj.empty_str 12 0x0804a064
|
2019-12-08 14:31:14 +00:00
|
|
|
|
ps+ @ obj.empty_str
|
|
|
|
|
EOF
|
|
|
|
|
EXPECT_ERR=<<EOF
|
|
|
|
|
Error: bitness of 16 not supported
|
|
|
|
|
EOF
|
|
|
|
|
RUN
|