[PATCH] D84234: [DWARFYAML] Implement the .debug_loclists section.

Xing GUO via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 02:37:34 PDT 2020


Higuoxing marked an inline comment as done.
Higuoxing added inline comments.


================
Comment at: llvm/test/tools/yaml2obj/ELF/DWARF/debug-loclists.yaml:22-92
+# DWARF32-LE-NEXT:   0000: 3D000000 05000800 03000000 0C000000  |=...............|
+##                         ^-------                             unit_length (4-byte)
+##                                  ^---                        version (2-byte)
+##                                      ^-                      address_size (1-byte)
+##                                        ^-                    segment_selector_size (1-byte)
+##                                           ^-------           offset_entry_count (4-byte)
+##                                                    ^-------  offsets[0] (4-byte)
----------------
labath wrote:
> Higuoxing wrote:
> > labath wrote:
> > > Would it be better to verify this structurally by checking llvm-dwarfdump output ?
> > Hi @labath, I've tested the generated sections using llvm-dwarfdump on my local machine. We usually check the hex dump of sections to "bootstrap" yaml2obj. You can take a look at this thread :-) https://reviews.llvm.org/D82367#2134629
> I see. That makes sense. Thanks for the pointer.
I'm wondering if it's helpful to put the output of `llvm-dwarfdump` in comments. e.g.,

```
## $ llvm-dwarfdump --debug-loclists -v %t.o
## .debug_loclists contents:
## 0x00000000: locations list header: length = 0x00000023, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000002
## offsets: [
## 0x00000010 => 0x00000024
## 0x0000001a => 0x0000002e
## ]
## 0x00000024: 
##             DW_LLE_startx_endx     (0x0000000000001234, 0x0000000000004321): DW_OP_consts +4660
##             DW_LLE_end_of_list     ()
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84234





More information about the llvm-commits mailing list