HomePhabricator

[DWARFYAML][debug_gnu_*] Add the missing context `IsGNUStyle`. NFC.

Authored by Higuoxing on Jul 3 2020, 2:56 AM.

Description

[DWARFYAML][debug_gnu_*] Add the missing context IsGNUStyle. NFC.

This patch helps add the missing context IsGNUStyle. Before this patch, yaml2obj cannot parse the YAML description of 'debug_gnu_pubnames' and 'debug_gnu_pubtypes' correctly due to the missing context.

In other words, if we have

DWARF:
  debug_gnu_pubtypes:
    Length:
      TotalLength: 0x1234
    Version:    2
    UnitOffset: 0x1234
    UnitSize:   0x4321
    Entries:
      - DieOffset:  0x12345678
        Name:       abc
        Descriptor: 0x00      ## Descriptor can never be mapped into Entry.Descriptor

yaml2obj will complain that "error: unknown key 'Descriptor'".

This patch helps resolve this problem.

Reviewed By: jhenderson

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