Skip to content

Commit

Permalink
[DWARFYAML] Add support for emitting multiple abbrev tables.
Browse files Browse the repository at this point in the history
This patch adds support for emitting multiple abbrev tables. Currently,
compilation units will always reference the first abbrev table.

Reviewed By: jhenderson, labath

Differential Revision: https://reviews.llvm.org/D86194
  • Loading branch information
higuoxing committed Aug 21, 2020
1 parent 16f27e1 commit e151acc
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml
Expand Up @@ -902,3 +902,24 @@ DWARF:
- AbbrCode: 1
Values:
- Value: 0x1234

## n) Test that yaml2obj emits an error message when a compilation unit has values but there is no associated abbrev table.

## RUN: not yaml2obj --docnum=16 %s 2>&1 | FileCheck %s --check-prefix=NO-ABBREV

# NO-ABBREV: yaml2obj: error: non-empty compilation unit should have an associated abbrev table

--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
DWARF:
debug_info:
- Version: 4
AbbrOffset: 0x00
Entries:
- AbbrCode: 1
Values:
- Value: 0x1234

0 comments on commit e151acc

Please sign in to comment.