[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #101778)

2024-08-06 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/101778 >From 3d7c2b87ec73a48de30e1c5387a7f0d8d817b0f4 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 2 Aug 2024 23:38:18 +0100 Subject: [PATCH 1/6] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemMo

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

2024-08-06 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. LGTM, thanks! Left some stylistic comments/clarifications https://github.com/llvm/llvm-project/pull/102111 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

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

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

2024-08-06 Thread Michael Buch via lldb-commits
@@ -788,7 +808,10 @@ Type::GetTypeScopeAndBasename(llvm::StringRef name) { switch (pos.value()) { case ':': if (prev_is_colon && template_depth == 0) { -result.scope.push_back(name.slice(name_begin, pos.index() - 1)); +llvm::StringRef scope_name =

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

2024-08-06 Thread Michael Buch via lldb-commits
@@ -111,4 +115,22 @@ TEST(Type, CompilerContextPattern) { Matches(std::vector{make_class("C")})); EXPECT_THAT((std::vector{make_namespace("NS"), make_class("C")}), Not(Matches(std::vector{make_any_type("C")}))); + + EXPECT_THAT((std::vector{make_n

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

2024-08-06 Thread Michael Buch via lldb-commits
@@ -145,10 +159,16 @@ bool TypeQuery::ContextMatches( ++pat; } - // Skip over any remaining module entries if we were asked to do that. - while (GetIgnoreModules() && ctx != ctx_end && - ctx->kind == CompilerContextKind::Module) -++ctx; + // Skip over any

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

2024-08-06 Thread Michael Buch via lldb-commits
@@ -266,6 +269,11 @@ class TypeQuery { bool GetIgnoreModules() const { return (m_options & e_ignore_modules) != 0; } void SetIgnoreModules() { m_options &= ~e_ignore_modules; } + bool GetStrictNamespaces() const { +return (m_options & e_strict_namespaces) != 0; + } +

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

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

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

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

[Lldb-commits] [lldb] [lldb] Fix crash when adding members to an "incomplete" type (PR #102116)

2024-08-06 Thread Michael Buch via lldb-commits
@@ -0,0 +1,23 @@ +// RUN: %clangxx --target=x86_64-pc-linux -o %t -c %s -g Michael137 wrote: This would only crash with `-flimit-debug-info` right? Could we add that here? Also should we move it to the non-x86 directory? Not sure what the intent behind the x86 d

[Lldb-commits] [lldb] [lldb] Fix crash when adding members to an "incomplete" type (PR #102116)

2024-08-06 Thread Michael Buch via lldb-commits
@@ -0,0 +1,23 @@ +// RUN: %clangxx --target=x86_64-pc-linux -o %t -c %s -g Michael137 wrote: Ahh got it I saw the tests in this directory weren't run on my M1 and misinterpreted that. ``` The thing I like about a test like this is that it (again, like the llvm t

[Lldb-commits] [lldb] [lldb] Fix crash when adding members to an "incomplete" type (PR #102116)

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

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Pass ClangASTMetadata around by value (PR #102161)

2024-08-06 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/102161 This patch changes the return type of `GetMetadata` from a `ClangASTMetadata*` to a `std::optional`. Except for one call-site (`SetDeclIsForcefullyCompleted`), we never actually make use of the mutability o

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Pass ClangASTMetadata around by value (PR #102161)

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

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Pass ClangASTMetadata around by value (PR #102161)

2024-08-06 Thread Michael Buch via lldb-commits
@@ -219,9 +219,9 @@ void ClangUserExpression::ScanContext(ExecutionContext &exe_ctx, Status &err) { // whatever runtime the debug info says the object pointer belongs to. Do // that here. -ClangASTMetadata *metadata = -TypeSystemClang::DeclContextGetMetaD

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #101778)

2024-08-06 Thread Michael Buch via lldb-commits
@@ -561,7 +562,85 @@ static void SetupLangOpts(CompilerInstance &compiler, lang_opts.NoBuiltin = true; } -static void SetupImportStdModuleLangOpts(CompilerInstance &compiler) { +// NOTE: should be kept in sync with sdkSupportsBuiltinModules in +// Toolchains/Darwin.cpp +stat

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #101778)

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

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Pass ClangASTMetadata around by value (PR #102161)

2024-08-06 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/102161 >From 624022e5737e7c51aa4976928183fa099503437c Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 6 Aug 2024 15:16:56 +0100 Subject: [PATCH 1/2] [lldb][TypeSystemClang] Pass ClangASTMetadata around by va

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #101778)

2024-08-06 Thread Michael Buch via lldb-commits
Michael137 wrote: Talked to Adrian and we decided it's best if we landed this on the apple/llvm-project fork 6.0 branch. There's a larger refactor we'll do on llvm.org main instead (mainly re-using the PlatformDarwin and HostInfo utilities to get the correct SDK directory, instead of the DWARF

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #101778)

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

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Pass ClangASTMetadata around by value (PR #102161)

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

[Lldb-commits] [lldb] [lldb][TypeSystem] Pass ClangASTMetadata by-value when creating record/objc types (PR #102296)

2024-08-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/102296 This is a follow-up to https://github.com/llvm/llvm-project/pull/102161 where we changed the `GetMetadata`/`SetMetadata` APIs to pass `ClangASTMetadata` by-value, instead of `ClangASTMetadata *`, which wasn'

[Lldb-commits] [lldb] [lldb][TypeSystem] Pass ClangASTMetadata by-value when creating record/objc types (PR #102296)

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

[Lldb-commits] [lldb] [lldb] Fix crash when adding members to an "incomplete" type (PR #102116)

2024-08-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. LGTM, thanks! So the actual problem is that the ASTImporter will only copy over the definition to the destination decl if the source decl `isCompleteDefinition`. So then when we tried to add the typedef decl to the `CXXRecordDecl` that

[Lldb-commits] [lldb] [lldb] Fix crash when adding members to an "incomplete" type (PR #102116)

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

[Lldb-commits] [lldb] [lldb][TypeSystem] Pass ClangASTMetadata by-value when creating record/objc types (PR #102296)

2024-08-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/102296 >From 45c8f9534ec0ddc50c825fa7a3d048746b74360c Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 7 Aug 2024 11:03:25 +0100 Subject: [PATCH 1/2] [lldb][TypeSystem] Pass ClangASTMetadata by-value when cre

[Lldb-commits] [lldb] [lldb] Fix crash when adding members to an "incomplete" type (PR #102116)

2024-08-07 Thread Michael Buch via lldb-commits
Michael137 wrote: > > LGTM, thanks! > > So the actual problem is that the ASTImporter will only copy over the > > definition to the destination decl if the source decl > > `isCompleteDefinition`. So then when we tried to add the typedef decl to > > the `CXXRecordDecl` that the ASTImporter crea

[Lldb-commits] [lldb] [lldb][TypeSystem] Pass ClangASTMetadata by-value when creating record/objc types (PR #102296)

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

[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)

2024-08-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. Latest test additions LGTM, thanks! https://github.com/llvm/llvm-project/pull/102111 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lld

[Lldb-commits] [lldb] f05efd0 - [lldb][ClangExpressionParser][NFC] Remove unused local vars

2024-08-07 Thread Michael Buch via lldb-commits
Author: Michael Buch Date: 2024-08-07T13:39:52+01:00 New Revision: f05efd034c0993c7aa606bfbaaf575d94d75b43f URL: https://github.com/llvm/llvm-project/commit/f05efd034c0993c7aa606bfbaaf575d94d75b43f DIFF: https://github.com/llvm/llvm-project/commit/f05efd034c0993c7aa606bfbaaf575d94d75b43f.diff

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #102309)

2024-08-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/102309 This patch changes the way we initialize `BuiltinHeadersInSystemModules` which is one of the flags controlling Clang's behaviour when the Darwin module is split into more fine-grained modules. The ClangExpre

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #102309)

2024-08-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/102309 >From 3dfbfc759f61827f010f4a65241c8464c5815484 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 7 Aug 2024 12:46:24 +0100 Subject: [PATCH] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModule

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #102309)

2024-08-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/102309 >From 3dfbfc759f61827f010f4a65241c8464c5815484 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 7 Aug 2024 12:46:24 +0100 Subject: [PATCH 1/2] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemMo

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #102309)

2024-08-07 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/102309 >From 3dfbfc759f61827f010f4a65241c8464c5815484 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 7 Aug 2024 12:46:24 +0100 Subject: [PATCH 1/3] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemMo

[Lldb-commits] [lldb] c178fea - [lldb][TypeSystemClang][NFC] Remove redundant parameter to CreateObjCClass

2024-08-07 Thread Michael Buch via lldb-commits
Author: Michael Buch Date: 2024-08-07T23:09:45+01:00 New Revision: c178fea62d3999acd42f3ddfcc8bd436b574cfed URL: https://github.com/llvm/llvm-project/commit/c178fea62d3999acd42f3ddfcc8bd436b574cfed DIFF: https://github.com/llvm/llvm-project/commit/c178fea62d3999acd42f3ddfcc8bd436b574cfed.diff

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #102309)

2024-08-07 Thread Michael Buch via lldb-commits
Michael137 wrote: > This really isn't the right approach. `BuiltinHeadersInSystemModules` isn't > the only important default that the driver sets up. Can we change the > invocation setup to use clang::createInvocation or > clang::CompilerInvocation::CreateFromArgs or clang::BuildCompilation? O

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #102309)

2024-08-07 Thread Michael Buch via lldb-commits
@@ -259,6 +259,27 @@ bool XcodeSDK::SupportsSwift() const { } } +bool XcodeSDK::SDKSupportsBuiltinModules(const llvm::Triple &target_triple, Michael137 wrote: I already accounted for the version check changes https://github.com/llvm/llvm-project/pull/1023

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #102309)

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

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #102309)

2024-08-07 Thread Michael Buch via lldb-commits
@@ -259,6 +259,27 @@ bool XcodeSDK::SupportsSwift() const { } } +bool XcodeSDK::SDKSupportsBuiltinModules(const llvm::Triple &target_triple, Michael137 wrote: Don't think we really want to support this for non-native environments tbh https://github.com/llv

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #102309)

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

[Lldb-commits] [lldb] [lldb][Platform] Move the GetSDKPathFromDebugInfo helpers from PlatformDarwin into Platform (PR #102488)

2024-08-08 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/102488 This will soon be needed for https://github.com/llvm/llvm-project/pull/102309, where we plan on calling these APIs from generic ExpressionParser code. >From 99dd6c9d974ffd95f3c2aed9dfb2a861cc55f084 Mon Sep 1

[Lldb-commits] [lldb] [lldb][Platform] Move the GetSDKPathFromDebugInfo helpers from PlatformDarwin into Platform (PR #102488)

2024-08-08 Thread Michael Buch via lldb-commits
Michael137 wrote: I checked their uses in the Swift repo and we always have a `Target` available when we call these methods. So we should be able to use `Target::GetPlatform` to replace those static calls. https://github.com/llvm/llvm-project/pull/102488 ___

[Lldb-commits] [lldb] [lldb][Platform] Move the GetSDKPathFromDebugInfo helpers from PlatformDarwin into Platform (PR #102488)

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

[Lldb-commits] [lldb] [lldb][Platform] Move the GetSDKPathFromDebugInfo helpers from PlatformDarwin into Platform (PR #102488)

2024-08-08 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/102488 >From 99dd6c9d974ffd95f3c2aed9dfb2a861cc55f084 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 8 Aug 2024 16:07:21 +0100 Subject: [PATCH 1/2] [lldb][Platform] Move the GetSDKPathFromDebugInfo helpers

[Lldb-commits] [lldb] Reland "[lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (#102309)" (PR #102497)

2024-08-08 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/102497 >From d2f0b68afe6ebfffe5a2ef3ce14a77a5e1025c90 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 8 Aug 2024 16:07:21 +0100 Subject: [PATCH 1/4] [lldb][Platform] Move the GetSDKPathFromDebugInfo helpers

[Lldb-commits] [lldb] Reland "[lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (#102309)" (PR #102497)

2024-08-08 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/102497 Depends on https://github.com/llvm/llvm-project/pull/102488 This reverts commit https://github.com/llvm/llvm-project/commit/cf56e265e4b74799aee72a04b634fcc261078084. The original change was reverted because

[Lldb-commits] [lldb] [lldb][Platform] Move the GetSDKPathFromDebugInfo helpers from PlatformDarwin into Platform (PR #102488)

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

[Lldb-commits] [lldb] Reland "[lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (#102309)" (PR #102497)

2024-08-08 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/102497 >From d2f0b68afe6ebfffe5a2ef3ce14a77a5e1025c90 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 8 Aug 2024 16:07:21 +0100 Subject: [PATCH 1/3] [lldb][Platform] Move the GetSDKPathFromDebugInfo helpers

[Lldb-commits] [lldb] [lldb][Platform] Move the GetSDKPathFromDebugInfo helpers from PlatformDarwin into Platform (PR #102488)

2024-08-08 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/102488 >From 99dd6c9d974ffd95f3c2aed9dfb2a861cc55f084 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 8 Aug 2024 16:07:21 +0100 Subject: [PATCH 1/3] [lldb][Platform] Move the GetSDKPathFromDebugInfo helpers

[Lldb-commits] [lldb] [lldb] Support new libc++ __compressed_pair layout (PR #96538)

2024-08-08 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/96538 >From 16ae2c3c04d908807d78224a8fee34f772a337fa Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Mon, 29 Jan 2024 16:23:16 + Subject: [PATCH 1/4] [lldb] Support new libc++ __compressed_pair layout --- ll

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

2024-08-08 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/99012 >From e3ec030cb404c407ead39b10d5ea0baa4a0683ff 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] [lldb][Platform] Move the GetSDKPathFromDebugInfo helpers from PlatformDarwin into Platform (PR #102488)

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

[Lldb-commits] [lldb] Reland "[lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (#102309)" (PR #102497)

2024-08-09 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/102497 >From d2f0b68afe6ebfffe5a2ef3ce14a77a5e1025c90 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 8 Aug 2024 16:07:21 +0100 Subject: [PATCH 1/4] [lldb][Platform] Move the GetSDKPathFromDebugInfo helpers

[Lldb-commits] [lldb] Reland "[lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (#102309)" (PR #102497)

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

[Lldb-commits] [lldb] [lldb] Support new libc++ __compressed_pair layout (PR #96538)

2024-08-09 Thread Michael Buch via lldb-commits
@@ -734,9 +740,13 @@ def update(self): # variable tells which element in this NxM array is the 0th # one, and the 'size' element gives the number of elements # in the deque. -count = self._get_value_of_compressed_pair( -

[Lldb-commits] [lldb] [lldb] Support new libc++ __compressed_pair layout (PR #96538)

2024-08-09 Thread Michael Buch via lldb-commits
@@ -734,9 +740,13 @@ def update(self): # variable tells which element in this NxM array is the 0th # one, and the 'size' element gives the number of elements # in the deque. -count = self._get_value_of_compressed_pair( -

[Lldb-commits] [lldb] [lldb][TypeSystem][NFCI] Log creation of new TypeSystem instances to expression log (PR #91985)

2024-05-13 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/91985 We emit `ASTContext` and `TypeSystem` pointers into the `expr` log but there is no easy way (that I know of) to correlate the pointer value back to an easily readible form. This patch simply logs the name of

[Lldb-commits] [lldb] [lldb][ExpressionParser][NFCI] Log pointers as hex (PR #91989)

2024-05-13 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/91989 This ensures that we log pointers as lower-case hex. E.g., instead of: ``` LayoutRecordType on (ASTContext*)0x00010E78D600 'scratch ASTContext' for (RecordDecl*)0x00010E797 ``` we now log: ``` Layout

[Lldb-commits] [lldb] [lldb][ExpressionParser][NFCI] Log pointers as hex (PR #91989)

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

[Lldb-commits] [lldb] [lldb][ExpressionParser][NFCI] Log pointers as hex (PR #91989)

2024-05-13 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/91989 >From 1fba045db76f51a2dbd9a2a3cb9879858b5b653e Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Mon, 13 May 2024 14:50:07 +0100 Subject: [PATCH 1/2] [lldb][ExpressionParser][NFCI] Log pointers as hex This en

[Lldb-commits] [lldb] [lldb][TypeSystem][NFCI] Log creation of new TypeSystem instances to expression log (PR #91985)

2024-05-13 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/91985 >From 1ccf935f97b21e0bd87955f3313cb47261d11379 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Mon, 13 May 2024 15:34:24 +0100 Subject: [PATCH 1/2] [lldb][TypeSystem][NFCI] Log creation of new TypeSystem in

[Lldb-commits] [lldb] [lldb][TypeSystem][NFCI] Log creation of new TypeSystem instances to expression log (PR #91985)

2024-05-13 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/91985 >From 1ccf935f97b21e0bd87955f3313cb47261d11379 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Mon, 13 May 2024 15:34:24 +0100 Subject: [PATCH 1/3] [lldb][TypeSystem][NFCI] Log creation of new TypeSystem in

[Lldb-commits] [lldb] [lldb][ExpressionParser][NFCI] Log pointers as hex (PR #91989)

2024-05-13 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/91989 >From 1fba045db76f51a2dbd9a2a3cb9879858b5b653e Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Mon, 13 May 2024 14:50:07 +0100 Subject: [PATCH 1/3] [lldb][ExpressionParser][NFCI] Log pointers as hex This en

[Lldb-commits] [lldb] [lldb][ExpressionParser][NFCI] Log pointers as hex (PR #91989)

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

[Lldb-commits] [lldb] [lldb][TypeSystem][NFCI] Log creation of new TypeSystem instances to expression log (PR #91985)

2024-05-13 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/91985 >From 1ccf935f97b21e0bd87955f3313cb47261d11379 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Mon, 13 May 2024 15:34:24 +0100 Subject: [PATCH 1/3] [lldb][TypeSystem][NFCI] Log creation of new TypeSystem in

[Lldb-commits] [lldb] [lldb][TypeSystem][NFCI] Log creation of new TypeSystem instances to expression log (PR #91985)

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

[Lldb-commits] [lldb] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

2024-05-16 Thread Michael Buch via lldb-commits
@@ -2306,6 +2345,11 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE &die, if (!die) return false; + ParsedDWARFTypeAttributes attrs(die); Michael137 wrote: I've been wondering how expensive constructing this object is. On a brief gl

[Lldb-commits] [lldb] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

2024-05-16 Thread Michael Buch via lldb-commits
@@ -321,6 +326,10 @@ class SymbolFileDWARFDebugMap : public SymbolFileCommon { std::vector m_func_indexes; // Sorted by address std::vector m_glob_indexes; std::map>, OSOInfoSP> m_oso_map; + // A map from CompilerType to the struct/class/union/enum DIE (might be a + //

[Lldb-commits] [lldb] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

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

[Lldb-commits] [lldb] [WIP] [lldb][Progress] Report progress when completing types from DWARF (PR #91452)

2024-05-17 Thread Michael Buch via lldb-commits
Michael137 wrote: I attached to clang and printed an expression. That resulted in 16801 calls to `Progress::Increment`, all of which I'm guessing translate to event broadcasts. I collected some timing numbers: ``` https://github.com/llvm/llvm-project/assets/14071464/97333f8a-2e35-47c9-8cd0-d610

[Lldb-commits] [lldb] [lldb][Windows] Skip the TestDataFormatterLibcxxChrono test to avoid python crash (PR #92575)

2024-05-17 Thread Michael Buch via lldb-commits
Michael137 wrote: I think we should just fix https://github.com/llvm/llvm-project/issues/92574 since it seems pretty trivial to do with an ifdef https://github.com/llvm/llvm-project/pull/92575 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [WIP] [lldb][Progress] Report progress when completing types from DWARF (PR #91452)

2024-05-29 Thread Michael Buch via lldb-commits
Michael137 wrote: Sorry for the delayed response, just got back from vacation. > What do these numbers include? Is it just the operation it self, or > everything leading up to it as well. > Thanks for doing this. What do these numbers include? Is it just the > operation it self, or everything

[Lldb-commits] [lldb] [lldb/DWARF] Refactor DWARFDIE::Get{Decl, TypeLookup}Context (PR #93291)

2024-05-29 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. LGTM! (seems like we could probably add unit-tests for this in `lldb/unittests/SymbolFile/DWARF/DWARFDIETest.cpp`? But not a blocker) https://github.com/llvm/llvm-project/pull/93291 ___ lldb-c

[Lldb-commits] [lldb] [lldb/DWARF] Refactor DWARFDIE::Get{Decl, TypeLookup}Context (PR #93291)

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

[Lldb-commits] [lldb] [WIP] [lldb][Progress] Report progress when completing types from DWARF (PR #91452)

2024-05-29 Thread Michael Buch via lldb-commits
Michael137 wrote: @labath baseline for just attaching is approximately `3 s` for LLDB and `2.5 s`. Baselines for attaching *and* stopping at the breakpoint are in the `break only` rows of the table. https://github.com/llvm/llvm-project/pull/91452 ___

[Lldb-commits] [lldb] [WIP] [lldb][Progress] Report progress when completing types from DWARF (PR #91452)

2024-05-29 Thread Michael Buch via lldb-commits
Michael137 wrote: Now that we don't search for the definition DIE when initially parsing a DIE, we could probably move this progress report to when we look for `FindDefinitionTypeForDIE`, which seems to be the most expensive part of the `DWARFASTParser` https://github.com/llvm/llvm-project/pu

[Lldb-commits] [lldb] [lldb/DWARF] Follow DW_AT_signature when computing type contexts (PR #93675)

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

[Lldb-commits] [clang] [compiler-rt] [lldb] [llvm] [Support] Remove terminfo dependency (PR #92865)

2024-05-29 Thread Michael Buch via lldb-commits
Michael137 wrote: I'm going to revert this for now until since the bots have been red for a while now https://github.com/llvm/llvm-project/pull/92865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[Lldb-commits] [lldb] fe82a3d - Revert "[Support] Remove terminfo dependency (#92865)"

2024-05-29 Thread Michael Buch via lldb-commits
Author: Michael Buch Date: 2024-05-29T16:20:42+01:00 New Revision: fe82a3da36196157c0caa1ef2505186782f750d1 URL: https://github.com/llvm/llvm-project/commit/fe82a3da36196157c0caa1ef2505186782f750d1 DIFF: https://github.com/llvm/llvm-project/commit/fe82a3da36196157c0caa1ef2505186782f750d1.diff

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-29 Thread Michael Buch via lldb-commits
Michael137 wrote: FYI, the `TestAddressRange` tests are failing on the macOS buildbots: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/4764/execution/node/97/log/ ``` == FAIL: test_address_range_print_resolv

[Lldb-commits] [lldb] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

2024-05-29 Thread Michael Buch via lldb-commits
Michael137 wrote: Unfortunately this breaks `TestCPPAccelerator.py` on the macOS buildbots: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/4788/execution/node/97/log/ ``` Ran command: "log enable dwarf lookups -f/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb

[Lldb-commits] [lldb] [IRInterpreter] Return zero address for missing weak function (PR #93548)

2024-05-30 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. Seems like a reasonable thing to do (as this comment in [LoadAddressResolver ::Resolve](https://github.com/llvm/llvm-project/blob/fd8b2d2046508c027ccf0fffb50d665c8355997a/lldb/source/Expression/IRExecutionUnit.cpp#L758-L761) implies). M

[Lldb-commits] [lldb] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

2024-05-30 Thread Michael Buch via lldb-commits
Michael137 wrote: Huh this is an interesting one. So it looks like we first parse and insert `struct Inner` into `UniqueDWARFASTTypeMap` as a forward declaration. Then when we search the debug-map for the definition of `Inner`, we find it declared as `class Inner` (note, *class* vs. *struct*..

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-05-30 Thread Michael Buch via lldb-commits
Michael137 wrote: @clayborg this change went in as part of https://github.com/llvm/llvm-project/pull/92328 so i think we can close this now. Though there's a test failure linked to that PR currently, meaning it might have to get reverted. We should keep an eye out for that https://github.co

[Lldb-commits] [lldb] Add AddressRange to SB API (PR #92014)

2024-05-30 Thread Michael Buch via lldb-commits
Michael137 wrote: I'll revert this for now. Let me know if you need help reproducing the failure https://github.com/llvm/llvm-project/pull/92014 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/l

[Lldb-commits] [lldb] 8b600a3 - Revert "Add SBAddressRange and SBAddressRangeList to SB API (#92014)"

2024-05-30 Thread Michael Buch via lldb-commits
Author: Michael Buch Date: 2024-05-30T12:40:05+01:00 New Revision: 8b600a37325bd68c370b00838c9f0a0fda1af6ce URL: https://github.com/llvm/llvm-project/commit/8b600a37325bd68c370b00838c9f0a0fda1af6ce DIFF: https://github.com/llvm/llvm-project/commit/8b600a37325bd68c370b00838c9f0a0fda1af6ce.diff

[Lldb-commits] [clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-05-30 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/93809 This is the outcome of the discussions we had in https://discourse.llvm.org/t/rfc-lldb-handling-no-unique-address-in-lldb/77483 To summarize, LLDB creates AST nodes by parsing debug-info and hands those off t

[Lldb-commits] [clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

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

[Lldb-commits] [clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-05-30 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/93809 >From 91276f5b2dc05032a285b465c0c8a69541bb25c4 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 2 May 2024 09:05:01 +0100 Subject: [PATCH 1/2] [clang][lldb] Don't assert structure layout correctness for

[Lldb-commits] [clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-05-30 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/93809 >From 91276f5b2dc05032a285b465c0c8a69541bb25c4 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 2 May 2024 09:05:01 +0100 Subject: [PATCH 1/3] [clang][lldb] Don't assert structure layout correctness for

[Lldb-commits] [lldb] [lldb] Fix module name tab completion (PR #93458)

2024-05-30 Thread Michael Buch via lldb-commits
Michael137 wrote: Looks like this is breaking the macOS CI: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake/2534/execution/node/97/log ``` == FAIL: test_shlib_name (TestCompletion.CommandLineCompletionTestCase)

[Lldb-commits] [lldb] [lldb] Add AddressRange to SB API (PR #93836)

2024-05-30 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. Can confirm that tests pass on my mac now https://github.com/llvm/llvm-project/pull/93836 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[Lldb-commits] [lldb] [lldb][DWARF] Fix adding children to clang type that hasn't started definition. (PR #93839)

2024-05-30 Thread Michael Buch via lldb-commits
@@ -13,12 +13,18 @@ using namespace lldb_private::dwarf; using namespace lldb_private::plugin::dwarf; +static bool IsStructOrClassTag(llvm::dwarf::Tag Tag) { Michael137 wrote: I think we have this function somewhere already. Might be worth checking (possibly

[Lldb-commits] [lldb] [lldb][DWARF] Fix adding children to clang type that hasn't started definition. (PR #93839)

2024-05-30 Thread Michael Buch via lldb-commits
@@ -13,12 +13,18 @@ using namespace lldb_private::dwarf; using namespace lldb_private::plugin::dwarf; +static bool IsStructOrClassTag(llvm::dwarf::Tag Tag) { Michael137 wrote: Ah yes in `SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext` we have the sam

[Lldb-commits] [lldb] [lldb][DWARF] Fix adding children to clang type that hasn't started definition. (PR #93839)

2024-05-30 Thread Michael Buch via lldb-commits
@@ -2232,6 +2232,11 @@ bool DWARFASTParserClang::CompleteRecordType(const DWARFDIE &die, // For objective C we don't start the definition when the class is // created. TypeSystemClang::StartTagDeclarationDefinition(clang_type); +} else if (!clang_type.IsB

[Lldb-commits] [lldb] [lldb][DWARF] Fix adding children to clang type that hasn't started definition. (PR #93839)

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

[Lldb-commits] [lldb] [lldb][DWARF] Fix adding children to clang type that hasn't started definition. (PR #93839)

2024-05-30 Thread Michael Buch via lldb-commits
@@ -2232,6 +2232,11 @@ bool DWARFASTParserClang::CompleteRecordType(const DWARFDIE &die, // For objective C we don't start the definition when the class is // created. TypeSystemClang::StartTagDeclarationDefinition(clang_type); +} else if (!clang_type.IsB

[Lldb-commits] [lldb] [lldb][DWARF] Fix adding children to clang type that hasn't started definition. (PR #93839)

2024-05-30 Thread Michael Buch via lldb-commits
@@ -13,12 +13,18 @@ using namespace lldb_private::dwarf; using namespace lldb_private::plugin::dwarf; +static bool IsStructOrClassTag(llvm::dwarf::Tag Tag) { Michael137 wrote: Are there more tag equality checks around LLDB that could benefit from re-using th

[Lldb-commits] [lldb] [lldb][DWARF] Fix adding children to clang type that hasn't started definition. (PR #93839)

2024-05-30 Thread Michael Buch via lldb-commits
@@ -2232,6 +2232,10 @@ bool DWARFASTParserClang::CompleteRecordType(const DWARFDIE &die, // For objective C we don't start the definition when the class is // created. TypeSystemClang::StartTagDeclarationDefinition(clang_type); +} else { + assert( +

[Lldb-commits] [lldb] [lldb][DWARF] Fix adding children to clang type that hasn't started definition. (PR #93839)

2024-05-30 Thread Michael Buch via lldb-commits
@@ -13,12 +13,18 @@ using namespace lldb_private::dwarf; using namespace lldb_private::plugin::dwarf; +static bool IsStructOrClassTag(llvm::dwarf::Tag Tag) { Michael137 wrote: There's also ``` /// Returns true if `tag` is a class_type of structure_type tag.

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