aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/Shell/ObjectFile
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/Shell/ObjectFile')
-rw-r--r--lldb/test/Shell/ObjectFile/ELF/elf-memory.test2
-rw-r--r--lldb/test/Shell/ObjectFile/MachO/Inputs/section-overflow-binarybin0 -> 344 bytes
-rw-r--r--lldb/test/Shell/ObjectFile/MachO/section-overflow-binary.test13
3 files changed, 14 insertions, 1 deletions
diff --git a/lldb/test/Shell/ObjectFile/ELF/elf-memory.test b/lldb/test/Shell/ObjectFile/ELF/elf-memory.test
index 75a68ed..170dc76 100644
--- a/lldb/test/Shell/ObjectFile/ELF/elf-memory.test
+++ b/lldb/test/Shell/ObjectFile/ELF/elf-memory.test
@@ -11,7 +11,7 @@
// - verify that "image dump objfile" will dump the dynamic section of the
// memory elf file and find the .dynamic string table.
-// RUN: %clang_host %p/Inputs/memory-elf.cpp -g -O0 -o %t
+// RUN: %clangxx_host %p/Inputs/memory-elf.cpp -g -O0 -o %t
// RUN: %lldb %t -b \
// RUN: -o "b main" \
diff --git a/lldb/test/Shell/ObjectFile/MachO/Inputs/section-overflow-binary b/lldb/test/Shell/ObjectFile/MachO/Inputs/section-overflow-binary
new file mode 100644
index 0000000..19dc2f4
--- /dev/null
+++ b/lldb/test/Shell/ObjectFile/MachO/Inputs/section-overflow-binary
Binary files differ
diff --git a/lldb/test/Shell/ObjectFile/MachO/section-overflow-binary.test b/lldb/test/Shell/ObjectFile/MachO/section-overflow-binary.test
new file mode 100644
index 0000000..76c335f
--- /dev/null
+++ b/lldb/test/Shell/ObjectFile/MachO/section-overflow-binary.test
@@ -0,0 +1,13 @@
+RUN: %lldb -b %p/Inputs/section-overflow-binary \
+RUN: -o 'script dwarf = lldb.target.module[0].sections[0]' \
+RUN: -o 'script section = dwarf.GetSubSectionAtIndex(0)' \
+RUN: -o "script print(f'{section.GetName()} file_offset=0x{section.GetFileOffset():016x}')" \
+RUN: -o 'script section = dwarf.GetSubSectionAtIndex(1)' \
+RUN: -o "script print(f'{section.GetName()} file_offset=0x{section.GetFileOffset():016x}')" \
+RUN: -o 'script section = dwarf.GetSubSectionAtIndex(2)' \
+RUN: -o "script print(f'{section.GetName()} file_offset=0x{section.GetFileOffset():016x}')" \
+RUN: | FileCheck %s
+
+CHECK: __debug_abbrev file_offset=0x00000000fffffff0
+CHECK: __debug_info file_offset=0x0000000100000010
+CHECK: __debug_line file_offset=0x0000000300000010