-
-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
193 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
NAME=/a search - errors - no assembler | ||
FILE=malloc://1024 | ||
CMDS=<<EOF | ||
e asm.arch=hexagon | ||
e asm.bits=32 | ||
/a add esp, 8 | ||
EOF | ||
EXPECT= | ||
EXPECT_ERR=<<EOF | ||
ERROR: Cannot assemble 'add esp, 8' at line 3 | ||
ERROR: Failed to assemble 'add esp, 8' | ||
ERROR: Consider using "/ar" instead. | ||
EOF | ||
RUN | ||
|
||
NAME=/a search - errors - faulty asm-text | ||
FILE=malloc://1024 | ||
CMDS=<<EOF | ||
e asm.arch=x86.as | ||
e asm.bits=32 | ||
wa "add esp,8;pop ebx; pop ebp; ret" | ||
/a ad esp, 8 | ||
EOF | ||
EXPECT= | ||
REGEXP_FILTER_ERR=Cannot assemble.* | ||
EXPECT_ERR=<<EOF | ||
Cannot assemble 'ad esp, 8' at line 3 | ||
EOF | ||
RUN | ||
|
||
NAME=/a search - empty | ||
FILE= | ||
CMDS=<<EOF | ||
e asm.arch=x86.as | ||
e asm.assembler=x86 | ||
e asm.bits=32 | ||
/a add esp, 8 | ||
EOF | ||
EXPECT=<<EOF | ||
EOF | ||
EXPECT_ERR=<<EOF | ||
EOF | ||
RUN | ||
|
||
NAME=/a search - x86 | ||
FILE=malloc://1024 | ||
CMDS=<<EOF | ||
e asm.arch=x86.as | ||
e asm.bits=32 | ||
wa "add esp,8;pop ebx; pop ebp; ret" | ||
/a add esp, 8 | ||
/a pop ebx | ||
/a pop ebp | ||
/a ret | ||
EOF | ||
EXPECT=<<EOF | ||
0x00000000 3 hit.asm_text.0 | ||
0x00000003 1 hit.asm_text.0 | ||
0x00000004 1 hit.asm_text.0 | ||
0x00000005 1 hit.asm_text.0 | ||
EOF | ||
RUN | ||
|
||
NAME=/a search - arm - in file | ||
FILE=bins/elf/arm-init | ||
CMDS=<<EOF | ||
/a add r0, pc, r0 | ||
pi 1 @ hit.asm_text.0 | ||
pi 1 @ hit.asm_text.1 | ||
/a pop {fp, pc} | ||
pi 1 @ hit.asm_text.0 | ||
pi 1 @ hit.asm_text.1 | ||
EOF | ||
EXPECT=<<EOF | ||
0x000002e8 4 hit.asm_text.0 | ||
0x00000310 4 hit.asm_text.1 | ||
add r0, pc, r0 | ||
add r0, pc, r0 | ||
0x0000033c 4 hit.asm_text.0 | ||
0x0000035c 4 hit.asm_text.1 | ||
pop {fp, pc} | ||
pop {fp, pc} | ||
EOF | ||
RUN | ||
|
||
NAME=/a search - x86 - in file | ||
FILE=bins/elf/hello_world | ||
CMDS=<<EOF | ||
e asm.arch=x86.as | ||
/a mov r15d, edi | ||
/a hlt | ||
EOF | ||
EXPECT=<<EOF | ||
0x00000854 3 hit.asm_text.0 | ||
0x0000028c 1 hit.asm_text.0 | ||
0x000006ca 1 hit.asm_text.1 | ||
EOF | ||
RUN | ||
|
Oops, something went wrong.