[Lldb-commits] [PATCH] D145245: [lldb] Ignore libcxx std::ranges global variables in frame var

Michael Buch via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 3 07:04:47 PST 2023


Michael137 created this revision.
Michael137 added a reviewer: aprantl.
Herald added a project: All.
Michael137 requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

The motivation is to avoid cluttering LLDB's global variable view for
std::ranges users.

Before:

  (lldb) frame var -g
  ...
  (const std::ranges::__end::__fn) std::__1::ranges::__cpo::end = {}
  (const std::ranges::views::__all::__fn) std::__1::ranges::views::__cpo::all = {}
  (const std::ranges::__begin::__fn) std::__1::ranges::__cpo::begin = {}
  (const std::ranges::views::__take::__fn) std::__1::ranges::views::__cpo::take = {}
  (const std::ranges::__max_element::__fn) std::__1::ranges::__cpo::max_element = {}
  (const std::ranges::__size::__fn) std::__1::ranges::__cpo::size = {}
  (const std::ranges::__data::__fn) std::__1::ranges::__cpo::data = {}

After this patch none of these __cpo variables would show up.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145245

Files:
  lldb/include/lldb/Target/LanguageRuntime.h
  lldb/source/Core/ValueObject.cpp
  lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
  lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
  lldb/test/API/lang/cpp/hide_global_ranges_vars/Makefile
  lldb/test/API/lang/cpp/hide_global_ranges_vars/TestHideGlobalRangesVars.py
  lldb/test/API/lang/cpp/hide_global_ranges_vars/main.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145245.502125.patch
Type: text/x-patch
Size: 5208 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230303/e0679818/attachment.bin>


More information about the lldb-commits mailing list