[PATCH] D80972: [ObjectYAML][DWARF] Support emitting the .debug_aranges section in ELFYAML.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 3 03:48:19 PDT 2020


grimar added inline comments.


================
Comment at: llvm/test/tools/yaml2obj/ELF/DWARF/debug-aranges.yaml:106
+    Type:    SHT_PROGBITS
+    Content: "0000002C00020000000008000000000000000000000012340000000000000020000000000000000000000000000000000000002C0002000000650800000000000000000000005678000000000000002000000000000000000000000000000000"
+
----------------
Higuoxing wrote:
> grimar wrote:
> > I wonder if we need to test such things?
> > 
> > The `Content` is a key that is often used to emit some broken output.
> > So why not just to test that we can emit an arbitrary content, e.g.: `Content: "112233"`?
> I want to test the default values of section header, e.g., sh_info/link/... and reuse the check tag: DWARF-BE-DEFAULT. What about having 2 check tags: DWARF-BE-HEADER, DWARF-BE-CONTENT
> 
> ```
> # RUN: yaml2obj --docnum=1 %s -o %t1.o
> # RUN: llvm-readobj --sections --section-data %t1.o | FileCheck --check-prefixes=DWARF-BE-HEADER,DWARF-BE-CONTENT
> 
> #      DWARF-BE-HEADER: Index: 1
> # DWARF-BE-HEADER-NEXT: Name:  .debug_aranges
> ...
> #      DWARF-BE-CONTENT: SectionData (
> # DWARF-BE-CONTENT-NEXT:   ...
> 
> # RUN: yaml2obj --docnum=2 %s -o %t2.o
> # RUN: llvm-readobj --sections --section-data %t2.o | FileCheck --check-prefixes=DWARF-BE-HEADER,ARBITRARY-CONTENT
> 
> #      ARBITRARY-CONTENT: SectionData (
> # ARBITRARY-CONTENT-NEXT:   ...
> 
> ```
Having 2 tags sounds fine to me.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80972





More information about the llvm-commits mailing list