Fix block label printing in precise-output tests (#5798)

As a follow-up to #5780, disassemble the regions identified by bb_starts, falling back on disassembling the whole buffer. This ensures that instructions like br_table that introduce a lot of constants don't throw off capstone for the remainder of the function.

---------

Co-authored-by: Jamey Sharp <jamey@minilop.net>
This commit is contained in:
Trevor Elliott
2023-02-15 18:35:26 -08:00
committed by GitHub
parent f04decc4a1
commit cc073593a4
123 changed files with 1473 additions and 784 deletions

View File

@@ -26,9 +26,10 @@ function u0:359(i64) -> i8, i8 system_v {
; ret
;
; Disassembled:
; block0: ; offset 0x0
; pushq %rbp
; movq %rsp, %rbp
; block0: ; offset 0x4
; block1: ; offset 0x4
; callq 9 ; reloc_external CallPCRel4 u0:521 -4
; movq %rbp, %rsp
; popq %rbp

View File

@@ -24,9 +24,10 @@ function u0:1302(i64) -> i64 system_v {
; ret
;
; Disassembled:
; block0: ; offset 0x0
; pushq %rbp
; movq %rsp, %rbp
; block0: ; offset 0x4
; block1: ; offset 0x4
; movq (%rdi), %rax ; trap: heap_oob
; movq %rax, %rcx
; addq %rdi, %rcx