llvm/test/DebugInfo/dwarfdump-macho-relocs.test
Adrian Prantl 8e66c2eabb llvm-dwarfdump: Replace -debug-dump=sect option with individual options.
As discussed on llvm-dev in
http://lists.llvm.org/pipermail/llvm-dev/2017-September/117301.html
this changes the command line interface of llvm-dwarfdump to match the
one used by the dwarfdump utility shipping on macOS. In addition to
being shorter to type this format also has the advantage of allowing
more than one section to be specified at the same time.

In a nutshell, with this change

  $ llvm-dwarfdump --debug-dump=info
  $ llvm-dwarfdump --debug-dump=apple-objc

becomes

  $ dwarfdump --debug-info --apple-objc

Differential Revision: https://reviews.llvm.org/D37714

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312970 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 22:59:45 +00:00

28 lines
884 B
Plaintext

// RUN: llvm-dwarfdump -debug-info %p/Inputs/dwarfdump-macho-relocs.macho.x86_64.o | FileCheck %s
// The dumped file has 2 functions in different sections of the __TEXT segment.
// Check that the addresses are are dumped correctly
// Compiled with: clang -x c -g -c -o dwarfdump-macho-relocs.macho.x86_64.o dwarfdump-macho-relocs.test
__attribute__((section("__TEXT,__blah")))
int foo() {
return 42;
}
// CHECK: DW_TAG_subprogram
// CHECK-NEXT: DW_AT_low_pc{{.*}}0x0000000000000020
// CHECK-NEXT: DW_AT_high_pc{{.*}}0x000000000000002b
// CHECK-NEXT: DW_AT_frame_base
// CHECK-NEXT: DW_AT_name{{.*}}"foo"
int main() {
return foo();
}
// CHECK: DW_TAG_subprogram
// CHECK-NEXT: DW_AT_low_pc{{.*}}0x0000000000000000
// CHECK-NEXT: DW_AT_high_pc{{.*}}0x000000000000001a
// CHECK-NEXT: DW_AT_frame_base
// CHECK-NEXT: DW_AT_name{{.*}}"main"