diff options
author | Alon Zakai <azakai@google.com> | 2020-01-23 14:11:15 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-23 14:11:15 -0800 |
commit | a74e9cd840e70cf6350b0c0d971a4316e7c3ee9e (patch) | |
tree | 869d78e48c3b3423b37afd8890a52c430745b492 /third_party/llvm-project/include/llvm/ObjectYAML/DWARFEmitter.h | |
parent | d6d565505076581da85e2fc5044a697a8186abf9 (diff) | |
download | binaryen-a74e9cd840e70cf6350b0c0d971a4316e7c3ee9e.tar.gz binaryen-a74e9cd840e70cf6350b0c0d971a4316e7c3ee9e.tar.bz2 binaryen-a74e9cd840e70cf6350b0c0d971a4316e7c3ee9e.zip |
DWARF: Update .debug_loc (#2616)
Add support for that section to the YAML layer, and add
code to update it.
The updating is slightly tricky - unlike .debug_ranges, the
size of entries is not fixed. So we can't just skip entries,
as the end marker is smaller than a normal entry. Instead,
replace now-invalid segments with (1, 1) which is of size
0 and so should be ignored by the debugger (we can't use
(0, 0) as that would be an end marker, and (-1, *) is
the special base marker).
In the future we probably do want to do this in a more
sophisticated manner, completely rewriting the indexes
into the section as well. For now though this should be
enough for when binaryen does not optimize (as we
don't move/reorder anything).
Note that this doesn't update the location description
(like where on the wasm expression stack the value is).
Again, that is correct for when binaryen doesn't
optimize, but for fully optimized builds we would need
to track things (which would be hard!).
Also clean up some code that uses "Extra" instead of
"Delimiter" that was missed before, and shorten some
unnecessarily long names.
Diffstat (limited to 'third_party/llvm-project/include/llvm/ObjectYAML/DWARFEmitter.h')
-rw-r--r-- | third_party/llvm-project/include/llvm/ObjectYAML/DWARFEmitter.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/third_party/llvm-project/include/llvm/ObjectYAML/DWARFEmitter.h b/third_party/llvm-project/include/llvm/ObjectYAML/DWARFEmitter.h index 85bc81c60..b4d62f44d 100644 --- a/third_party/llvm-project/include/llvm/ObjectYAML/DWARFEmitter.h +++ b/third_party/llvm-project/include/llvm/ObjectYAML/DWARFEmitter.h @@ -33,6 +33,7 @@ void EmitDebugStr(raw_ostream &OS, const Data &DI); void EmitDebugAranges(raw_ostream &OS, const Data &DI); void EmitDebugRanges(raw_ostream &OS, const Data &DI); // XXX BINARYEN +void EmitDebugLoc(raw_ostream &OS, const Data &DI); // XXX BINARYEN void EmitPubSection(raw_ostream &OS, const PubSection &Sect, bool IsLittleEndian); void EmitDebugInfo(raw_ostream &OS, const Data &DI); |