Skip to content

Commit

Permalink
Add a test for x86_64 disassembly.
Browse files Browse the repository at this point in the history
  • Loading branch information
mstange committed Jan 31, 2023
1 parent 239f747 commit bf8bd84
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions fixtures/snapshots/asm_x86_64.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"startAddress":"0x17a20","size":"0x3d","arch":"x86_64","syntax":["Intel"],"instructions":[[0,"jl $-0x64"],[2,"add eax, dword [rax]"],[4,"mov edx, 0x38"],[9,"mov rcx, r15"],[12,"call 0x39c6f"],[17,"xor eax, eax"],[19,"jmp $+0x9a"],[24,"mov rbx, qword [r15]"],[27,"cmp rbx, rax"],[30,"jz $+0x35"],[32,"mov rdx, qword [r15 + 0x8]"],[36,"mov qword [rdx], rbx"],[39,"mov rdx, qword [rbx + 0x8]"],[43,"mov qword [rdx], rax"],[46,"mov rdx, qword [rax + 0x8]"],[50,"mov qword [rdx], r15"],[53,"mov rdx, qword [rax + 0x8]"],[57,"mov rbp, qword [rbx + 0x8]"]]}
17 changes: 17 additions & 0 deletions samply-api/tests/integration_tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,3 +414,20 @@ fn asm_with_continue() {
"output-asm_with_continue.txt",
)
}

#[test]
fn asm_x86_64() {
compare_snapshot(
"/asm/v1",
r#"{
"name": "firefox.exe",
"debugName": "firefox.pdb",
"breakpadId": "8A913DE821D9DE764C4C44205044422E1",
"startAddress": "0x17a20",
"size": "0x3a"
}"#,
fixtures_dir().join("win64-local"),
"asm_x86_64.txt",
"output-asm_x86_64.txt",
)
}

0 comments on commit bf8bd84

Please sign in to comment.