[PATCH] D102603: [llvm-objdump] Print the DEBUG type under `--section-headers`.

Xing GUO via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 17 19:56:52 PDT 2021


Higuoxing added inline comments.


================
Comment at: llvm/test/tools/llvm-objdump/ELF/PowerPC/section-headers-debug.test:30
+    Flags:           [ SHF_WRITE, SHF_ALLOC ]
+    Content:         '00000000000000000000000000000000'
+  - Name:            .bss
----------------
You can specify the 'Size' field of the section rather than the 'Content' field, e.g.,

```
- Name:   .data
  Type:   SHT_PROGBITS
  Flags:  [ SHF_WRITE, SHF_ALLOC ]
  Size:   0x10
```


================
Comment at: llvm/test/tools/llvm-objdump/ELF/PowerPC/section-headers-debug.test:43
+    Content:         3600000004001B000000
+
----------------
Nit: remove the blank line.


================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:1717
+    if (Section.isDebugSection())
+      Type += Type.empty() ? "DEBUG" : "DEBUG";
 
----------------
I think we need some tests to check the output when the section has multiple types, e.g., 'DATA' and 'DEBUG'.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102603



More information about the llvm-commits mailing list