[Lldb-commits] [lldb] [lldb] optionally match the `__debug` namespace for libstdc++ containers. (PR #140727)

2025-05-21 Thread Michael Buch via lldb-commits
@@ -2,10 +2,14 @@ Test lldb data formatter subsystem. """ - -import lldb -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import add_test_categories, expectedFailureAll, skip +from lldbsuite.test.lldbtest import (

[Lldb-commits] [lldb] [lldb] optionally match the `__debug` namespace for libstdc++ containers. (PR #140727)

2025-05-21 Thread Michael Buch via lldb-commits
@@ -1731,8 +1737,11 @@ lldb::TypeCategoryImplSP CPlusPlusLanguage::GetFormatters() { DataVisualization::Categories::GetCategory(ConstString(GetPluginName()), g_category); if (g_category) { - LoadLibStdcppFormatters(g_

[Lldb-commits] [lldb] [lldb] optionally match the `__debug` namespace for libstdc++ containers. (PR #140727)

2025-05-21 Thread Michael Buch via lldb-commits
@@ -48,10 +65,13 @@ def cleanup(): self.runCmd("frame variable ii --show-types") +match = f"std::{namespace}map<" self.runCmd( -'type summary add -x "std::map<" --summary-string "map has ${svar%#} items" -e' +f'type summary ad

[Lldb-commits] [lldb] [lldb] optionally match the `__debug` namespace for libstdc++ containers. (PR #140727)

2025-05-21 Thread Michael Buch via lldb-commits
@@ -19,9 +23,22 @@ def setUp(self): @add_test_categories(["libstdcxx"]) @expectedFailureAll(bugnumber="llvm.org/pr50861", compiler="gcc") def test_with_run_command(self): +build_args = {"EXE": "a.out"} +self.with_run_command("", build_args) + +@a

[Lldb-commits] [lldb] [LLDB] Avoid crashes when inspecting MSVC STL types (PR #140761)

2025-05-21 Thread Michael Buch via lldb-commits
@@ -74,9 +74,11 @@ lldb::ChildCacheState GenericOptionalFrontend::Update() { if (m_stdlib == StdLib::LibCxx) engaged_sp = m_backend.GetChildMemberWithName("__engaged_"); - else if (m_stdlib == StdLib::LibStdcpp) -engaged_sp = m_backend.GetChildMemberWithName("_M_pay

[Lldb-commits] [lldb] [LLDB] Avoid crashes when inspecting MSVC STL types (PR #140761)

2025-05-21 Thread Michael Buch via lldb-commits
@@ -379,7 +379,7 @@ LibStdcppSharedPtrSyntheticFrontEnd::CalculateNumChildren() { lldb::ValueObjectSP LibStdcppSharedPtrSyntheticFrontEnd::GetChildAtIndex(uint32_t idx) { - if (idx == 0) + if (idx == 0 && m_ptr_obj) Michael137 wrote: ```suggestion if (!m

[Lldb-commits] [lldb] [LLDB] Avoid crashes when inspecting MSVC STL types (PR #140761)

2025-05-21 Thread Michael Buch via lldb-commits
@@ -683,14 +683,14 @@ def _get_compilation_command(self, source, obj): args.append("-fms-compatibility-version=19") args.append("/c") +if self.std: Michael137 wrote: Why is this change necessary? https://github.com/llvm/llvm-proje

[Lldb-commits] [lldb] [LLDB] Avoid crashes when inspecting MSVC STL types (PR #140761)

2025-05-21 Thread Michael Buch via lldb-commits
@@ -0,0 +1,57 @@ +// clang-format off + +// REQUIRES: target-windows +// RUN: %build --compiler=clang-cl -o %t.exe --std c++20 -- %s +// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -o "b main" -o "run" -o "fr v" -o c | FileCheck %s + +#include Michael1

[Lldb-commits] [lldb] [LLDB] Avoid crashes when inspecting MSVC STL types (PR #140761)

2025-05-21 Thread Michael Buch via lldb-commits
https://github.com/Michael137 commented: Seems like a fine stop-gap for now to avoid crashing Just left some clarification questions https://github.com/llvm/llvm-project/pull/140761 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lis

[Lldb-commits] [lldb] [LLDB] Avoid crashes when inspecting MSVC STL types (PR #140761)

2025-05-21 Thread Michael Buch via lldb-commits
Michael137 wrote: FYI @charles-zablit https://github.com/llvm/llvm-project/pull/140761 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][AArch64] Correctly invalidate svg when vg is written (PR #140875)

2025-05-21 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/140875 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][AArch64] Correctly invalidate svg when vg is written (PR #140875)

2025-05-21 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/140875 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][AArch64] Correctly invalidate svg when vg is written (PR #140875)

2025-05-21 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/140875 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Ptrace seize dead processes on Linux (PR #137041)

2025-05-21 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/137041 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Avoid crashes when inspecting MSVC STL types (PR #140761)

2025-05-21 Thread Michael Buch via lldb-commits
@@ -0,0 +1,57 @@ +// clang-format off + +// REQUIRES: target-windows +// RUN: %build --compiler=clang-cl -o %t.exe --std c++20 -- %s +// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -o "b main" -o "run" -o "fr v" -o c | FileCheck %s + +#include Michael1

[Lldb-commits] [lldb] [Demangling] Refactor Demangler range tracking (PR #140762)

2025-05-21 Thread Michael Buch via lldb-commits
@@ -59,10 +59,24 @@ struct DemangledNameInfo { /// \endcode std::pair QualifiersRange; + /// Indicates the [start, end) of the function's prefix. This is a + /// catch-all range for anything that is not tracked by the rest of + /// the pairs. + std::pair PrefixRange; +

[Lldb-commits] [lldb] [Demangling] Refactor Demangler range tracking (PR #140762)

2025-05-21 Thread Michael Buch via lldb-commits
@@ -59,10 +59,24 @@ struct DemangledNameInfo { /// \endcode std::pair QualifiersRange; + /// Indicates the [start, end) of the function's prefix. This is a + /// catch-all range for anything that is not tracked by the rest of + /// the pairs. + std::pair PrefixRange; +

[Lldb-commits] [lldb] [lldb][AArch64] Correctly invalidate svg when vg is written (PR #140875)

2025-05-21 Thread David Spickett via lldb-commits
DavidSpickett wrote: Candidates for how it ever worked: * Out of bounds write managing to break something else in just the right way. Then adding new extension registers meant it was invalidating registers again, probably guarded control stack registers. * LLDB got less aggressive about re-read

[Lldb-commits] [clang] [flang] [lld] [lldb] [llvm] [mlir] [polly] [CMake] respect LLVMConfig.cmake's LLVM_DEFINITIONS in standalone builds (PR #138587)

2025-05-21 Thread Martin Storsjö via lldb-commits
https://github.com/mstorsjo approved this pull request. LGTM IIRC @petrhosek had commented on this before, and was generally in favour of it, but I'd still leave it open for a couple days if he wants to comment further on it. https://github.com/llvm/llvm-project/pull/138587 __

[Lldb-commits] [lldb] [Demangling] Refactor Demangler range tracking (PR #140762)

2025-05-21 Thread Michael Buch via lldb-commits
@@ -88,6 +88,7 @@ struct Entry { FunctionNameWithArgs, FunctionNameNoArgs, FunctionMangledName, +FunctionPrefix, Michael137 wrote: If we add a new variable here we will need to update the documentation under `lldb/docs/use/formatting.rst` htt

[Lldb-commits] [lldb] [LLDB] Ptrace seize dead processes on Linux (PR #137041)

2025-05-21 Thread David Spickett via lldb-commits
DavidSpickett wrote: > I added my gist to the description, let me know what you think This part looks good, that'll be enough to test this / explain why it exists. https://github.com/llvm/llvm-project/pull/137041 ___ lldb-commits mailing list lldb-com

[Lldb-commits] [lldb] [Demangling] Refactor Demangler range tracking (PR #140762)

2025-05-21 Thread Michael Buch via lldb-commits
@@ -6,7 +6,7 @@ add_lldb_unittest(LLDBCoreTests DumpDataExtractorTest.cpp DumpRegisterInfoTest.cpp FormatEntityTest.cpp - MangledTest.cpp + ItaniumMangledTest.cpp Michael137 wrote: I don't mind renaming the file but there are already swift mangling tes

<    1   2