Files
clang-p2996/lldb/lit/Modules/Breakpad/discontiguous-sections.test
Pavel Labath ed42ea4707 ObjectFileBreakpad: Implement sections
Summary:
This patch allows ObjectFileBreakpad to parse the contents of Breakpad
files into sections. This sounds slightly odd at first, but in essence
its not too different from how other object files handle things. For
example in elf files, the symtab section consists of a number of
"records", where each record represents a single symbol. The same is
true for breakpad's PUBLIC section, except in this case, the records will be
textual instead of binary.

To keep sections contiguous, I create a new section every time record
type changes. Normally, the breakpad processor will group all records of
the same type in one block, but the format allows them to be intermixed,
so in general, the "object file" may contain multiple sections with the
same record type.

Reviewers: clayborg, zturner, lemo, markmentovai, amccarth

Subscribers: lldb-commits

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

llvm-svn: 350511
2019-01-07 11:14:08 +00:00

28 lines
767 B
Plaintext

# Test handling discontiguous sections.
RUN: lldb-test object-file %p/Inputs/discontiguous-sections.syms -contents | FileCheck %s
CHECK: Showing 5 sections
CHECK: ID: 0x1
CHECK-NEXT: Name: MODULE
CHECK: ID: 0x2
CHECK-NEXT: Name: INFO
CHECK: ID: 0x3
CHECK-NEXT: Name: FILE
CHECK: File size: 16
CHECK-NEXT: Data: (
CHECK-NEXT: 0000: 46494C45 2030202F 746D702F 612E630A |FILE 0 /tmp/a.c.|
CHECK-NEXT: )
CHECK: ID: 0x4
CHECK-NEXT: Name: PUBLIC
CHECK: ID: 0x5
CHECK-NEXT: Name: FILE
CHECK: File size: 16
CHECK-NEXT: Data: (
CHECK-NEXT: 0000: 46494C45 2031202F 746D702F 622E630A |FILE 1 /tmp/b.c.|
CHECK-NEXT: )