[Lldb-commits] [lldb] [LLDB] Fix Memory64 BaseRVA, move all non-stack memory to Mem64. (PR #146777)

2025-07-16 Thread David Peixotto via lldb-commits
@@ -0,0 +1,130 @@ +""" +Test that saved memory regions is byte-wise 1:1 with the live process. Specifically +that the memory regions that will be populated in the Memory64List are the same byte for byte. +""" + +import os +import lldb +from lldbsuite.test.decorators import * +f

[Lldb-commits] [lldb] [LLDB] Fix Memory64 BaseRVA, move all non-stack memory to Mem64. (PR #146777)

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

[Lldb-commits] [lldb] [LLDB] Fix Memory64 BaseRVA, move all non-stack memory to Mem64. (PR #146777)

2025-07-16 Thread David Peixotto via lldb-commits
@@ -169,8 +187,14 @@ llvm::Expected SaveCoreOptions::GetCurrentSizeInBytes() { if (error.Fail()) return error.takeError(); + llvm::Expected core_file_ranges_maybe = + GetMemoryRegionsToSave(); + if (!core_file_ranges_maybe) +return core_file_ranges_maybe.take

[Lldb-commits] [lldb] [LLDB] Fix Memory64 BaseRVA, move all non-stack memory to Mem64. (PR #146777)

2025-07-16 Thread David Peixotto via lldb-commits
@@ -164,3 +164,46 @@ def test_get_total_in_bytes_missing_requirements(self): options.SetStyle(lldb.eSaveCoreCustomOnly) total = options.GetCurrentSizeInBytes(error) self.assertTrue(error.Fail(), error.GetCString()) + +def test_get_memory_regions_to_s

[Lldb-commits] [lldb] [LLDB] Fix Memory64 BaseRVA, move all non-stack memory to Mem64. (PR #146777)

2025-07-16 Thread David Peixotto via lldb-commits
@@ -63,6 +67,12 @@ Note that currently ELF Core files are not supported." Get an SBThreadCollection of all threads marked to be saved. This collection is not sorted according to insertion order." ) lldb::SBSaveCoreOptions::GetThreadsToSave; +%feature("docstring", " +G

[Lldb-commits] [lldb] [LLDB] Fix Memory64 BaseRVA, move all non-stack memory to Mem64. (PR #146777)

2025-07-16 Thread David Peixotto via lldb-commits
@@ -997,6 +982,13 @@ Status MinidumpFileBuilder::ReadWriteMemoryInChunks( return lldb_private::IterationAction::Stop; } +if (current_addr != addr + total_bytes_read) { dmpots wrote: Should this be an error? https://github.com/llvm/llvm-project/

[Lldb-commits] [lldb] [LLDB] Fix Memory64 BaseRVA, move all non-stack memory to Mem64. (PR #146777)

2025-07-16 Thread David Peixotto via lldb-commits
@@ -997,6 +982,13 @@ Status MinidumpFileBuilder::ReadWriteMemoryInChunks( return lldb_private::IterationAction::Stop; } +if (current_addr != addr + total_bytes_read) { + LLDB_LOGF(log, +"Current addr is at expected address, 0x%" PRIx64 --

[Lldb-commits] [lldb] [LLDB] Fix Memory64 BaseRVA, move all non-stack memory to Mem64. (PR #146777)

2025-07-16 Thread David Peixotto via lldb-commits
@@ -0,0 +1,130 @@ +""" +Test that saved memory regions is byte-wise 1:1 with the live process. Specifically +that the memory regions that will be populated in the Memory64List are the same byte for byte. +""" + +import os +import lldb +from lldbsuite.test.decorators import * +f

[Lldb-commits] [lldb] [LLDB] Fix Memory64 BaseRVA, move all non-stack memory to Mem64. (PR #146777)

2025-07-16 Thread David Peixotto via lldb-commits
@@ -128,6 +133,26 @@ uint64_t SBSaveCoreOptions::GetCurrentSizeInBytes(SBError &error) { return *expected_bytes; } +lldb::SBMemoryRegionInfoList SBSaveCoreOptions::GetMemoryRegionsToSave() { + LLDB_INSTRUMENT_VA(this); + llvm::Expected memory_ranges = + m_opaque_up->

[Lldb-commits] [lldb] [LLDB] Fix Memory64 BaseRVA, move all non-stack memory to Mem64. (PR #146777)

2025-07-16 Thread David Peixotto via lldb-commits
@@ -0,0 +1,130 @@ +""" +Test that saved memory regions is byte-wise 1:1 with the live process. Specifically +that the memory regions that will be populated in the Memory64List are the same byte for byte. +""" + +import os +import lldb +from lldbsuite.test.decorators import * +f

[Lldb-commits] [lldb] [LLDB] Fix Memory64 BaseRVA, move all non-stack memory to Mem64. (PR #146777)

2025-07-16 Thread David Peixotto via lldb-commits
@@ -1130,9 +1122,9 @@ MinidumpFileBuilder::AddMemoryList_64(std::vector &ranges, // Capture the starting offset for all the descriptors so we can clean them up // if needed. offset_t starting_offset = - GetCurrentDataEndOffset() + sizeof(llvm::support::ulittle64_t)

[Lldb-commits] [lldb] [LLDB] Fix Memory64 BaseRVA, move all non-stack memory to Mem64. (PR #146777)

2025-07-16 Thread David Peixotto via lldb-commits
@@ -964,6 +964,18 @@ Status PluginManager::SaveCore(const lldb::ProcessSP &process_sp, return error; } + // Set the process sp if not already set. + ProcessSP options_sp = options.GetProcess(); dmpots wrote: The name `options_sp` is a bit confusing t

[Lldb-commits] [lldb] [LLDB] Fix Memory64 BaseRVA, move all non-stack memory to Mem64. (PR #146777)

2025-07-16 Thread David Peixotto via lldb-commits
https://github.com/dmpots commented: nit: Your link to minidump.py in the comment does not link to a python file, but just the scripts repo and I don't see that script in the repo. https://github.com/llvm/llvm-project/pull/146777 ___ lldb-commits mail

[Lldb-commits] [lldb] [LLDB] Fix Memory64 BaseRVA, move all non-stack memory to Mem64. (PR #146777)

2025-07-16 Thread David Peixotto via lldb-commits
@@ -45,6 +45,10 @@ Note that currently ELF Core files are not supported." Resetting will result in the reset of all process specific options, such as Threads to save." ) lldb::SBSaveCoreOptions::SetProcess; +%feature("docstring", " +Get the process to save. If undefin

[Lldb-commits] [lldb] [lldb] Add completions for plugin list/enable/disable (PR #147775)

2025-07-15 Thread David Peixotto via lldb-commits
dmpots wrote: Follow up PR to fix a buildbot failure: #148956 https://github.com/llvm/llvm-project/pull/147775 ___ 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 test to not rely on enabled targets (PR #148956)

2025-07-15 Thread David Peixotto via lldb-commits
dmpots wrote: This is to fix a buildbot failure: https://lab.llvm.org/buildbot/#/builders/195/builds/11884 https://github.com/llvm/llvm-project/pull/148956 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[Lldb-commits] [lldb] [lldb] Fix plugin test to not rely on enabled targets (PR #148956)

2025-07-15 Thread David Peixotto via lldb-commits
https://github.com/dmpots created https://github.com/llvm/llvm-project/pull/148956 The plugins completion test was checking completions for the abi plugins. But the available abi plugins will depend on which [targets](https://github.com/llvm/llvm-project/blob/42d2ae1034b287eb60563c370dbf52c59b

[Lldb-commits] [lldb] [lldb] Add completions for plugin list/enable/disable (PR #147775)

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

[Lldb-commits] [lldb] [lldb] Add completions for plugin list/enable/disable (PR #147775)

2025-07-15 Thread David Peixotto via lldb-commits
@@ -1321,10 +1321,11 @@ enum CompletionType { eTypeCategoryNameCompletion = (1ul << 24), eCustomCompletion = (1ul << 25), eThreadIDCompletion = (1ul << 26), + eManagedPluginCompletion = (1ul << 27), // This last enum element is just for input validation. // Add new

[Lldb-commits] [lldb] Fix a deadlock in ModuleList when starting a standalone lldb client/server (PR #148774)

2025-07-15 Thread David Peixotto via lldb-commits
dmpots wrote: Would it be possible to add a test that triggers this bug? It looks like a fairly simple scenario that launches lldb-server and then attaches to it. Seems like good coverage to have in the test if we don't already. Also, is this a 100% reproducable deadlock or is it somewhat non-

[Lldb-commits] [lldb] When running OS Plugins from dSYM's, make sure start state is correct (PR #146441)

2025-07-15 Thread David Peixotto via lldb-commits
dmpots wrote: @jimingham we found a deadlock that we suspect is related to this patch. Please take a look at the proposed fix in #148774. Thanks! https://github.com/llvm/llvm-project/pull/146441 ___ lldb-commits mailing list lldb-commits@lists.llvm.or

[Lldb-commits] [lldb] [lldb] Add completions for plugin list/enable/disable (PR #147775)

2025-07-10 Thread David Peixotto via lldb-commits
@@ -2473,3 +2474,35 @@ bool PluginManager::SetUnwindAssemblyPluginEnabled(llvm::StringRef name, bool enable) { return GetUnwindAssemblyInstances().SetInstanceEnabled(name, enable); } + +void PluginManager::AutoCompletePlugin

[Lldb-commits] [lldb] [lldb] Add completions for plugin list/enable/disable (PR #147775)

2025-07-10 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/147775 >From c35518e7b221ffbc43b9fb6aa3cbec079bda39b2 Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Thu, 3 Jul 2025 17:08:27 -0700 Subject: [PATCH 1/2] [lldb] Add completions for plugin list/enable/disable This c

[Lldb-commits] [lldb] [lldb] Add completions for plugin list/enable/disable (PR #147775)

2025-07-10 Thread David Peixotto via lldb-commits
@@ -2473,3 +2474,35 @@ bool PluginManager::SetUnwindAssemblyPluginEnabled(llvm::StringRef name, bool enable) { return GetUnwindAssemblyInstances().SetInstanceEnabled(name, enable); } + +void PluginManager::AutoCompletePlugin

[Lldb-commits] [lldb] [lldb] Add completions for plugin list/enable/disable (PR #147775)

2025-07-09 Thread David Peixotto via lldb-commits
https://github.com/dmpots created https://github.com/llvm/llvm-project/pull/147775 This commit adds completion support for the plugin commands. It will try to complete partial namespaces to the full namespace string. If the completion input is already a full namespace string then it will add a

[Lldb-commits] [lldb] Defer loading all DWOs by default when dumping separate_debug-info (PR #146166)

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

[Lldb-commits] [clang] [lldb] [llvm] [lldb] Fix object format in the Triple of Mach-O files (approach 4) (PR #145157)

2025-06-27 Thread David Peixotto via lldb-commits
@@ -642,9 +642,9 @@ bool SBDebugger::GetDefaultArchitecture(char *arch_name, size_t arch_name_len) { ArchSpec default_arch = Target::GetDefaultArchitecture(); if (default_arch.IsValid()) { - const std::string &triple_str = default_arch.GetTriple().str(); + c

[Lldb-commits] [clang] [lldb] [llvm] [lldb] Fix object format in the Triple of Mach-O files (approach 4) (PR #145157)

2025-06-27 Thread David Peixotto via lldb-commits
@@ -463,6 +463,27 @@ class Triple { const std::string &str() const { return Data; } + /// Return the triple string but only keep the first \p N components. + /// + /// The returned string will preserve the first \p N components exactly the + /// same as the original (in

[Lldb-commits] [lldb] Add option to not loading all DWOs when dumping separate_debug-info (PR #146166)

2025-06-27 Thread David Peixotto via lldb-commits
@@ -2547,6 +2561,7 @@ class CommandObjectTargetModulesDumpSeparateDebugInfoFiles OptionValueBoolean m_json = false; OptionValueBoolean m_errors_only = false; +OptionValueBoolean m_load_all_debug_info = true; dmpots wrote: I wonder if it would be b

[Lldb-commits] [lldb] Add option to not loading all DWOs when dumping separate_debug-info (PR #146166)

2025-06-27 Thread David Peixotto via lldb-commits
@@ -2030,7 +2032,8 @@ class CommandObjectTargetModulesDumpSymtab } if (INTERRUPT_REQUESTED(GetDebugger(), "Interrupted in dump all symtabs with {0} " - "of {1} dumped.", num_dumped, num_modul

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

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

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

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

[Lldb-commits] [lldb] [lldb] Add count for number of DWO files loaded in statistics (PR #144424)

2025-06-17 Thread David Peixotto via lldb-commits
@@ -512,6 +522,119 @@ def test_breakpoints(self): self.verify_keys( breakpoint, 'target_stats["breakpoints"]', bp_keys_exist, None ) +def test_non_split_dwarf_has_no_dwo_files(self): +""" +Test "statistics dump" and th

[Lldb-commits] [lldb] [lldb] Add count for number of DWO files loaded in statistics (PR #144424)

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

[Lldb-commits] [lldb] [lldb] Add count for number of DWO files loaded in statistics (PR #144424)

2025-06-17 Thread David Peixotto via lldb-commits
https://github.com/dmpots approved this pull request. LGTM! You should get approvals from @jeffreytan81 and @clayborg as well before merging. https://github.com/llvm/llvm-project/pull/144424 ___ lldb-commits mailing list lldb-commits@lists.llvm.org ht

[Lldb-commits] [lldb] [lldb] Add support to list/enable/disable remaining plugin types. (PR #143970)

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

[Lldb-commits] [lldb] [lldb] Add count for number of DWO files loaded in statistics (PR #144424)

2025-06-17 Thread David Peixotto via lldb-commits
@@ -353,6 +355,30 @@ llvm::json::Value DebuggerStats::ReportStatistics( for (const auto &symbol_module : symbol_modules.Modules()) module_stat.symfile_modules.push_back((intptr_t)symbol_module.get()); } + // Count DWO files from this symbol file usi

[Lldb-commits] [lldb] [lldb] Add count for number of DWO files loaded in statistics (PR #144424)

2025-06-17 Thread David Peixotto via lldb-commits
@@ -512,6 +517,32 @@ def test_breakpoints(self): self.verify_keys( breakpoint, 'target_stats["breakpoints"]', bp_keys_exist, None ) + +def test_loaded_dwo_file_count(self): +""" +Test "statistics dump" and the load

[Lldb-commits] [lldb] [lldb] Fix `ObjectFileMachO` object format when missing version load commands (PR #144177)

2025-06-16 Thread David Peixotto via lldb-commits
https://github.com/dmpots commented: There is one early return in this function: https://github.com/llvm/llvm-project/pull/144177/files#diff-1c2c090c5ff772b9b304dbdd4cf45803478f4f33d11d042817fea7358e0cc96bL5167 I wonder if we need to handle this case as well. https://github.com/llvm/llvm-proje

[Lldb-commits] [lldb] [lldb] Fix `ObjectFileMachO` object format when missing version load commands (PR #144177)

2025-06-16 Thread David Peixotto via lldb-commits
@@ -94,4 +94,128 @@ TEST_F(ObjectFileMachOTest, IndirectSymbolsInTheSharedCache) { for (size_t i = 0; i < 10; i++) OF->ParseSymtab(symtab); } + +TEST_F(ObjectFileMachOTest, ObjectFormatWithVersionLoadCommand) { + // A Mach-O file of arm64 CPU type and macOS 10.14.0 + c

[Lldb-commits] [lldb] [lldb] Fix `ObjectFileMachO` object format when missing version load commands (PR #144177)

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

[Lldb-commits] [lldb] [lldb] Fix `ObjectFileMachO` object format when missing version load commands (PR #144177)

2025-06-16 Thread David Peixotto via lldb-commits
https://github.com/dmpots approved this pull request. LGTM. Had one question about the strictness of a test. https://github.com/llvm/llvm-project/pull/144177 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[Lldb-commits] [lldb] [lldb] Add support to list/enable/disable remaining plugin types. (PR #143970)

2025-06-13 Thread David Peixotto via lldb-commits
dmpots wrote: I'll wait a few more days before merging in case someone wants to add more feedback. https://github.com/llvm/llvm-project/pull/143970 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[Lldb-commits] [lldb] [lldb] Add support to list/enable/disable remaining plugin types. (PR #143970)

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

[Lldb-commits] [lldb] [lldb] Add support to list/enable/disable remaining plugin types. (PR #143970)

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

[Lldb-commits] [lldb] [lldb] Add support to list/enable/disable remaining plugin types. (PR #143970)

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

[Lldb-commits] [lldb] [lldb] Add support to list/enable/disable remaining plugin types. (PR #143970)

2025-06-13 Thread David Peixotto via lldb-commits
@@ -10,10 +10,10 @@ # Test plugin list without an argument will list all plugins. plugin list # CHECK-LABEL: plugin list -# CHECK: system-runtime -# CHECK: [+] systemruntime-macosx System runtime plugin for Mac OS X native libraries # CHECK: instrumentation-runtime

[Lldb-commits] [lldb] [lldb] Add support to list/enable/disable remaining plugin types. (PR #143970)

2025-06-13 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/143970 >From 10f527ddd5b3defc3e7ceef8c5a00ffba9f77b74 Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Thu, 12 Jun 2025 11:17:53 -0700 Subject: [PATCH 1/4] Use PluginInstances instead of vector for Architecuture plu

[Lldb-commits] [lldb] [lldb] Add support to list/enable/disable remaining plugin types. (PR #143970)

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

[Lldb-commits] [lldb] [lldb] Add support to list/enable/disable remaining plugin types. (PR #143970)

2025-06-12 Thread David Peixotto via lldb-commits
@@ -690,6 +678,102 @@ class PluginManager { static bool CreateSettingForCPlusPlusLanguagePlugin( Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property); + + // + // Plugin Info+Enable Declara

[Lldb-commits] [lldb] [lldb] Add support to list/enable/disable remaining plugin types. (PR #143970)

2025-06-12 Thread David Peixotto via lldb-commits
https://github.com/dmpots commented: Added a few notes and potential points of discussion. https://github.com/llvm/llvm-project/pull/143970 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-c

[Lldb-commits] [lldb] [lldb] Add support to list/enable/disable remaining plugin types. (PR #143970)

2025-06-12 Thread David Peixotto via lldb-commits
@@ -10,10 +10,10 @@ # Test plugin list without an argument will list all plugins. plugin list # CHECK-LABEL: plugin list -# CHECK: system-runtime -# CHECK: [+] systemruntime-macosx System runtime plugin for Mac OS X native libraries # CHECK: instrumentation-runtime

[Lldb-commits] [lldb] [lldb] Add support to list/enable/disable remaining plugin types. (PR #143970)

2025-06-12 Thread David Peixotto via lldb-commits
@@ -407,7 +569,7 @@ ABICreateInstance PluginManager::GetABICreateCallbackAtIndex(uint32_t idx) { #pragma mark Architecture typedef PluginInstance ArchitectureInstance; -typedef std::vector ArchitectureInstances; +typedef PluginInstances ArchitectureInstances;

[Lldb-commits] [lldb] [lldb] Add support to list/enable/disable remaining plugin types. (PR #143970)

2025-06-12 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/143970 >From 10f527ddd5b3defc3e7ceef8c5a00ffba9f77b74 Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Thu, 12 Jun 2025 11:17:53 -0700 Subject: [PATCH 1/3] Use PluginInstances instead of vector for Architecuture plu

[Lldb-commits] [lldb] [lldb] Add support to list/enable/disable remaining plugin types. (PR #143970)

2025-06-12 Thread David Peixotto via lldb-commits
https://github.com/dmpots created https://github.com/llvm/llvm-project/pull/143970 In #134418 we added support to list/enable/disable `SystemRuntime` and `InstrumentationRuntime` plugins. We limited it to those two plugin types to flesh out the idea with a smaller change. This PR adds support f

[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

  1   2   >