zequanwu added inline comments.
================ Comment at: lldb/source/Core/Address.cpp:739 - s->PutCString(", location = "); - var_sp->DumpLocationForAddress(s, *this); - s->PutCString(", decl = "); ---------------- labath wrote: > This place was the only caller of Variable::DumpLocationForAddress. What if > we, instead of duplicating its logic here, just change the function to do > what we want? > The interface could be as simple as `Variable::DumpLocations(Stream&, > Address)` where, if one provides an invalid Address, then all locations get > dumped, and one can request a specific location by providing a concrete > address. > We might even do something similar for the DWARFExpression class, and avoid > the filter callbacks completely. I just moved the filter inside `Variable::DumpLocations`, because we still need to pass the filter callback to `DWARFExpression::DumpLocaitons` inside `Variable::DumpLocaitons` to choose dumping all ranges + locations or just one range location. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119963/new/ https://reviews.llvm.org/D119963 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits