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

Xing GUO via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 00:35:42 PDT 2020


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


================
Comment at: llvm/include/llvm/ObjectYAML/DWARFYAML.h:190
+  dwarf::LocationAtom Operator;
+  std::vector<yaml::Hex64> Values;
+};
----------------
Higuoxing wrote:
> There are some operators that take a size and a block of that size. I'm not sure if it's ok to use a `std::vector<>` here.
I think we can add a new field called `BlockSize` which is used to overwrite the size of blocks.

```
struct DWARFOperation {
  dwarf::LocationAtom Operator;
  Optional<yaml::Hex64> BlockSize;
  std::vector<yaml::Hex64> Values;
};
```

e.g., `DW_OP_implicit_value` takes two operands, the first operand is an ULEB128 size, the second operand is a block of that size. We can use `std::vector<yaml::Hex64>` to hold a series of bytes, and the size of this block can be overwritten by `BlockSize`.


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