mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 14:20:17 +00:00
1ee74064e0
We were trying to process .debug_addr for CU that doesn't have it. This resulted in assert. Example came from GCC that also doesn't use DW_OP_addrx in DW_FORM_exprloc. Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D132422
21 lines
985 B
Plaintext
21 lines
985 B
Plaintext
# REQUIRES: system-linux
|
|
|
|
# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-cu-no-debug-addr-main.s -o %t1main.o
|
|
# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-cu-no-debug-addr-helper.s -o %t1helper.o
|
|
# RUN: %clang %cflags -dwarf-5 %t1main.o %t1helper.o -o %t.exe -Wl,-q
|
|
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
|
|
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s
|
|
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt | FileCheck --check-prefix=POSTCHECK %s
|
|
|
|
# This tests checks that we handle correctly, don't crash, DWARF5 CUs that does not access .debug_addr.
|
|
|
|
# PRECHECK: DW_TAG_compile_unit
|
|
# PRECHECK: DW_AT_addr_base
|
|
# PRECHECK: DW_TAG_compile_unit
|
|
# PRECHECK-NOT: DW_AT_addr_base
|
|
|
|
# POSTCHECK: DW_TAG_compile_unit
|
|
# POSTCHECK: DW_AT_addr_base
|
|
# POSTCHECK: DW_TAG_compile_unit
|
|
# POSTCHECK-NOT: DW_AT_addr_base
|