[Lldb-commits] [lldb] [lldb][test] Add a new __compressed_pair layout to libcxx simulator tests (PR #99012)

2024-09-16 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/99012 >From 8d0245dfccc607a4237fc94bbbfea646fa1a6887 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 10 Jul 2024 15:37:45 +0100 Subject: [PATCH 1/4] [WIP][lldb][test] Add a new __compressed_pair layout to li

[Lldb-commits] [lldb] 9548dbe - [lldb][test] Add TestNoUniqueAddress.py

2024-09-16 Thread Michael Buch via lldb-commits
Author: Michael Buch Date: 2024-09-16T12:05:00+01:00 New Revision: 9548dbedbc1b2bfb130c91df54e8007acb81e1b0 URL: https://github.com/llvm/llvm-project/commit/9548dbedbc1b2bfb130c91df54e8007acb81e1b0 DIFF: https://github.com/llvm/llvm-project/commit/9548dbedbc1b2bfb130c91df54e8007acb81e1b0.diff

[Lldb-commits] [lldb] [lldb/DWARF] Downgrade the "parent of variable is not CU" error (PR #108806)

2024-09-16 Thread Michael Buch via lldb-commits
Michael137 wrote: Ahh thanks for the clarification. Makes sense. Sounds like a situation where this would arise is: ``` struct Foo { static int bar; }; int Foo::bar = 5; int main() { static bool bar = false __builtin_debugtrap(); } ``` Doing `(lldb) target var bar` would produce this er

[Lldb-commits] [lldb] [lldb/DWARF] Downgrade the "parent of variable is not CU" error (PR #108806)

2024-09-16 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. https://github.com/llvm/llvm-project/pull/108806 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/DWARF] Downgrade the "parent of variable is not CU" error (PR #108806)

2024-09-16 Thread Michael Buch via lldb-commits
@@ -3828,10 +3828,8 @@ void SymbolFileDWARF::ParseAndAppendGlobalVariable( break; default: -GetObjectFile()->GetModule()->ReportError( -"didn't find appropriate parent DIE for variable list for {0:x8} " -"{1} ({2}).\n", -die.GetID(), DW_TAG_va

[Lldb-commits] [lldb] [lldb][test] Add a new __compressed_pair layout to libcxx simulator tests (PR #99012)

2024-09-16 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/99012 >From 8d0245dfccc607a4237fc94bbbfea646fa1a6887 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 10 Jul 2024 15:37:45 +0100 Subject: [PATCH 1/5] [WIP][lldb][test] Add a new __compressed_pair layout to li

[Lldb-commits] [lldb] [lldb][test] Add a new __compressed_pair layout to libcxx simulator tests (PR #99012)

2024-09-16 Thread Michael Buch via lldb-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/99012 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][FrameRecognizer] Display the first non-std frame on verbose_trap (PR #108825)

2024-09-16 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/108825 This attempts to improve user-experience when LLDB stops on a verbose_trap. Currently if a `__builtin_verbose_trap` triggers, we display the first frame above the call to the verbose_trap. So in the newly ad

[Lldb-commits] [lldb] [lldb][FrameRecognizer] Display the first non-std frame on verbose_trap (PR #108825)

2024-09-16 Thread Michael Buch via lldb-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/108825 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add AST node classes, functions, etc. for Data Inspection Lang… (PR #95738)

2024-09-16 Thread Michael Buch via lldb-commits
Michael137 wrote: Is the plan to get the DIL data structures merged before the rest of the patch series is up for review? I think it'd be great to see how the infrastructure introduced here will be used https://github.com/llvm/llvm-project/pull/95738 ___

[Lldb-commits] [libcxx] [lldb] [lldb][libc++] Hide all libc++ implementation details from stacktraces (PR #108870)

2024-09-17 Thread Michael Buch via lldb-commits
Michael137 wrote: When you're stopped in a frame and you have libc++ frames above you in the backtrace, you're either stopped in a callback (like `std::function`, `std::make_unique`, `std::sort`), or you're deliberately stepping into libc++ code. For the latter, you probably don't want to hide

[Lldb-commits] [lldb] [LLDB] Add AST node classes, functions, etc. for Data Inspection Lang… (PR #95738)

2024-09-17 Thread Michael Buch via lldb-commits
Michael137 wrote: > > Is the plan to get the DIL data structures merged before the rest of the > > patch series is up for review? I think it'd be great to see how the > > infrastructure introduced here will be used > > There are 3 major pieces to the DIL implementation (soon to be 4, once I've

[Lldb-commits] [lldb] [lldb/DWARF] Cache negative results of variable parsing (PR #108810)

2024-09-17 Thread Michael Buch via lldb-commits
https://github.com/Michael137 commented: Are there cases where we fail to `ParseVariableDIE` the first time around but could succeed later on in the debug sessions? This comment seems to suggest that's possible: https://github.com/llvm/llvm-project/blob/bbab5e47c17c0ebc9dfe20f43c8aeaae95f37b9e

[Lldb-commits] [lldb] [lldb][FrameRecognizer] Display the first non-std frame on verbose_trap (PR #108825)

2024-09-17 Thread Michael Buch via lldb-commits
@@ -0,0 +1,13 @@ +# Tests that we show the first non-STL frame when +# a verbose_trap triggers from within the STL. + +# UNSUPPORTED: system-windows +# +# RUN: %clang_host -g -O0 %S/Inputs/verbose_trap-in-stl-nested.cpp -o %t.out +# RUN: %lldb -b -s %s %t.out | FileCheck %s --chec

[Lldb-commits] [clang] [lldb] Reland "[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers" (PR #71780)

2023-11-20 Thread Michael Buch via lldb-commits
Michael137 wrote: > I'm unclear on the specifics of the check, but it's probably something we can > adjust if that is the long-term solution. > > CC @petrhosek Since he was interested in getting this resolved soon. There's a few things left to iron out with https://github.com/llvm/llvm-projec

[Lldb-commits] [lldb] [LLDB] Respect the DW_AT_alignment attribute. (PR #73307)

2023-11-24 Thread Michael Buch via lldb-commits
@@ -1926,12 +1930,13 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc, // TypeSystemClang is always in C++ mode, but some compilers such as // GCC and Clang give empty structs a size of 0 in C mode (in contrast to // the size of 1 for emp

[Lldb-commits] [lldb] [LLDB] Respect the DW_AT_alignment attribute. (PR #73307)

2023-11-27 Thread Michael Buch via lldb-commits
@@ -1926,12 +1930,13 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc, // TypeSystemClang is always in C++ mode, but some compilers such as // GCC and Clang give empty structs a size of 0 in C mode (in contrast to // the size of 1 for emp

[Lldb-commits] [clang] [lldb] Reland "[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers" (PR #71780)

2023-11-27 Thread Michael Buch via lldb-commits
Michael137 wrote: > Can we add back the constant to the declaration? It's been a week and the > progress on #72730 seems to have stalled while our builders are still broken. Yup will do, apologies for the noise https://github.com/llvm/llvm-project/pull/71780 ___

[Lldb-commits] [lldb] [LLDB] Respect the DW_AT_alignment attribute. (PR #73307)

2023-11-28 Thread Michael Buch via lldb-commits
Michael137 wrote: LGTM, I don't expect this to change with any of the other outstanding bugs, so seems fine to merge now https://github.com/llvm/llvm-project/pull/73307 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/c

[Lldb-commits] [lldb] [lldb][test] TestConstStaticIntegralMember: relax assertion on number of global variables (PR #73707)

2023-11-28 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/73707 In https://github.com/llvm/llvm-project/pull/73626 we started attaching `DW_AT_const_value`s on a static data-member's declaration again. In DWARFv5, those static members are represented with a `DW_TAG_variab

[Lldb-commits] [lldb] [lldb][test] TestConstStaticIntegralMember: relax assertion on number of global variables (PR #73707)

2023-11-28 Thread Michael Buch via lldb-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/73707 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang][NFC] Remove redundant parameter to AddMethodToObjCObjectType (PR #73832)

2023-11-29 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/73832 This parameter isn't used (neither in upstream LLVM nor in the Apple fork). This patch removes it. This parameter seems to have been unused since its introduction in `0f581665b768d100eece196e59b00eb16e7e

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang][NFCI] Make ParsedDWARFTypeAttributes parameter const (PR #73833)

2023-11-29 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/73833 This will make future refactorings of `ParseSubroutine` simpler. Depends on https://github.com/llvm/llvm-project/pull/73832 >From a8aa1c80c5ce7debaea356815d8a3b0a83b976f0 Mon Sep 17 00:00:00 2001 From: Michae

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang][NFC] Remove redundant parameter to AddMethodToObjCObjectType (PR #73832)

2023-11-29 Thread Michael Buch via lldb-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/73832 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang][NFCI] Make ParsedDWARFTypeAttributes parameter const (PR #73833)

2023-11-29 Thread Michael Buch via lldb-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/73833 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [clang][DebugInfo] Revert "emit variable definitions for constant-initialized static data-members" (PR #74580)

2023-12-06 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/74580 This commit reverts the changes in https://github.com/llvm/llvm-project/pull/71780 and all of its follow-up patches. We got reports of the `.debug_names/.debug_gnu_pubnames/gdb_index/etc.` sections growing

[Lldb-commits] [clang] [lldb] [clang][DebugInfo] Revert "emit definitions for constant-initialized static data-members" (PR #74580)

2023-12-06 Thread Michael Buch via lldb-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/74580 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [clang] [clang][DebugInfo] Revert "emit definitions for constant-initialized static data-members" (PR #74580)

2023-12-06 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/74580 >From fe9624fdf898a2a629bb34f070d0e084f6dc0aa9 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 5 Dec 2023 14:52:00 + Subject: [PATCH 1/2] [clang][DebugInfo] Revert "emit variable definitions for co

[Lldb-commits] [clang] [lldb] [clang][DebugInfo] Revert "emit definitions for constant-initialized static data-members" (PR #74580)

2023-12-06 Thread Michael Buch via lldb-commits
Michael137 wrote: > Do you need me to merge that for you? Was going to wait until some more people had the chance to look. But if urgent, I don't think there should be any trouble merging this sooner https://github.com/llvm/llvm-project/pull/74580 __

[Lldb-commits] [clang] [lldb] [clang][DebugInfo] Revert "emit definitions for constant-initialized static data-members" (PR #74580)

2023-12-06 Thread Michael Buch via lldb-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/74580 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [clang][DebugInfo] Revert "emit definitions for constant-initialized static data-members" (PR #74580)

2023-12-06 Thread Michael Buch via lldb-commits
Michael137 wrote: > > To support access to such constants from LLDB we'll most likely have to > > have to make LLDB find the constants by looking at the containing class > > first. > > Tangentially related to: > https://discourse.llvm.org/t/rfc-improve-dwarf-5-debug-names-type-lookup-parsing-

[Lldb-commits] [clang] [lldb] [clang][DebugInfo] Revert "emit definitions for constant-initialized static data-members" (PR #74580)

2023-12-06 Thread Michael Buch via lldb-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/74580 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 7de53a8 - [lldb][test] TestConstStaticIntegralMember.py: un-XFAIL tests for DWARFv5

2023-12-07 Thread Michael Buch via lldb-commits
Author: Michael Buch Date: 2023-12-07T11:38:26Z New Revision: 7de53a8cfe45f60334dc3765c0bfc94beaf09883 URL: https://github.com/llvm/llvm-project/commit/7de53a8cfe45f60334dc3765c0bfc94beaf09883 DIFF: https://github.com/llvm/llvm-project/commit/7de53a8cfe45f60334dc3765c0bfc94beaf09883.diff LOG:

[Lldb-commits] [lldb] [lldb][Symbol] Make sure we decrement PC before checking location list (PR #74772)

2023-12-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/74772 In optimized code we can end up with return address being the next instruction in a different block. If we are dealing with location lists, we want to decrement the PC value so it's within the calling block r

[Lldb-commits] [lldb] [lldb][Symbol] Make sure we decrement PC before checking location list (PR #74772)

2023-12-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/74772 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][Symbol] Make sure we decrement PC before checking location list (PR #74772)

2023-12-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/74772 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [SymbolFileDWARF][NFC] Remove duplicated code checking for type tags (PR #74773)

2023-12-07 Thread Michael Buch via lldb-commits
@@ -2947,29 +2951,18 @@ TypeSP SymbolFileDWARF::FindCompleteObjCDefinitionTypeForDIE( m_index->GetCompleteObjCClass( type_name, must_be_implementation, [&](DWARFDIE type_die) { -bool try_resolving_type = false; - // Don't try and resolve the DIE we ar

[Lldb-commits] [lldb] [SymbolFileDWARF][NFC] Remove duplicated code checking for type tags (PR #74773)

2023-12-07 Thread Michael Buch via lldb-commits
@@ -3128,36 +3121,11 @@ SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext(const DWARFDIE &die) { if (type_system && !type_system->SupportsLanguage(GetLanguage(*type_die.GetCU( return true; - bool try_resolving_type = false; - // Don

[Lldb-commits] [lldb] [SymbolFileDWARF][NFC] Remove duplicated code checking for type tags (PR #74773)

2023-12-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/74773 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][Symbol] Make sure we decrement PC before checking location list (PR #74772)

2023-12-07 Thread Michael Buch via lldb-commits
Michael137 wrote: > This looks good to me. Do you think we take the frame variable test in > API/functionalities/location-list-lookup/TestLocationListLookup.py and add it > to your test? They're testing the same thing, and getting there the same way > so I'm not sure there's value to having th

[Lldb-commits] [lldb] [lldb][Symbol] Make sure we decrement PC before checking location list (PR #74772)

2023-12-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/74772 >From 2352f67789c04f86c8a0f7ad8940d782288750b8 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 7 Dec 2023 21:35:41 + Subject: [PATCH 1/2] [lldb][Symbol] Make sure we decrement PC before checking lo

[Lldb-commits] [lldb] [lldb][Symbol] Make sure we decrement PC before checking location list (PR #74772)

2023-12-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/74772 >From 2352f67789c04f86c8a0f7ad8940d782288750b8 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 7 Dec 2023 21:35:41 + Subject: [PATCH 1/3] [lldb][Symbol] Make sure we decrement PC before checking lo

[Lldb-commits] [lldb] [lldb][Symbol] Make sure we decrement PC before checking location list (PR #74772)

2023-12-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/74772 >From 2352f67789c04f86c8a0f7ad8940d782288750b8 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 7 Dec 2023 21:35:41 + Subject: [PATCH 1/4] [lldb][Symbol] Make sure we decrement PC before checking lo

[Lldb-commits] [lldb] [lldb][Symbol] Make sure we decrement PC before checking location list (PR #74772)

2023-12-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/74772 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [clang] fixing issue #64441 (PR #74814)

2023-12-08 Thread Michael Buch via lldb-commits
@@ -56,10 +56,10 @@ namespace Foo = A::B; // namespace alias using Foo::myfunc; // using declaration -using namespace Foo;// using directive +//removing namespace foo; for quality naming Michael137 wrote: The `using` directive was used here to ma

[Lldb-commits] [lldb] [lldb][test] TestLocationListLookup.py: skip expr check on unsupported platforms (PR #74818)

2023-12-08 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/74818 The `expect_expr` check was introduced in https://github.com/llvm/llvm-project/pull/74772. It is failing on Linux and Windows, so skip this test to unblock the bots >From 32b8d4102f73f7b42792f9c817742d1eba62

[Lldb-commits] [lldb] [lldb][test] TestLocationListLookup.py: skip expr check on unsupported platforms (PR #74818)

2023-12-08 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/74818 >From 32b8d4102f73f7b42792f9c817742d1eba629351 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 8 Dec 2023 08:51:32 + Subject: [PATCH 1/2] [lldb][test] TestLocationListLookup.py: skip expr check on

[Lldb-commits] [lldb] [lldb][test] TestLocationListLookup.py: skip expr check on unsupported platforms (PR #74818)

2023-12-08 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/74818 >From 32b8d4102f73f7b42792f9c817742d1eba629351 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 8 Dec 2023 08:51:32 + Subject: [PATCH 1/3] [lldb][test] TestLocationListLookup.py: skip expr check on

[Lldb-commits] [lldb] [lldb][test] TestLocationListLookup.py: skip expr check on unsupported platforms (PR #74818)

2023-12-08 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/74818 >From 32b8d4102f73f7b42792f9c817742d1eba629351 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 8 Dec 2023 08:51:32 + Subject: [PATCH 1/4] [lldb][test] TestLocationListLookup.py: skip expr check on

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
Michael137 wrote: > > Sorry, it's been a while since I last reviewed this and I must admit I > > forgot about this in the mean time. The only thing I'd like to check before > > we can land this is to hear from @Michael137 who has been actively working > > on FindTypes performance recently whet

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -45,6 +66,286 @@ struct CompilerContext { bool contextMatches(llvm::ArrayRef context_chain, llvm::ArrayRef pattern); +FLAGS_ENUM(TypeQueryOptions){ +e_none = 0u, +/// If set TypeQuery::m_context contains an exact context that must match +///

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -437,26 +437,25 @@ lldb::SBType SBModule::FindFirstType(const char *name_cstr) { LLDB_INSTRUMENT_VA(this, name_cstr); ModuleSP module_sp(GetSP()); - if (!name_cstr || !module_sp) Michael137 wrote: why did we get rid of the early return here? https:/

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -437,26 +437,25 @@ lldb::SBType SBModule::FindFirstType(const char *name_cstr) { LLDB_INSTRUMENT_VA(this, name_cstr); ModuleSP module_sp(GetSP()); - if (!name_cstr || !module_sp) -return {}; - SymbolContext sc; - const bool exact_match = false; - ConstString na

[Lldb-commits] [lldb] [lldb][NFC] Simplify DWARRFDeclContext::GetQualifiedName (PR #74788)

2023-12-11 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/74788 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -45,6 +66,286 @@ struct CompilerContext { bool contextMatches(llvm::ArrayRef context_chain, llvm::ArrayRef pattern); +FLAGS_ENUM(TypeQueryOptions){ +e_none = 0u, +/// If set TypeQuery::m_context contains an exact context that must match +///

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -502,11 +499,8 @@ lldb::SBTypeList SBModule::FindTypes(const char *type) { retval.Append(SBType(compiler_type)); } } else { - for (size_t idx = 0; idx < type_list.GetSize(); idx++) { -TypeSP type_sp(type_list.GetTypeAtIndex(idx)); -

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/74786 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -146,6 +133,9 @@ class TypeSystem : public PluginInterface, virtual CompilerDeclContext GetCompilerDeclContextForType(const CompilerType &type); + virtual std::vector + DeclContextGetCompilerContext(void *opaque_decl_ctx); Michael137 wrote: could thi

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -122,6 +106,9 @@ class TypeSystem : public PluginInterface, virtual CompilerType DeclGetFunctionArgumentType(void *opaque_decl, size_t arg_idx); + virtual std::vector + DeclGetCompilerContext(void *opaque_decl); ---

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -1696,16 +1696,16 @@ static size_t LookupTypeInModule(Target *target, CommandInterpreter &interpreter, Stream &strm, Module *module, const char *name_cstr, bool name_is_regex)

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -73,9 +73,22 @@ class DWARFDIE : public DWARFBaseDIE { std::vector GetDeclContextDIEs() const; /// Return this DIE's decl context as it is needed to look up types - /// in Clang's -gmodules debug info format. + /// in Clang modules. This context will include any modul

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -12,33 +12,32 @@ class UniqueTypesTestCase4(TestBase): def do_test(self, debug_flags): """Test that we display the correct template instantiation.""" self.build(dictionary=debug_flags) +exe = self.getBuildArtifact("a.out") +print(exe)

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -12,33 +12,32 @@ class UniqueTypesTestCase4(TestBase): def do_test(self, debug_flags): """Test that we display the correct template instantiation.""" self.build(dictionary=debug_flags) +exe = self.getBuildArtifact("a.out") +print(exe)

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -12,33 +12,32 @@ class UniqueTypesTestCase4(TestBase): def do_test(self, debug_flags): """Test that we display the correct template instantiation.""" self.build(dictionary=debug_flags) +exe = self.getBuildArtifact("a.out") +print(exe)

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -1859,17 +1851,11 @@ lldb::SBTypeList SBTarget::FindTypes(const char *typename_cstr) { if (typename_cstr && typename_cstr[0] && target_sp) { ModuleList &images = target_sp->GetImages(); ConstString const_typename(typename_cstr); -bool exact_match = false; -

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -12,33 +12,32 @@ class UniqueTypesTestCase4(TestBase): def do_test(self, debug_flags): """Test that we display the correct template instantiation.""" self.build(dictionary=debug_flags) +exe = self.getBuildArtifact("a.out") +print(exe)

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -1446,23 +1446,23 @@ void SymbolFilePDB::AddSymbols(lldb_private::Symtab &symtab) { symtab.Finalize(); } -void SymbolFilePDB::FindTypes( -lldb_private::ConstString name, const CompilerDeclContext &parent_decl_ctx, -uint32_t max_matches, -llvm::DenseSet &searc

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -9070,6 +9070,66 @@ size_t TypeSystemClang::DeclGetFunctionNumArguments(void *opaque_decl) { return 0; } +static CompilerContextKind GetCompilerKind(clang::Decl::Kind clang_kind, + clang::DeclContext *decl_ctx) { --

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. LGTM (just left some small comments) https://github.com/llvm/llvm-project/pull/74786 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lld

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/74786 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -64,6 +64,125 @@ bool lldb_private::contextMatches(llvm::ArrayRef context_chain, return true; } +static CompilerContextKind ConvertTypeClass(lldb::TypeClass type_class) { + if (type_class == eTypeClassAny) +return CompilerContextKind::AnyType; + uint16_t result = 0

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -64,6 +64,125 @@ bool lldb_private::contextMatches(llvm::ArrayRef context_chain, return true; } +static CompilerContextKind ConvertTypeClass(lldb::TypeClass type_class) { + if (type_class == eTypeClassAny) +return CompilerContextKind::AnyType; + uint16_t result = 0

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -263,13 +252,6 @@ TagDecl *ClangASTSource::FindCompleteType(const TagDecl *decl) { TagDecl *candidate_tag_decl = const_cast(tag_type->getDecl()); - // We have found a type by basename and we need to make sure the decl - // contexts are the same before we c

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -64,6 +64,125 @@ bool lldb_private::contextMatches(llvm::ArrayRef context_chain, return true; } +static CompilerContextKind ConvertTypeClass(lldb::TypeClass type_class) { + if (type_class == eTypeClassAny) +return CompilerContextKind::AnyType; + uint16_t result = 0

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
@@ -122,6 +106,9 @@ class TypeSystem : public PluginInterface, virtual CompilerType DeclGetFunctionArgumentType(void *opaque_decl, size_t arg_idx); + virtual std::vector + DeclGetCompilerContext(void *opaque_decl); ---

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
Michael137 wrote: BTW, lets prefix the commit with `[lldb]` before merging https://github.com/llvm/llvm-project/pull/74786 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Michael Buch via lldb-commits
Michael137 wrote: > > > > Sorry, it's been a while since I last reviewed this and I must admit I > > > > forgot about this in the mean time. The only thing I'd like to check > > > > before we can land this is to hear from @Michael137 who has been > > > > actively working on FindTypes performan

[Lldb-commits] [lldb] [lldb] Fix buildbots after PR 74786 (PR #75272)

2023-12-13 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. Nice! lgtm https://github.com/llvm/llvm-project/pull/75272 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][Type] Add TypeQuery::SetLanguages API (PR #75926)

2023-12-19 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/75926 This is required for users of `TypeQuery` that limit the set of languages of the query using APIs such as `GetSupportedLanguagesForTypes` or `GetSupportedLanguagesForExpressions`. Example usage: https://gith

[Lldb-commits] [lldb] [lldb][Type] Add TypeQuery::SetLanguages API (PR #75926)

2023-12-19 Thread Michael Buch via lldb-commits
Michael137 wrote: Trying to add tests for this in `SymbolFileDWARFTests` https://github.com/llvm/llvm-project/pull/75926 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DWARF] Search for symbols in all external modules (PR #75927)

2023-12-19 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/75927 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DWARF] Search for symbols in all external modules (PR #75927)

2023-12-19 Thread Michael Buch via lldb-commits
Michael137 wrote: > Would the whole test suite have to be built with modules enabled? Hmmm we used to have a debug-info category for `gmodules` which ran each test with `-gmodules`. But in the vast majority of cases that wasn't actually adding any useful coverage. There's a handful of `gmodule

[Lldb-commits] [lldb] [lldb][DWARF] Search for symbols in all external modules (PR #75927)

2023-12-19 Thread Michael Buch via lldb-commits
Michael137 wrote: > I would have thought > `lldb/test/API/lang/cpp/gmodules/templates/TestGModules.py` would have failed > then as it has >1 module. > > Do you know what "external module" means in this context, as opposed to just > module? The code searches "the clang Module" first, then the

[Lldb-commits] [lldb] [lldb] Fix MaxSummaryLength target property type (PR #72233)

2023-12-21 Thread Michael Buch via lldb-commits
Michael137 wrote: @dancing-leaves are you still planning to add tests for this so we can land this? Would be great to get this in https://github.com/llvm/llvm-project/pull/72233 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.l

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2024-01-02 Thread Michael Buch via lldb-commits
Michael137 wrote: > FWIW, we're seeing this breaking a pretty printer in google - previously a > lookup was able to find > `absl::cord_internal::RefcountAndFlags::Flags::kNumFlags` ( > https://github.com/abseil/abseil-cpp/blob/8184f16e898fcb13b310b40430e13ba40679cf0e/absl/strings/internal/cord

[Lldb-commits] [lldb] [lldb] Fix expressions that involve nested structs/classes/unions. (PR #77029)

2024-01-05 Thread Michael Buch via lldb-commits
@@ -2260,7 +2269,7 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE &die, // Disable external storage for this type so we don't get anymore // clang::ExternalASTSource queries for this type. - m_ast.SetHasExternalStorage(clang_type.GetOpaqueQualType(), f

[Lldb-commits] [lldb] [lldb] Fix expressions that involve nested structs/classes/unions. (PR #77029)

2024-01-05 Thread Michael Buch via lldb-commits
@@ -3106,10 +3115,39 @@ void DWARFASTParserClang::ParseSingleMember( std::make_pair(field_decl, field_bit_offset)); } +static bool IsTypeTag(dw_tag_t tag) { + switch (tag) { +case DW_TAG_typedef: +case DW_TAG_base_type: +case DW_TAG_pointer_type: +case D

[Lldb-commits] [lldb] [lldb] Fix expressions that involve nested structs/classes/unions. (PR #77029)

2024-01-05 Thread Michael Buch via lldb-commits
@@ -3106,10 +3115,39 @@ void DWARFASTParserClang::ParseSingleMember( std::make_pair(field_decl, field_bit_offset)); } +static bool IsTypeTag(dw_tag_t tag) { + switch (tag) { +case DW_TAG_typedef: +case DW_TAG_base_type: +case DW_TAG_pointer_type: +case D

[Lldb-commits] [lldb] [lldb] Fix expressions that involve nested structs/classes/unions. (PR #77029)

2024-01-05 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/77029 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] GetClangDeclForDIE: don't create VarDecl for static data members (PR #77155)

2024-01-05 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/77155 With DWARFv5, C++ static data members are represented as `DW_TAG_variable`s (see `faa3a5ea9ae481da757dab1c95c589e2d5645982`). In GetClangDeclForDIE, when trying to parse the `DW_AT_specification` that a stat

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] GetClangDeclForDIE: don't create VarDecl for static data members (PR #77155)

2024-01-08 Thread Michael Buch via lldb-commits
@@ -0,0 +1,23 @@ +# UNSUPPORTED: system-darwin, system-windows + +# In DWARFv5, C++ static data members are represented +# as DW_TAG_variable. We make sure LLDB's expression +# evaluator doesn't crash when trying to parse such +# a DW_TAG_variable DIE, whose parent DIE is only +#

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] GetClangDeclForDIE: don't create VarDecl for static data members (PR #77155)

2024-01-08 Thread Michael Buch via lldb-commits
@@ -0,0 +1,23 @@ +# UNSUPPORTED: system-darwin, system-windows Michael137 wrote: As @dwblaikie points out, we need a process to run the expression. But if we specify `-flimit-debug-info` I can repro the crash on Darwin too, so we can remove `UNSUPPORTED` here a

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] GetClangDeclForDIE: don't create VarDecl for static data members (PR #77155)

2024-01-08 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/77155 >From cf109ab8ed2a6c3e139c168375649ab4651c4ec4 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 5 Jan 2024 12:45:46 + Subject: [PATCH 1/2] [lldb][DWARFASTParserClang] GetClangDeclForDIE: don't creat

[Lldb-commits] [lldb] [lldb] DWARFDIE: Follow DW_AT_specification when computing CompilerCo… (PR #77157)

2024-01-08 Thread Michael Buch via lldb-commits
@@ -2574,11 +2574,12 @@ void SymbolFileDWARF::FindFunctions(const Module::LookupInfo &lookup_info, Module::LookupInfo no_tp_lookup_info(lookup_info); no_tp_lookup_info.SetLookupName(ConstString(name_no_template_params)); - m_index->GetFunctions(no_tp_lookup_i

[Lldb-commits] [lldb] [lldb] DWARFDIE: Follow DW_AT_specification when computing CompilerCo… (PR #77157)

2024-01-08 Thread Michael Buch via lldb-commits
@@ -375,16 +375,21 @@ std::vector DWARFDIE::GetDeclContextDIEs() const { std::vector DWARFDIE::GetDeclContext() const { std::vector context; - const dw_tag_t tag = Tag(); - if (tag == DW_TAG_compile_unit || tag == DW_TAG_partial_unit) -return context; DWARFDIE pare

[Lldb-commits] [lldb] [lldb] DWARFDIE: Follow DW_AT_specification when computing CompilerCo… (PR #77157)

2024-01-08 Thread Michael Buch via lldb-commits
@@ -404,7 +409,7 @@ std::vector DWARFDIE::GetDeclContext() const { push_ctx(CompilerContextKind::Enum, GetName()); break; case DW_TAG_subprogram: -push_ctx(CompilerContextKind::Function, GetPubname()); +push_ctx(CompilerContextKind::Function, GetName());

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] GetClangDeclForDIE: don't create VarDecl for static data members (PR #77155)

2024-01-08 Thread Michael Buch via lldb-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/77155 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][libc++] Adds some C++20 calendar data formatters. (PR #76983)

2024-01-08 Thread Michael Buch via lldb-commits
@@ -1084,3 +1084,43 @@ bool lldb_private::formatters::LibcxxWStringViewSummaryProvider( return ::LibcxxWStringSummaryProvider(valobj, stream, summary_options, dataobj, size); } + +bool lldb_private::formatters::LibcxxChronoMonthSummary

[Lldb-commits] [lldb] [lldb][libc++] Adds some C++20 calendar data formatters. (PR #76983)

2024-01-08 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. (sorry had the review comments pending but didn't click the `Submit review` button) LGTM Just left some minor comments https://github.com/llvm/llvm-project/pull/76983 ___ lldb-commits maili

[Lldb-commits] [lldb] [lldb][libc++] Adds some C++20 calendar data formatters. (PR #76983)

2024-01-08 Thread Michael Buch via lldb-commits
@@ -1084,3 +1084,43 @@ bool lldb_private::formatters::LibcxxWStringViewSummaryProvider( return ::LibcxxWStringSummaryProvider(valobj, stream, summary_options, dataobj, size); } + +bool lldb_private::formatters::LibcxxChronoMonthSummary

<    2   3   4   5   6   7   8   9   10   11   >