https://github.com/Michael137 commented:
Based on my reading of `2.19 Static and Dynamic Values of Attributes` of the DWARFv5 spec, it sounds like we should be using this approach in many more places than just array bounds. Which makes me wonder: 1. do we already have this functionality elsewhere in LLDB and just need to use it for array bounds? 2. have we mostly been getting away with interpreting attributes as constants because that's how C++ debug-info generally looks like? IIUC other languages (like Ada) have much more dynamic debug-info relying on DWARF expression evaluation. Out of curiosity, what compiler/language is emitting the array bounds you're seeing? 3. we should think about placing this somewhere more common so the other DWARF parser components can make use of it (though that's out of scope of this PR) Regarding testing, it'd be nice we could add unit-tests for the static array bounds (if we don't already have that...just grepping for `DW_AT_upper_bound` in the `lldb/unittests/` directory should tell us that). Looks like we still need the shell test to cover the execution context case https://github.com/llvm/llvm-project/pull/204119 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
