[PATCH] D83116: [DWARFYAML] Add support for emitting multiple abbrev tables.

Xing GUO via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 3 02:40:02 PDT 2020


Higuoxing added a comment.

In D83116#2130019 <https://reviews.llvm.org/D83116#2130019>, @labath wrote:

> What would you say if, instead of `AbbrevTableIndex`, we had a field like `AbbrevTableID`. The main difference would be that this "ID" field can be explicitly specified on the Abbrev table, and it does not have to be a sequentially increasing number (though it could of course be that by default).


I think it works. I'm fine with this approach, let's see what others thinking. Thanks a lot for sharing your ideas!

  debug_abbrev:
    - ID: 1
      Table:
        - Code: 1
          Tag:  DW_TAG_something
          Children: DW_CHILDREN_yes
          Attributes:
            - Attribute: DW_AT_something
              Form:      DW_FORM_something
    - ID: 2
      Table:
        - Code: 1
          Tag:  DW_TAG_something
          Children: DW_CHILDREN_yes
          Attributes:
            - Attribute: DW_AT_something
              Form:      DW_FORM_something
    - ID: 3
      Table:
        - Code: 1
          Tag:  DW_TAG_something
          Children: DW_CHILDREN_yes
          Attributes:
            - Attribute: DW_AT_something
              Form:      DW_FORM_something
  
  debug_info:
    - Length:        0x1234
      Version:       4
      AbbrevTableID: 3 ## references table 3
      ...
      Entries:
        - AbbrevCode: 1
          Values:
            - Value: 0x1234
    - Length:        0x1234
      Version:       4
      AbbrevTableID: 2 ## references table 2
      ...
      Entries:
        - AbbrevCode: 1
          Values:
            - Value: 0x1234
    - Length:        0x1234
      Version:       4
      AbbrevTableID: 1 ## references table 1
      ...
      Entries:
        - AbbrevCode: 1
          Values:
            - Value: 0x1234




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83116/new/

https://reviews.llvm.org/D83116





More information about the llvm-commits mailing list