[LLDB] Dump valid ranges of variables
authorZequan Wu <zequanwu@google.com>
Wed, 16 Feb 2022 19:18:54 +0000 (11:18 -0800)
committerZequan Wu <zequanwu@google.com>
Wed, 2 Mar 2022 21:44:19 +0000 (13:44 -0800)
commit15983c28aa819031e08a2b3fe49d02c41839b22c
treea7a04167ef981db6da7314da3883ea3cfc03b56e
parentc33dbc2a2dfcdaed22f156efdc38e4ff215c972f
[LLDB] Dump valid ranges of variables

This allows `image lookup -a ... -v` to print variables only if the given
address is covered by the valid ranges of the variables. Since variables created
in dwarf plugin always has empty scope range, print the variable if it has
empty scope.

Differential Revision: https://reviews.llvm.org/D119963
16 files changed:
lldb/include/lldb/Core/Address.h
lldb/include/lldb/Expression/DWARFExpression.h
lldb/include/lldb/Symbol/Variable.h
lldb/source/Commands/CommandObjectTarget.cpp
lldb/source/Commands/Options.td
lldb/source/Core/Address.cpp
lldb/source/Expression/DWARFExpression.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Symbol/Variable.cpp
lldb/test/Shell/SymbolFile/DWARF/x86/DW_AT_loclists_base.s
lldb/test/Shell/SymbolFile/DWARF/x86/debug_loc.s
lldb/test/Shell/SymbolFile/DWARF/x86/debug_loc_and_loclists.s
lldb/test/Shell/SymbolFile/DWARF/x86/debug_loclists-dwo.s
lldb/test/Shell/SymbolFile/DWARF/x86/debug_loclists-dwp.s
lldb/test/Shell/SymbolFile/DWARF/x86/dwp.s
lldb/test/Shell/SymbolFile/DWARF/x86/unused-inlined-params.test