[Lldb-commits] [PATCH] D22132: Support for OCaml native debugging

Elias Boutaleb via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 18 05:34:12 PDT 2016


ebtaleb added a comment.




================
Comment at: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:4315
@@ +4314,3 @@
+                                    if (die.GetLanguage() == lldb::eLanguageTypeOCaml) {
+                                        location.SetLocationListSlide(0);
+                                    } else {
----------------
>From what I understood, when calculating addresses using location lists, 
the location slide is computed as the absolute distance 
between the function low PC and the CU low PC.

Then, in DWARFExpression, when testing whether a variable is available at a given PC,
the Evaluate method computes the absolute address ranges of the location list 
(location list offset - location list slide + function base address) and test if 
the current PC falls into that range.

The naive solution here is not maintainable here.

Is the default behaviour due to something specific to the way Clang generates
location list offsets?

What is the use of location slides when calculating location list addresses?
Can I overwrite location slide setting with a custom DWARF parser?
Or should I include the slide offset in the location list generation in the compiler itself?


https://reviews.llvm.org/D22132





More information about the lldb-commits mailing list