[Lldb-commits] [lldb] [llvm] [lldb] Fix object format of some mach-o files by using vendor info in `getDefaultFormat()` (PR #143633)

2025-06-11 Thread David Peixotto via lldb-commits
dmpots wrote: > this is really an change to one of the foundational llvm classes, so you > should get someone from the llvm side to review this Tagging a few people involved in the last PR (#75469) that modified this code path: @arsenm, @MaskRay, @lhames, @dsandersllvm, @rudkx > and also ad

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-09 Thread David Peixotto via lldb-commits
https://github.com/dmpots closed https://github.com/llvm/llvm-project/pull/134418 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-06 Thread David Peixotto via lldb-commits
@@ -46,12 +48,287 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +// Helper function to perform an action on each matching plugin. +// The action callback is given the containing namespace along with plugin info +// for each matching plugi

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-06 Thread David Peixotto via lldb-commits
@@ -46,12 +48,287 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +// Helper function to perform an action on each matching plugin. +// The action callback is given the containing namespace along with plugin info +// for each matching plugi

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-06 Thread David Peixotto via lldb-commits
@@ -181,6 +181,56 @@ void PluginManager::Terminate() { plugin_map.clear(); } +llvm::ArrayRef PluginManager::GetPluginNamespaces() { + // Currently supported set of plugin namespaces. This will be expanded + // over time. + static PluginNamespace PluginNamespaces[] = { +

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-06 Thread David Peixotto via lldb-commits
@@ -486,6 +544,12 @@ class PluginManager { static InstrumentationRuntimeCreateInstance GetInstrumentationRuntimeCreateCallbackAtIndex(uint32_t idx); + static std::vector + GetInstrumentationRuntimePluginInfo(); dmpots wrote: The SystemRuntime functions

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-06 Thread David Peixotto via lldb-commits
https://github.com/dmpots edited https://github.com/llvm/llvm-project/pull/134418 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-06 Thread David Peixotto via lldb-commits
@@ -46,12 +48,255 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +// Helper function to perform an action on each matching plugin. +// The action callback is given the containing namespace along with plugin info +// for each matching plugi

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-06 Thread David Peixotto via lldb-commits
@@ -46,12 +48,255 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +// Helper function to perform an action on each matching plugin. +// The action callback is given the containing namespace along with plugin info +// for each matching plugi

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-05 Thread David Peixotto via lldb-commits
@@ -46,12 +48,255 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +// Helper function to perform an action on each matching plugin. +// The action callback is given the containing namespace along with plugin info +// for each matching plugi

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-05 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/134418 >From e240bda8fcea9db4d9c456929ba811feb8d4152b Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Tue, 11 Mar 2025 13:02:14 -0700 Subject: [PATCH 01/23] Add commands to list/enable/disable plugins This commit a

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-05 Thread David Peixotto via lldb-commits
@@ -0,0 +1,52 @@ +# This test validates the plugin list command. +# Currently it works only for system-runtime plugins and we only have one +# system runtime plugin so testing is a bit limited. +# +# Note that commands that return errors will stop running a script, so we +# have n

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-05 Thread David Peixotto via lldb-commits
@@ -46,12 +48,255 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +// Helper function to perform an action on each matching plugin. +// The action callback is given the containing namespace along with plugin info +// for each matching plugi

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-05 Thread David Peixotto via lldb-commits
@@ -54,12 +57,67 @@ struct RegisteredPluginInfo { bool enabled = false; }; +// Define some data structures to describe known plugin "namespaces". +// The PluginManager is organized into a series of static functions +// that operate on different types of plugins. For example

[Lldb-commits] [lldb] [lldb] Set default object format to `MachO` in `ObjectFileMachO` (PR #142704)

2025-06-04 Thread David Peixotto via lldb-commits
@@ -94,4 +94,59 @@ TEST_F(ObjectFileMachOTest, IndirectSymbolsInTheSharedCache) { for (size_t i = 0; i < 10; i++) OF->ParseSymtab(symtab); } + +TEST_F(ObjectFileMachOTest, ObjectFileFormatWithoutLoadCommand) { dmpots wrote: The test name is a bit mislea

[Lldb-commits] [lldb] [lldb] Set default object format to `MachO` in `ObjectFileMachO` (PR #142704)

2025-06-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots edited https://github.com/llvm/llvm-project/pull/142704 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Set default object format to `MachO` in `ObjectFileMachO` (PR #142704)

2025-06-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots approved this pull request. LGTM with one nit. https://github.com/llvm/llvm-project/pull/142704 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-02 Thread David Peixotto via lldb-commits
@@ -46,12 +49,206 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +// Helper function to perform an action on each matching plugin. +// The action callback is given the containing namespace along with plugin info +// for each matching plugi

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-02 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/134418 >From e240bda8fcea9db4d9c456929ba811feb8d4152b Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Tue, 11 Mar 2025 13:02:14 -0700 Subject: [PATCH 01/21] Add commands to list/enable/disable plugins This commit a

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-02 Thread David Peixotto via lldb-commits
@@ -46,12 +49,206 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +// Helper function to perform an action on each matching plugin. +// The action callback is given the containing namespace along with plugin info +// for each matching plugi

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-02 Thread David Peixotto via lldb-commits
@@ -46,12 +49,206 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +// Helper function to perform an action on each matching plugin. +// The action callback is given the containing namespace along with plugin info +// for each matching plugi

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-02 Thread David Peixotto via lldb-commits
@@ -464,6 +466,24 @@ llvm::json::Value DebuggerStats::ReportStatistics( } } + if (include_plugins) { +json::Object plugin_stats; +for (const PluginNamespace &plugin_ns : + PluginManager::GetPluginNamespaces()) { + json::Array namespace_stats; + +

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-02 Thread David Peixotto via lldb-commits
@@ -174,12 +174,21 @@ struct StatisticsOptions { return !GetSummaryOnly(); } + void SetIncludePlugins(bool value) { m_include_plugins = value; } + bool GetIncludePlugins() const { +if (m_include_plugins.has_value()) + return m_include_plugins.value(); +//

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-06-02 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/134418 >From e240bda8fcea9db4d9c456929ba811feb8d4152b Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Tue, 11 Mar 2025 13:02:14 -0700 Subject: [PATCH 01/20] Add commands to list/enable/disable plugins This commit a

[Lldb-commits] [lldb] [LLDB][Platform Linux] Flip uid and pid in get signal description (PR #142200)

2025-05-30 Thread David Peixotto via lldb-commits
https://github.com/dmpots approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/142200 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][Platform Linux] Flip uid and pid in get signal description (PR #142200)

2025-05-30 Thread David Peixotto via lldb-commits
@@ -0,0 +1,10 @@ +#include dmpots wrote: > Strangely enough all the existing SIGINFO shell tests also live in this > directory FWIW, I do see a [command-thread-siginfo.test](https://github.com/llvm/llvm-project/blob/main/lldb/test/Shell/Commands/command-threa

[Lldb-commits] [lldb] [LLDB][Platform Linux] Flip uid and pid in get signal description (PR #142200)

2025-05-30 Thread David Peixotto via lldb-commits
@@ -0,0 +1,10 @@ +#include dmpots wrote: The location of this test is under the "Register" directory, which looks like it is for testing things like `register read`. Since this is not about examining registers can we find a more suitable location? https://git

[Lldb-commits] [lldb] [LLDB][Platform Linux] Flip uid and pid in get signal description (PR #142200)

2025-05-30 Thread David Peixotto via lldb-commits
@@ -0,0 +1,6 @@ +# XFAIL: system-darwin dmpots wrote: Why is this expected to fail on darwin and windows? Can we use `REQUIRES` to only run it on supported platforms? https://github.com/llvm/llvm-project/pull/142200 _

[Lldb-commits] [lldb] [LLDB] Add ifndef to platform linux (PR #141971)

2025-05-29 Thread David Peixotto via lldb-commits
@@ -34,6 +34,20 @@ #define MAP_PRIVATE 2 #define MAP_ANON 0x20 +// For other platforms that use platform linux +#ifndef SIGILL +#define SIGILL 4 +#endif +#ifndef SIGBUS +#define SIGBUS 7 +#endif +#ifndef SIGFPE +#define SIGFPE 8 +#endif +#ifndef SIGSEGV +#define SIGSEGV 11 ---

[Lldb-commits] [lldb] [LLDB] Add ifndef to platform linux (PR #141971)

2025-05-29 Thread David Peixotto via lldb-commits
https://github.com/dmpots edited https://github.com/llvm/llvm-project/pull/141971 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add ifndef to platform linux (PR #141971)

2025-05-29 Thread David Peixotto via lldb-commits
@@ -34,6 +34,20 @@ #define MAP_PRIVATE 2 #define MAP_ANON 0x20 +// For other platforms that use platform linux dmpots wrote: Are these guaranteed to be defines and not constants? https://github.com/llvm/llvm-project/pull/141971 _

[Lldb-commits] [lldb] [LLDB] Add ifndef to platform linux (PR #141971)

2025-05-29 Thread David Peixotto via lldb-commits
https://github.com/dmpots approved this pull request. Approving to unblock windows build break. https://github.com/llvm/llvm-project/pull/141971 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/l

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-05-19 Thread David Peixotto via lldb-commits
dmpots wrote: ping @clayborg @JDevlieghere @jimingham. Please take a look when you get a chance. Thanks! https://github.com/llvm/llvm-project/pull/134418 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-05-12 Thread David Peixotto via lldb-commits
dmpots wrote: ping @clayborg @JDevlieghere @jimingham. Please take a look when you get a chance. Thanks! https://github.com/llvm/llvm-project/pull/134418 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[Lldb-commits] [lldb] [LLDB][SBSaveCoreOptions] Add new API to expose the expected core size in bytes (PR #138169)

2025-05-09 Thread David Peixotto via lldb-commits
https://github.com/dmpots approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/138169 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-05-05 Thread David Peixotto via lldb-commits
dmpots wrote: ping @clayborg @JDevlieghere @jimingham. I updated the PR to include plugin info in the stats. Please take a look when you get a chance. Thanks! https://github.com/llvm/llvm-project/pull/134418 ___ lldb-commits mailing list lldb-commit

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Sbsavecore subregions bug (PR #138206)

2025-05-05 Thread David Peixotto via lldb-commits
https://github.com/dmpots approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/138206 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Sbsavecore subregions bug (PR #138206)

2025-05-01 Thread David Peixotto via lldb-commits
@@ -0,0 +1,142 @@ +""" +Test saving a mini dump, from yamilized examples. +""" + +import os +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class ProcessSaveCoreMinidumpTestCaseYaml(TestBase): +

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Sbsavecore subregions bug (PR #138206)

2025-05-01 Thread David Peixotto via lldb-commits
@@ -0,0 +1,142 @@ +""" +Test saving a mini dump, from yamilized examples. +""" + +import os +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class ProcessSaveCoreMinidumpTestCaseYaml(TestBase): +

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Sbsavecore subregions bug (PR #138206)

2025-05-01 Thread David Peixotto via lldb-commits
@@ -0,0 +1,142 @@ +""" +Test saving a mini dump, from yamilized examples. +""" + +import os +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class ProcessSaveCoreMinidumpTestCaseYaml(TestBase): +

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Sbsavecore subregions bug (PR #138206)

2025-05-01 Thread David Peixotto via lldb-commits
@@ -0,0 +1,142 @@ +""" +Test saving a mini dump, from yamilized examples. +""" + +import os +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class ProcessSaveCoreMinidumpTestCaseYaml(TestBase): +

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Sbsavecore subregions bug (PR #138206)

2025-05-01 Thread David Peixotto via lldb-commits
@@ -0,0 +1,35 @@ +--- !minidump +Streams: + - Type:SystemInfo +Processor Arch: AMD64 +Processor Level: 6 +Processor Revision: 15876 +Number of Processors: 40 +Platform ID: Linux +CSD Version: 'Linux 3.13.0-91-generic' +CPU: +

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Sbsavecore subregions bug (PR #138206)

2025-05-01 Thread David Peixotto via lldb-commits
@@ -0,0 +1,142 @@ +""" +Test saving a mini dump, from yamilized examples. +""" + +import os +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class ProcessSaveCoreMinidumpTestCaseYaml(TestBase): +

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Sbsavecore subregions bug (PR #138206)

2025-05-01 Thread David Peixotto via lldb-commits
@@ -380,6 +380,25 @@ template class RangeVector { return nullptr; } + const Entry *FindEntryThatIntersects(const Entry &range) const { +#ifdef ASSERT_RANGEMAP_ARE_SORTED +assert(IsSorted()); +#endif +if (!m_entries.empty()) { + typename Collection::const_

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Sbsavecore subregions bug (PR #138206)

2025-05-01 Thread David Peixotto via lldb-commits
@@ -0,0 +1,142 @@ +""" +Test saving a mini dump, from yamilized examples. +""" + +import os +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + dmpots wrote: Maybe we should test so

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Sbsavecore subregions bug (PR #138206)

2025-05-01 Thread David Peixotto via lldb-commits
@@ -6689,6 +6689,25 @@ static void GetCoreFileSaveRangesStackOnly(Process &process, } } +// TODO: We should refactor CoreFileMemoryRanges to use the lldb range type, and +// then add an intersect method on it, or MemoryRegionInfo. +static MemoryRegionInfo +Intersect(const

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Sbsavecore subregions bug (PR #138206)

2025-05-01 Thread David Peixotto via lldb-commits
@@ -6698,9 +6717,16 @@ static void GetUserSpecifiedCoreFileSaveRanges(Process &process, return; for (const auto &range : regions) { -auto entry = option_ranges.FindEntryThatContains(range.GetRange()); -if (entry) - AddRegion(range, true, ranges); +auto

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Sbsavecore subregions bug (PR #138206)

2025-05-01 Thread David Peixotto via lldb-commits
@@ -380,6 +380,25 @@ template class RangeVector { return nullptr; } + const Entry *FindEntryThatIntersects(const Entry &range) const { +#ifdef ASSERT_RANGEMAP_ARE_SORTED +assert(IsSorted()); +#endif +if (!m_entries.empty()) { + typename Collection::const_

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Sbsavecore subregions bug (PR #138206)

2025-05-01 Thread David Peixotto via lldb-commits
@@ -0,0 +1,142 @@ +""" +Test saving a mini dump, from yamilized examples. +""" + +import os +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class ProcessSaveCoreMinidumpTestCaseYaml(TestBase): +

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Sbsavecore subregions bug (PR #138206)

2025-05-01 Thread David Peixotto via lldb-commits
@@ -6689,6 +6689,25 @@ static void GetCoreFileSaveRangesStackOnly(Process &process, } } +// TODO: We should refactor CoreFileMemoryRanges to use the lldb range type, and +// then add an intersect method on it, or MemoryRegionInfo. +static MemoryRegionInfo +Intersect(const

[Lldb-commits] [lldb] [lldb-dap] Fix TestDap_attach.py flakiness (PR #137278)

2025-04-28 Thread David Peixotto via lldb-commits
@@ -380,6 +380,18 @@ def wait_for_event(self, filter=None, timeout=None): ) return None +def wait_for_events(self, events, timeout=None): +"""Wait for a list of events in `events` in any order. +Return the events not hit before the timeo

[Lldb-commits] [lldb] [lldb-dap] Fix TestDap_attach.py flakiness (PR #137278)

2025-04-25 Thread David Peixotto via lldb-commits
https://github.com/dmpots requested changes to this pull request. https://github.com/llvm/llvm-project/pull/137278 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Fix TestDap_attach.py flakiness (PR #137278)

2025-04-25 Thread David Peixotto via lldb-commits
@@ -374,6 +374,15 @@ def wait_for_event(self, filter=None, timeout=None): ) return None +def wait_for_events(self, events, timeout=None): +"""Wait for a list of events in `events` in any order. +Return the events not hit before the timeo

[Lldb-commits] [lldb] [lldb-dap] Fix TestDap_attach.py flakiness (PR #137278)

2025-04-25 Thread David Peixotto via lldb-commits
https://github.com/dmpots approved this pull request. LGTM! I'm not too familiar with the dap protocol, so would be good to get another approver. https://github.com/llvm/llvm-project/pull/137278 ___ lldb-commits mailing list lldb-commits@lists.llvm.or

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-25 Thread David Peixotto via lldb-commits
@@ -174,12 +174,21 @@ struct StatisticsOptions { return !GetSummaryOnly(); } + void SetIncludePlugins(bool value) { m_include_plugins = value; } + bool GetIncludePlugins() const { +if (m_include_plugins.has_value()) + return m_include_plugins.value(); +//

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-25 Thread David Peixotto via lldb-commits
dmpots wrote: @clayborg @JDevlieghere @jimingham I updated the PR to include plugin info in the stats. Please take a look when you get a chance. Thanks! https://github.com/llvm/llvm-project/pull/134418 ___ lldb-commits mailing list lldb-commits@lists.

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-25 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/134418 >From e240bda8fcea9db4d9c456929ba811feb8d4152b Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Tue, 11 Mar 2025 13:02:14 -0700 Subject: [PATCH 01/14] Add commands to list/enable/disable plugins This commit a

[Lldb-commits] [lldb] [lldb-dap] Fix TestDap_attach.py flakiness (PR #137278)

2025-04-25 Thread David Peixotto via lldb-commits
@@ -374,6 +374,12 @@ def wait_for_event(self, filter=None, timeout=None): ) return None +def wait_for_process_and_initialized(self, timeout=None): dmpots wrote: You are taking `timeout` as a parameter here, but not passing it down to

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-23 Thread David Peixotto via lldb-commits
dmpots wrote: > > 1. Are we ok to start with a static table of plugin namespaces or do we > > want dynamic registration from the beginning? > >[Add commands to list/enable/disable plugins #134418 > > (comment)](https://github.com/llvm/llvm-project/pull/134418#discussion_r2029164327) > > I

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-22 Thread David Peixotto via lldb-commits
dmpots wrote: @JDevlieghere @jimingham @clayborg Please take a look at these open questions when you get a chance. Thanks! https://github.com/llvm/llvm-project/pull/134418#issuecomment-2798273256 https://github.com/llvm/llvm-project/pull/134418 ___ l

[Lldb-commits] [lldb] [lldb] Avoid force loading symbols in statistics collection (PR #136236)

2025-04-21 Thread David Peixotto via lldb-commits
https://github.com/dmpots approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/136236 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Avoid force loading symbols in statistics collection (PR #136236)

2025-04-21 Thread David Peixotto via lldb-commits
https://github.com/dmpots edited https://github.com/llvm/llvm-project/pull/136236 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Avoid force loading symbols in statistics collection (PR #136236)

2025-04-21 Thread David Peixotto via lldb-commits
https://github.com/dmpots commented: After your change we can expect that no symbols are loaded by your simple repro, right? Can we extend the test here (or add a new one) to show that no symbols will be loaded in that case by checking the stats? https://github.com/dmpots/llvm-project/blob/mai

[Lldb-commits] [lldb] [lldb] Avoid force loading symbols in statistics collection (PR #136236)

2025-04-21 Thread David Peixotto via lldb-commits
@@ -761,3 +761,77 @@ TEST_F(SymtabTest, TestSymtabCreatedOnDemand) { Symtab *cached_module_symtab = module_sp->GetSymtab(/*can_create=*/false); ASSERT_EQ(module_symtab, cached_module_symtab); } + +TEST_F(SymtabTest, TestSymbolTableCreatedOnDemand) { + const char *yamldata

[Lldb-commits] [lldb] [lldb] Avoid force loading symbols in statistics collection (PR #136236)

2025-04-18 Thread David Peixotto via lldb-commits
@@ -749,10 +749,20 @@ TEST_F(SymtabTest, TestSymtabCreatedOnDemand) { ASSERT_THAT_EXPECTED(ExpectedFile, llvm::Succeeded()); auto module_sp = std::make_shared(ExpectedFile->moduleSpec()); - // The symbol table should not be loaded by default. + // The symbol file should

[Lldb-commits] [lldb] [lldb] Avoid force loading symbols in statistics collection (PR #136236)

2025-04-18 Thread David Peixotto via lldb-commits
@@ -749,10 +749,20 @@ TEST_F(SymtabTest, TestSymtabCreatedOnDemand) { ASSERT_THAT_EXPECTED(ExpectedFile, llvm::Succeeded()); auto module_sp = std::make_shared(ExpectedFile->moduleSpec()); - // The symbol table should not be loaded by default. + // The symbol file should

[Lldb-commits] [lldb] [lldb] Add symbol/table count into statistics (PR #136226)

2025-04-17 Thread David Peixotto via lldb-commits
@@ -168,23 +170,34 @@ def test_default_no_run(self): "totalSymbolTableIndexTime", "totalSymbolTablesLoadedFromCache", "totalSymbolTablesSavedToCache", +"totalSymbolsLoaded", "totalDebugInfoByteSize", "tot

[Lldb-commits] [lldb] [lldb] Add symbol/table count into statistics (PR #136226)

2025-04-17 Thread David Peixotto via lldb-commits
https://github.com/dmpots approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/136226 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add symbol/table count into statistics (PR #136226)

2025-04-17 Thread David Peixotto via lldb-commits
@@ -318,12 +321,15 @@ llvm::json::Value DebuggerStats::ReportStatistics( module_stat.symtab_index_time = module->GetSymtabIndexTime().get().count(); Symtab *symtab = module->GetSymtab(/*can_create=*/false); if (symtab) { + module_stat.num_symbols_loaded = symta

[Lldb-commits] [lldb] [lldb] Add symbol/table count into statistics (PR #136226)

2025-04-17 Thread David Peixotto via lldb-commits
@@ -168,23 +170,34 @@ def test_default_no_run(self): "totalSymbolTableIndexTime", "totalSymbolTablesLoadedFromCache", "totalSymbolTablesSavedToCache", +"totalSymbolsLoaded", dmpots wrote: We should also check for

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-11 Thread David Peixotto via lldb-commits
dmpots wrote: @JDevlieghere @jimingham @clayborg Thanks for the comments. I updated the PR based on the initial feedback. We still have a few open issues that could use a bit more feedback: 1. Are we ok to start with a static table of plugin namespaces or do we want dynamic registration from

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-11 Thread David Peixotto via lldb-commits
@@ -46,12 +49,333 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +#define LLDB_OPTIONS_plugin_list +#include "CommandOptions.inc" + +// These option definitions are shared by the plugin list/enable/disable +// commands. +class PluginListCo

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-11 Thread David Peixotto via lldb-commits
@@ -46,12 +49,333 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +#define LLDB_OPTIONS_plugin_list +#include "CommandOptions.inc" + +// These option definitions are shared by the plugin list/enable/disable +// commands. +class PluginListCo

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-11 Thread David Peixotto via lldb-commits
@@ -46,12 +49,333 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +#define LLDB_OPTIONS_plugin_list +#include "CommandOptions.inc" + +// These option definitions are shared by the plugin list/enable/disable +// commands. +class PluginListCo

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-11 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/134418 >From e240bda8fcea9db4d9c456929ba811feb8d4152b Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Tue, 11 Mar 2025 13:02:14 -0700 Subject: [PATCH 1/7] Add commands to list/enable/disable plugins This commit add

[Lldb-commits] [lldb] [lldb] Fix intel trace plugin tests (PR #133826)

2025-04-05 Thread David Peixotto via lldb-commits
dmpots wrote: Here are the relevant test result changes for this change. Trace Hardware Unsupported == Before --- -- Testing: 11 tests, 11 workers -- Unresolved Tests (7): lldb-api :: commands/trace/TestTraceDumpFunctionCalls.py lldb-api :: commands/trace/

[Lldb-commits] [lldb] [lldb] Fix plugin manager test failure on windows (PR #134173)

2025-04-05 Thread David Peixotto via lldb-commits
https://github.com/dmpots closed https://github.com/llvm/llvm-project/pull/134173 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Remove raw access to PluginInstances vector (PR #132884)

2025-04-05 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/132884 >From 6edc108199044d30eed396145aab463db40d6351 Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Thu, 13 Mar 2025 16:13:45 -0700 Subject: [PATCH 1/2] Remove raw access to PluginInstances vector This commit mod

[Lldb-commits] [lldb] [lldb] Fix intel trace plugin tests (PR #133826)

2025-04-05 Thread David Peixotto via lldb-commits
https://github.com/dmpots created https://github.com/llvm/llvm-project/pull/133826 The tests for the [intel-pt](https://github.com/llvm/llvm-project/blob/348374028970c956f2e49ab7553b495d7408ccd9/lldb/docs/use/intel_pt.rst) trace plugin were failing for multiple reasons. On machines where traci

[Lldb-commits] [lldb] Add enable/disable api for SystemRuntime plugins (PR #133794)

2025-04-05 Thread David Peixotto via lldb-commits
https://github.com/dmpots created https://github.com/llvm/llvm-project/pull/133794 This commit adds support for enabling and disabling plugins by name. The changes are made generically in the `PluginInstances` class, but currently we only expose the ability to SystemRuntime plugins. Other plug

[Lldb-commits] [lldb] Fix the incorrect reporting of dwarf5 .debug_names index time during partial indexing (PR #134133)

2025-04-05 Thread David Peixotto via lldb-commits
@@ -65,6 +65,10 @@ class DebugNamesDWARFIndex : public DWARFIndex { void GetFunctions(const RegularExpression ®ex, llvm::function_ref callback) override; + StatsDuration::Duration GetIndexTime() override { +return m_fallback.GetIndexTime(); -

[Lldb-commits] [lldb] [lldb] Require wide char support in unicode test (PR #131951)

2025-04-05 Thread David Peixotto via lldb-commits
https://github.com/dmpots closed https://github.com/llvm/llvm-project/pull/131951 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-04 Thread David Peixotto via lldb-commits
dmpots wrote: > Another way to do this would be to have the list of disabled plugins show in > the result of the `version` command, since that's a commonly provided bit of > info for bug reports. Thanks for the suggestion. Let me work on this and update the PR. https://github.com/llvm/llvm-p

[Lldb-commits] [lldb] [lldb] Fix plugin manager test failure on windows (PR #134173)

2025-04-04 Thread David Peixotto via lldb-commits
dmpots wrote: > LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` > running on `linaro-lldb-aarch64-ubuntu` while building `lldb` at step 6 > "test". > > Full details are available at: > https://lab.llvm.org/buildbot/#/builders/59/builds/15362 > > Here is the relevant

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/134418 >From e240bda8fcea9db4d9c456929ba811feb8d4152b Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Tue, 11 Mar 2025 13:02:14 -0700 Subject: [PATCH 1/4] Add commands to list/enable/disable plugins This commit add

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-04 Thread David Peixotto via lldb-commits
@@ -46,12 +49,344 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +#define LLDB_OPTIONS_plugin_list +#include "CommandOptions.inc" + +// These option definitions are shared by the plugin list/enable/disable +// commands. +class PluginListCo

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/134418 >From e240bda8fcea9db4d9c456929ba811feb8d4152b Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Tue, 11 Mar 2025 13:02:14 -0700 Subject: [PATCH 1/3] Add commands to list/enable/disable plugins This commit add

[Lldb-commits] [lldb] [lldb] Change test paths to resolve symlinks (PR #132053)

2025-04-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots created https://github.com/llvm/llvm-project/pull/132053 This commit modifes the `getSourceDir()` and `getBuildDir()` functions to use os.path.realpath to resolve symlinks in the Base test class used for API tests. A few tests were failing when the build and source di

[Lldb-commits] [lldb] [lldb] Remove raw access to PluginInstances vector (PR #132884)

2025-04-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/132884 >From 6edc108199044d30eed396145aab463db40d6351 Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Thu, 13 Mar 2025 16:13:45 -0700 Subject: [PATCH 1/2] Remove raw access to PluginInstances vector This commit mod

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/134418 >From e240bda8fcea9db4d9c456929ba811feb8d4152b Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Tue, 11 Mar 2025 13:02:14 -0700 Subject: [PATCH 1/2] Add commands to list/enable/disable plugins This commit add

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-04 Thread David Peixotto via lldb-commits
@@ -46,12 +49,344 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +#define LLDB_OPTIONS_plugin_list +#include "CommandOptions.inc" + +// These option definitions are shared by the plugin list/enable/disable +// commands. +class PluginListCo

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots created https://github.com/llvm/llvm-project/pull/134418 This commit adds three new commands for managing plugins. The `list` command will show which plugins are currently registered and their enabled state. The `enable` and `disable` commands can be used to enable or

[Lldb-commits] [lldb] [lldb] Remove raw access to PluginInstances vector (PR #132884)

2025-04-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots closed https://github.com/llvm/llvm-project/pull/132884 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix plugin manager test failure on windows (PR #134173)

2025-04-02 Thread David Peixotto via lldb-commits
dmpots wrote: This is my guess on what is causing the test failures. Can revert this and the original PR if it doesn't work. https://github.com/llvm/llvm-project/pull/134173 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.

[Lldb-commits] [lldb] [lldb] Fix plugin manager test failure on windows (PR #134173)

2025-04-02 Thread David Peixotto via lldb-commits
dmpots wrote: The windows bots are now passing on this test so I think it was ICF that was the problem: https://lab.llvm.org/buildbot/#/changes/32645 https://github.com/llvm/llvm-project/pull/134173 ___ lldb-commits mailing list lldb-commits@lists.llv

[Lldb-commits] [lldb] [lldb] Fix plugin manager test failure on windows (PR #134173)

2025-04-02 Thread David Peixotto via lldb-commits
https://github.com/dmpots created https://github.com/llvm/llvm-project/pull/134173 This is an attempt to fix a test failure from #133794 when running on windows builds. I suspect we are running into a case where the [ICF](https://learn.microsoft.com/en-us/cpp/build/reference/opt-optimizations?

[Lldb-commits] [lldb] [lldb] Revert plugin manager changes to investigate failure (PR #134183)

2025-04-02 Thread David Peixotto via lldb-commits
https://github.com/dmpots created https://github.com/llvm/llvm-project/pull/134183 Revert the below two commits while we investigate the test failures. Revert "[lldb] Fix plugin manager test failure on windows (#134173)" This reverts commit b55bab229228218341e2f24fc8529c7aaab51e2f. Revert "Ad

[Lldb-commits] [lldb] Add enable/disable api for SystemRuntime plugins (PR #133794)

2025-04-02 Thread David Peixotto via lldb-commits
dmpots wrote: I have an attempted fix for these failures in #134173. I suspect ICF is combining the create functions into a single address which make us unable to remove them based on a unique address (which the plugin manager assumes). https://github.com/llvm/llvm-project/pull/133794

[Lldb-commits] [lldb] Add enable/disable api for SystemRuntime plugins (PR #133794)

2025-03-31 Thread David Peixotto via lldb-commits
dmpots wrote: This PR modifies the PluginManager to support enable/disable. A following [commit](https://github.com/dmpots/llvm-project/commit/aaa3ab3d063580747bb106f39e6792232cc0af00) will expose the commands to the user. This is currently only working for the SystemRuntime plugins. Once thes

[Lldb-commits] [lldb] Plugin toggle roadmap (PR #132876)

2025-03-27 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/132876 >From 21ac6ae78d53feba8322e3aca724ecb01ff7c847 Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Thu, 13 Mar 2025 16:13:45 -0700 Subject: [PATCH 1/3] Remove raw access to PluginInstances vector This commit mod

  1   2   >