[Lldb-commits] [clang] [lldb] [ASTImporter][lldb] Avoid implicit imports in VisitFieldDecl (PR #107828)

2024-09-09 Thread Andrew Savonichev via lldb-commits
https://github.com/asavonic created https://github.com/llvm/llvm-project/pull/107828 Fields from external sources are typically loaded implicitly by `RecordDecl` or `DeclContext` iterators and other functions (see LoadFieldsFromExternalStorage function and its uses). The assumption is that we

[Lldb-commits] [clang] [lldb] [ASTImporter][lldb] Avoid implicit imports in VisitFieldDecl (PR #107828)

2024-09-09 Thread Andrew Savonichev via lldb-commits
asavonic wrote: Thanks Michael, I'm glad I'm not the only one seeing this problem. > > If an implicit import happens between (2) and (3), it may indirectly bring > > the same field into the context. When (3) happens we add it again, > > duplicating the field and breaking the record. This is no

[Lldb-commits] [clang] [lldb] [ASTImporter][lldb] Avoid implicit imports in VisitFieldDecl (PR #107828)

2024-09-17 Thread Andrew Savonichev via lldb-commits
asavonic wrote: > Our idea is summarized in > https://discourse.llvm.org/t/rfc-lldb-more-reliable-completion-of-record-types/77442. > Basically the goal is to guarantee that a call to `getDefinition`, _will_ > fetch the definition. This is something that Clang already does, but we just > neve

[Lldb-commits] [lldb] [lldb] Clear ModuleList shared modules in SBDebugger::Clear (PR #147289)

2025-07-07 Thread Andrew Savonichev via lldb-commits
https://github.com/asavonic created https://github.com/llvm/llvm-project/pull/147289 Shared modules are stored in a global `ModuleList` cache, and it is intentionally leaked to avoid doing cleanup when lldb exits. However, when lldb is used as a library, we need a way to manage opened modules

[Lldb-commits] [lldb] [lldb] Clear ModuleList shared modules in SBDebugger::Clear (PR #147289)

2025-07-07 Thread Andrew Savonichev via lldb-commits
asavonic wrote: > Python code formatter, darker found issues in your code. Fixed. https://github.com/llvm/llvm-project/pull/147289 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Clear ModuleList shared modules in SBDebugger::Clear (PR #147289)

2025-07-07 Thread Andrew Savonichev via lldb-commits
https://github.com/asavonic updated https://github.com/llvm/llvm-project/pull/147289 >From a01eb1943afb03d1dc9439e9ae8f3a01b8c15398 Mon Sep 17 00:00:00 2001 From: Andrew Savonichev Date: Mon, 7 Jul 2025 17:33:50 +0900 Subject: [PATCH] [lldb] Clear ModuleList shared modules in SBDebugger::Clear

[Lldb-commits] [lldb] [lldb] Clear ModuleList shared modules in SBDebugger::Clear (PR #147289)

2025-07-07 Thread Andrew Savonichev via lldb-commits
asavonic wrote: > > However, when lldb is used as a library, we need a way to manage opened > > modules to avoid problems with file locks (on some systems) for modules > > that we no longer need. > > Can you give a concrete example? This seems like its own issue that should be > solved rather

[Lldb-commits] [lldb] [lldb] Clear ModuleList shared modules in SBDebugger::Clear (PR #147289)

2025-07-08 Thread Andrew Savonichev via lldb-commits
https://github.com/asavonic updated https://github.com/llvm/llvm-project/pull/147289 >From a01eb1943afb03d1dc9439e9ae8f3a01b8c15398 Mon Sep 17 00:00:00 2001 From: Andrew Savonichev Date: Mon, 7 Jul 2025 17:33:50 +0900 Subject: [PATCH 1/3] [lldb] Clear ModuleList shared modules in SBDebugger::C

[Lldb-commits] [lldb] [lldb] Clear ModuleList shared modules in SBDebugger::Clear (PR #147289)

2025-07-08 Thread Andrew Savonichev via lldb-commits
asavonic wrote: Updated the patch to [use RemoveOrphanSharedModules](https://github.com/llvm/llvm-project/pull/147289/commits/7a27fe962726c3190ce6ad7d635e3ae30a0f52f7) instead of force-clearing the cache. Changed the description as well. > No one SBDebugger should force-clear the Shared Module