summaryrefslogtreecommitdiffstats
path: root/lldb/test/Shell
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2019-12-09 10:27:32 +0100
committerRaphael Isemann <teemperor@gmail.com>2019-12-09 10:46:26 +0100
commitd0fb7a478df19b78b58bf8778e9f046903115035 (patch)
treeefcf185c3887eecd37c460fe9cb7ed4e2c16a828 /lldb/test/Shell
parentf3696533f2246653774f85f49269f5059fb3fe65 (diff)
downloadbcm5719-llvm-d0fb7a478df19b78b58bf8778e9f046903115035.tar.gz
bcm5719-llvm-d0fb7a478df19b78b58bf8778e9f046903115035.zip
[lldb] Support for DWARF-5 atomic types
Summary: This patch adds support for atomic types (DW_TAG_atomic_type) to LLDB. It's mostly just filling out all the switch-statements that didn't implement Atomic case with the usual boilerplate. Thanks Pavel for writing the test case. Reviewers: labath, aprantl, shafik Reviewed By: labath Subscribers: jfb, abidh, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71183
Diffstat (limited to 'lldb/test/Shell')
-rw-r--r--lldb/test/Shell/SymbolFile/DWARF/dwarf5-atomic.s104
1 files changed, 104 insertions, 0 deletions
diff --git a/lldb/test/Shell/SymbolFile/DWARF/dwarf5-atomic.s b/lldb/test/Shell/SymbolFile/DWARF/dwarf5-atomic.s
new file mode 100644
index 00000000000..9d25956c0df
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/DWARF/dwarf5-atomic.s
@@ -0,0 +1,104 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t
+# RUN: %lldb %t -o "target variable integer structure" -o exit | FileCheck %s
+
+# CHECK: (_Atomic(int)) integer = 14159
+# CHECK: (_Atomic(struct_type)) structure = {}
+
+ .data
+integer:
+ .long 14159
+structure:
+ .byte 0
+
+ .section .debug_abbrev,"",@progbits
+ .byte 1 # Abbreviation Code
+ .byte 17 # DW_TAG_compile_unit
+ .byte 1 # DW_CHILDREN_yes
+ .byte 37 # DW_AT_producer
+ .byte 8 # DW_FORM_string
+ .byte 19 # DW_AT_language
+ .byte 5 # DW_FORM_data2
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 2 # Abbreviation Code
+ .byte 52 # DW_TAG_variable
+ .byte 0 # DW_CHILDREN_no
+ .byte 3 # DW_AT_name
+ .byte 8 # DW_FORM_string
+ .byte 73 # DW_AT_type
+ .byte 19 # DW_FORM_ref4
+ .byte 2 # DW_AT_location
+ .byte 24 # DW_FORM_exprloc
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 3 # Abbreviation Code
+ .byte 71 # DW_TAG_atomic_type
+ .byte 0 # DW_CHILDREN_no
+ .byte 73 # DW_AT_type
+ .byte 19 # DW_FORM_ref4
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 4 # Abbreviation Code
+ .byte 36 # DW_TAG_base_type
+ .byte 0 # DW_CHILDREN_no
+ .byte 3 # DW_AT_name
+ .byte 8 # DW_FORM_string
+ .byte 62 # DW_AT_encoding
+ .byte 11 # DW_FORM_data1
+ .byte 11 # DW_AT_byte_size
+ .byte 11 # DW_FORM_data1
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 5 # Abbreviation Code
+ .byte 19 # DW_TAG_structure_type
+ .byte 0 # DW_CHILDREN_no
+ .byte 3 # DW_AT_name
+ .byte 8 # DW_FORM_string
+ .byte 11 # DW_AT_byte_size
+ .byte 11 # DW_FORM_data1
+ .byte 0 # EOM(1)
+ .byte 0 # EOM(2)
+ .byte 0 # EOM(3)
+
+ .section .debug_info,"",@progbits
+.Lcu_begin0:
+ .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
+.Ldebug_info_start0:
+ .short 5 # DWARF version number
+ .byte 1 # DWARF Unit Type
+ .byte 8 # Address Size (in bytes)
+ .long .debug_abbrev # Offset Into Abbrev. Section
+ .byte 1 # Abbrev [1] 0xb:0x50 DW_TAG_compile_unit
+ .asciz "Hand-written DWARF" # DW_AT_producer
+ .short 12 # DW_AT_language
+ .byte 2 # Abbrev [2] DW_TAG_variable
+ .asciz "integer" # DW_AT_name
+ .long .Latomic_int # DW_AT_type
+ .byte 9 # DW_AT_location
+ .byte 3
+ .quad integer
+ .byte 2 # Abbrev [2] DW_TAG_variable
+ .asciz "structure" # DW_AT_name
+ .long .Latomic_struct # DW_AT_type
+ .byte 9 # DW_AT_location
+ .byte 3
+ .quad structure
+.Latomic_int:
+ .byte 3 # Abbrev [3] DW_TAG_atomic_type
+ .long .Lint # DW_AT_type
+.Lint:
+ .byte 4 # Abbrev [4] 0x53:0x7 DW_TAG_base_type
+ .asciz "int" # DW_AT_name
+ .byte 5 # DW_AT_encoding
+ .byte 4 # DW_AT_byte_size
+.Latomic_struct:
+ .byte 3 # Abbrev [3] DW_TAG_atomic_type
+ .long .Lstruct # DW_AT_type
+.Lstruct:
+ .byte 5 # Abbrev [5] DW_TAG_structure_type
+ .asciz "struct_type" # DW_AT_name
+ .byte 0 # DW_AT_byte_size
+ .byte 0 # End Of Children Mark
+.Ldebug_info_end0:
OpenPOWER on IntegriCloud