[MC] Convert other MachO tests from macho-dump to llvm-readobj.
[oota-llvm.git] / test / MC / MachO / debug_frame.s
index 247347d252a7e1cd38aefe2e07df6cde704a9e73..d185127f4b17dd8ea628037a930375001b5cbd3a 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple i386-apple-darwin %s -filetype=obj -o - | macho-dump | FileCheck %s
+// RUN: llvm-mc -triple i386-apple-darwin %s -filetype=obj -o - | llvm-readobj -s -sd -r | FileCheck %s
 
 // Make sure MC can handle file level .cfi_startproc and .cfi_endproc that creates
 // an empty frame.
@@ -26,23 +26,33 @@ Leh_func_end0:
        .cfi_sections .debug_frame
 Ltext_end:
 
-// CHECK:       (('section_name', '__debug_frame\x00\x00\x00')
-// CHECK-NEXT:   ('segment_name', '__DWARF\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-// CHECK-NEXT:   ('address', 8)
-// CHECK-NEXT:   ('size', 52)
-// CHECK-NEXT:   ('offset', 332)
-// CHECK-NEXT:   ('alignment', 2)
-// CHECK-NEXT:   ('reloc_offset', 384)
-// CHECK-NEXT:   ('num_reloc', 2)
-// CHECK-NEXT:   ('flags', 0x2000000)
-// CHECK-NEXT:   ('reserved1', 0)
-// CHECK-NEXT:   ('reserved2', 0)
-// CHECK-NEXT:  ),
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT:   # Relocation 0
-// CHECK-NEXT:   (('word-0', 0x2c),
-// CHECK-NEXT:    ('word-1', 0x4000001)),
-// CHECK-NEXT:   # Relocation 1
-// CHECK-NEXT:   (('word-0', 0x1c),
-// CHECK-NEXT:    ('word-1', 0x4000001)),
-// CHECK-NEXT: ])
+// CHECK: Section {
+// CHECK:     Index: 1
+// CHECK:     Name: __debug_frame (5F 5F 64 65 62 75 67 5F 66 72 61 6D 65 00 00 00)
+// CHECK:     Segment: __DWARF (5F 5F 44 57 41 52 46 00 00 00 00 00 00 00 00 00)
+// CHECK:     Address: 0x8
+// CHECK:     Size: 0x34
+// CHECK:     Offset: 332
+// CHECK:     Alignment: 2
+// CHECK:     RelocationOffset: 0x180
+// CHECK:     RelocationCount: 2
+// CHECK:     Type: 0x0
+// CHECK:     Attributes [ (0x20000)
+// CHECK:       Debug (0x20000)
+// CHECK:     ]
+// CHECK:     Reserved1: 0x0
+// CHECK:     Reserved2: 0x0
+// CHECK:     SectionData (
+// CHECK:       0000: 10000000 FFFFFFFF 04000400 017C080C  |.............|..|
+// CHECK:       0010: 04048801 0C000000 00000000 00000000  |................|
+// CHECK:       0020: 00000000 0C000000 00000000 00000000  |................|
+// CHECK:       0030: 06000000                             |....|
+// CHECK:     )
+// CHECK:   }
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK:   Section __debug_frame {
+// CHECK:     0x2C 0 2 0 GENERIC_RELOC_VANILLA 0 __text
+// CHECK:     0x1C 0 2 0 GENERIC_RELOC_VANILLA 0 __text
+// CHECK:   }
+// CHECK: ]