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

2025-05-30 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. 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] Add commands to list/enable/disable plugins (PR #134418)

2025-05-29 Thread Greg Clayton 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-05-29 Thread Greg Clayton 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-05-29 Thread Greg Clayton 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-05-29 Thread Greg Clayton 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-05-29 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. 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-05-29 Thread Greg Clayton 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] [LLDB][Minidump] Fix bug in generating 64b memory minidumps (PR #141995)

2025-05-29 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. https://github.com/llvm/llvm-project/pull/141995 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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

2025-04-24 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Looks good. Watch the buildbot, and please run your tests on both macOS and linux prior to merging to ensure we don't fail. I am a bit worried about system runtime plug-ins causing symbols to be loaded on some configs. https://github.com/

[Lldb-commits] [lldb] [lldb] Remerge #136236 (PR #136795)

2025-04-23 Thread Greg Clayton via lldb-commits
@@ -209,6 +209,26 @@ def test_default_no_run(self): ) self.assertGreater(module_stats["symbolsLoaded"], 0) clayborg wrote: Same here, renamed "symbolTableSymbolCount" https://github.com/llvm/llvm-project/pull/136795 ___

[Lldb-commits] [lldb] [lldb] Remerge #136236 (PR #136795)

2025-04-23 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. https://github.com/llvm/llvm-project/pull/136795 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Remerge #136236 (PR #136795)

2025-04-23 Thread Greg Clayton via lldb-commits
@@ -209,6 +209,26 @@ def test_default_no_run(self): ) self.assertGreater(module_stats["symbolsLoaded"], 0) +def test_default_no_run_no_preload_symbols(self): +"""Test "statistics dump" without running the target and without +preloadi

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

2025-04-23 Thread Greg Clayton via lldb-commits
clayborg wrote: Can we renamed `"symbolsLoaded"` to `"symbolTableSymbolCount"` and `"totalSymbolsLoaded"` to `"totalSymbolTableSymbolCount"`? This would be more consistent with the other symbol table statistics https://github.com/llvm/llvm-project/pull/136226 __

[Lldb-commits] [lldb] [lldb][Minidump Parser] Implement a range data vector for minidump memory ranges (PR #136040)

2025-04-22 Thread Greg Clayton via lldb-commits
@@ -45,9 +49,16 @@ struct Range { friend bool operator==(const Range &lhs, const Range &rhs) { return lhs.start == rhs.start && lhs.range_ref == rhs.range_ref; } + + friend bool operator<(const Range &lhs, const Range &rhs) { +return lhs.start < rhs.start; + } ---

[Lldb-commits] [lldb] [lldb][Minidump Parser] Implement a range data vector for minidump memory ranges (PR #136040)

2025-04-22 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. https://github.com/llvm/llvm-project/pull/136040 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add symbol locator time for each module in statistics (PR #134563)

2025-04-18 Thread Greg Clayton via lldb-commits
@@ -992,6 +997,8 @@ ModuleList::GetSharedModule(const ModuleSpec &module_spec, ModuleSP &module_sp, // By getting the object file we can guarantee that the architecture // matches if (module_sp && module_sp->GetObjectFile()) { +module_sp->GetSymbolLoc

[Lldb-commits] [lldb] Add symbol locator time for each module in statistics (PR #134563)

2025-04-18 Thread Greg Clayton via lldb-commits
@@ -814,8 +814,16 @@ Status PlatformDarwinKernel::GetSharedModuleKernel( // append ".dSYM" to the filename for the SymbolFile. FileSpecList search_paths = process->GetTarget().GetDebugFileSearchPaths(); -FileSpec dsym_fspec = -Plu

[Lldb-commits] [lldb] Add symbol locator time for each module in statistics (PR #134563)

2025-04-18 Thread Greg Clayton via lldb-commits
@@ -297,6 +309,10 @@ Status ProcessKDP::DoConnectRemote(llvm::StringRef remote_url) { if (FileSystem::Instance().Exists(module_spec.GetFileSpec())) { ModuleSP module_sp(new Module(module_spec)); +module_sp->GetSymbolLocatorStatist

[Lldb-commits] [lldb] Add symbol locator time for each module in statistics (PR #134563)

2025-04-18 Thread Greg Clayton via lldb-commits
@@ -122,6 +122,7 @@ struct ModuleStats { double symtab_index_time = 0.0; double debug_parse_time = 0.0; double debug_index_time = 0.0; + llvm::StringMap symbol_locator_time; clayborg wrote: We should move `StatisticsMap` into this file and then have `St

[Lldb-commits] [lldb] Add symbol locator time for each module in statistics (PR #134563)

2025-04-18 Thread Greg Clayton via lldb-commits
@@ -917,9 +917,14 @@ ModuleList::GetSharedModule(const ModuleSpec &module_spec, ModuleSP &module_sp, // Fixup the incoming path in case the path points to a valid file, yet the // arch or UUID (if one was passed in) don't match. - ModuleSpec located_binary_modulespec = -

[Lldb-commits] [lldb] Add symbol locator time for each module in statistics (PR #134563)

2025-04-18 Thread Greg Clayton via lldb-commits
@@ -276,12 +276,24 @@ Status ProcessKDP::DoConnectRemote(llvm::StringRef remote_url) { // Lookup UUID locally, before attempting dsymForUUID like action FileSpecList search_paths = Target::GetDefaultDebugFileSearchPaths(); -

[Lldb-commits] [lldb] Add symbol locator time for each module in statistics (PR #134563)

2025-04-18 Thread Greg Clayton via lldb-commits
@@ -243,15 +243,33 @@ ModuleSP DynamicLoader::LoadBinaryWithUUIDAndAddress( // find an executable and symbol file. if (!module_sp) { FileSpecList search_paths = Target::GetDefaultDebugFileSearchPaths(); - module_spec.GetSymbolFileSpec() = - PluginMan

[Lldb-commits] [lldb] Add symbol locator time for each module in statistics (PR #134563)

2025-04-18 Thread Greg Clayton via lldb-commits
@@ -243,15 +243,33 @@ ModuleSP DynamicLoader::LoadBinaryWithUUIDAndAddress( // find an executable and symbol file. if (!module_sp) { FileSpecList search_paths = Target::GetDefaultDebugFileSearchPaths(); - module_spec.GetSymbolFileSpec() = - PluginMan

[Lldb-commits] [lldb] Add symbol locator time for each module in statistics (PR #134563)

2025-04-18 Thread Greg Clayton via lldb-commits
@@ -956,6 +961,20 @@ class Module : public std::enable_shared_from_this, bool m_match_name_after_lookup = false; }; + class StatisticsMap { + public: +void add(const std::string &key, double value) { + if (key.empty()) +return; + auto it = map.fin

[Lldb-commits] [lldb] Add symbol locator time for each module in statistics (PR #134563)

2025-04-18 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. https://github.com/llvm/llvm-project/pull/134563 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Make SBProcess thread related actions listen to StopLocker (PR #134339)

2025-04-15 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. https://github.com/llvm/llvm-project/pull/134339 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Make SBProcess thread related actions listen to StopLocker (PR #134339)

2025-04-11 Thread Greg Clayton via lldb-commits
@@ -870,6 +870,16 @@ llvm::json::Value CreateThread(lldb::SBThread &thread, lldb::SBFormat &format) { return llvm::json::Value(std::move(object)); } +llvm::json::Array GetThreads(lldb::SBProcess process, lldb::SBFormat &format) { + llvm::json::Array threads; + const uint3

[Lldb-commits] [lldb] [lldb] Make SBProcess thread related actions listen to StopLocker (PR #134339)

2025-04-11 Thread Greg Clayton via lldb-commits
@@ -52,8 +64,14 @@ void ConfigurationDoneRequestHandler::operator()( dap.configuration_done_sent = true; if (dap.stop_at_entry) SendThreadStoppedEvent(dap); - else + else { +// Client requests the baseline of currently existing threads after +// a successful l

[Lldb-commits] [lldb] [lldb] Make SBProcess thread related actions listen to StopLocker (PR #134339)

2025-04-11 Thread Greg Clayton via lldb-commits
@@ -870,6 +870,16 @@ llvm::json::Value CreateThread(lldb::SBThread &thread, lldb::SBFormat &format) { return llvm::json::Value(std::move(object)); } +llvm::json::Array GetThreads(lldb::SBProcess process, lldb::SBFormat &format) { + llvm::json::Array threads; + const uint3

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-04-10 Thread Greg Clayton via lldb-commits
@@ -969,6 +969,64 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } +Status MinidumpFileBuilder::ReadWriteMemoryInChunks( +lldb_private::DataBufferHeap &data_buffer, +const lldb_private::CoreFileMemoryRange &range, uint64_t &bytes_read) { + +

[Lldb-commits] [lldb] Add locate time and all symbol file path for each module in statistics (PR #134563)

2025-04-10 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: We should talk about the new API you want to add: ``` virtual std::vector SymbolFile::GetAllObjectFiles(); ``` https://github.com/llvm/llvm-project/pull/134563 ___ lldb-commits mailing list lldb-commits@lists.llv

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

2025-04-10 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: I do like the ability to enable/disable any plug-in, but we should only add support for enabling and disabling plug-ins that are optional. This patch adds the ability to enable/disable system runtime plug-ins so that is good. A few things to think about:

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

2025-04-10 Thread Greg Clayton 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-10 Thread Greg Clayton 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-10 Thread Greg Clayton 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] [lldb] Handle signals in a separate thread in the driver (PR #134956)

2025-04-10 Thread Greg Clayton via lldb-commits
clayborg wrote: Signals can be listened for via a file descriptor as well. Not sure if this improves the ability to do things in signal handlers as the default way of catching signals has all sorts of limitations. If it does improve the safety and ability to do things in the signal handler, we

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

2025-04-10 Thread Greg Clayton 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 locate time and all symbol file path for each module in statistics (PR #134563)

2025-04-09 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/134563 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add locate time and all symbol file path for each module in statistics (PR #134563)

2025-04-09 Thread Greg Clayton via lldb-commits
@@ -422,6 +424,11 @@ class SymbolFile : public PluginInterface { /// hasn't been indexed yet, or a valid duration if it has. virtual StatsDuration::Duration GetDebugInfoIndexTime() { return {}; } + /// Return the time it took to locate any extra symbol files. + /// + //

[Lldb-commits] [lldb] Add locate time and all symbol file path for each module in statistics (PR #134563)

2025-04-09 Thread Greg Clayton via lldb-commits
@@ -355,6 +355,8 @@ class SymbolFile : public PluginInterface { virtual const ObjectFile *GetObjectFile() const = 0; virtual ObjectFile *GetMainObjectFile() = 0; + virtual std::vector GetAllObjectFiles(); + clayborg wrote: This call should be in `lldb_pr

[Lldb-commits] [lldb] Add locate time and all symbol file path for each module in statistics (PR #134563)

2025-04-09 Thread Greg Clayton via lldb-commits
@@ -4267,6 +4269,8 @@ const std::shared_ptr &SymbolFileDWARF::GetDwpSymbolFile() { // find the correct DWP file, as the Debuginfod plugin uses *only* this // data to correctly match the DWP file with the binary. module_spec.GetUUID() = m_objfile_sp->GetUUID()

[Lldb-commits] [lldb] Add locate time and all symbol file path for each module in statistics (PR #134563)

2025-04-09 Thread Greg Clayton via lldb-commits
@@ -4250,11 +4250,13 @@ const std::shared_ptr &SymbolFileDWARF::GetDwpSymbolFile() { ModuleSpec module_spec; module_spec.GetFileSpec() = m_objfile_sp->GetFileSpec(); FileSpec dwp_filespec; +StatsDuration duration; for (const auto &symfile : symfiles.files(

[Lldb-commits] [lldb] Add locate time and all symbol file path for each module in statistics (PR #134563)

2025-04-09 Thread Greg Clayton via lldb-commits
@@ -111,7 +111,7 @@ struct ModuleStats { std::string uuid; std::string triple; // Path separate debug info file, or empty if none. - std::string symfile_path; + std::vector symfile_path; clayborg wrote: This shouldn't be a vector. The `lldb_private::M

[Lldb-commits] [lldb] Add locate time and all symbol file path for each module in statistics (PR #134563)

2025-04-09 Thread Greg Clayton via lldb-commits
@@ -4267,6 +4269,8 @@ const std::shared_ptr &SymbolFileDWARF::GetDwpSymbolFile() { // find the correct DWP file, as the Debuginfod plugin uses *only* this // data to correctly match the DWP file with the binary. module_spec.GetUUID() = m_objfile_sp->GetUUID()

[Lldb-commits] [lldb] [RFC][lldb-dap] Always stop on enrty for attaching (PR #134339)

2025-04-08 Thread Greg Clayton via lldb-commits
clayborg wrote: > That code has been there at least since the dread reformatting. > > I have no idea why past one of us thought it was a good idea to return the > previous number of threads or the old thread list when you weren't stopped. > We don't do that with most anything else you ask abou

[Lldb-commits] [lldb] [RFC][lldb-dap] Always stop on enrty for attaching (PR #134339)

2025-04-08 Thread Greg Clayton via lldb-commits
clayborg wrote: So after looking further into the, the issue is that `SBProcess::GetNumThreads()` and `SBProcess::GetThreadAtIndex()` will ignore the process stop locker and return stale data. If the run lock can't be acquired, it will not allow the thread list to update, but will return the

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-04-07 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. https://github.com/llvm/llvm-project/pull/129307 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-04-07 Thread Greg Clayton via lldb-commits
@@ -1589,6 +1589,51 @@ class Process : public std::enable_shared_from_this, size_t ReadMemoryFromInferior(lldb::addr_t vm_addr, void *buf, size_t size, Status &error); + // Callback definition for read Memory in chunks + // + // Status, th

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-04-07 Thread Greg Clayton via lldb-commits
@@ -2233,6 +2233,49 @@ size_t Process::ReadMemoryFromInferior(addr_t addr, void *buf, size_t size, return bytes_read; } +size_t Process::ReadMemoryInChunks(lldb::addr_t vm_addr, void *buf, + lldb::addr_t chunk_size, size_t size, +

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-04-07 Thread Greg Clayton via lldb-commits
@@ -969,6 +969,66 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } +Status MinidumpFileBuilder::ReadWriteMemoryInChunks( +lldb_private::DataBufferHeap &data_buffer, +const lldb_private::CoreFileMemoryRange &range, uint64_t &bytes_read) { + +

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-04-07 Thread Greg Clayton via lldb-commits
@@ -1589,6 +1589,51 @@ class Process : public std::enable_shared_from_this, size_t ReadMemoryFromInferior(lldb::addr_t vm_addr, void *buf, size_t size, Status &error); + // Callback definition for read Memory in chunks + // + // Status, th

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-04-07 Thread Greg Clayton via lldb-commits
@@ -969,6 +969,66 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } +Status MinidumpFileBuilder::ReadWriteMemoryInChunks( +lldb_private::DataBufferHeap &data_buffer, +const lldb_private::CoreFileMemoryRange &range, uint64_t &bytes_read) { + +

[Lldb-commits] [lldb] [RFC][lldb-dap] Always stop on enrty for attaching (PR #134339)

2025-04-07 Thread Greg Clayton via lldb-commits
clayborg wrote: So the issue from only the lldb-dap side here is VS Code is sending a threads request, but we have resumed the process upon attach after sending the configuration done request. So the race condition happens like: - send configuration done - send continue to process if stop on e

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-04-07 Thread Greg Clayton via lldb-commits
@@ -1589,6 +1589,48 @@ class Process : public std::enable_shared_from_this, size_t ReadMemoryFromInferior(lldb::addr_t vm_addr, void *buf, size_t size, Status &error); + // Callback definition for read Memory in chunks + // + // Status, th

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-04-07 Thread Greg Clayton via lldb-commits
@@ -2233,6 +2233,40 @@ size_t Process::ReadMemoryFromInferior(addr_t addr, void *buf, size_t size, return bytes_read; } +size_t Process::ReadMemoryInChunks(lldb::addr_t vm_addr, DataBufferHeap &data, clayborg wrote: There is no need to pass in a DataBuffer

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

2025-04-07 Thread Greg Clayton 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-07 Thread Greg Clayton via lldb-commits
https://github.com/clayborg 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-04-07 Thread Greg Clayton 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-07 Thread Greg Clayton 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-07 Thread Greg Clayton 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] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-04-07 Thread Greg Clayton via lldb-commits
@@ -1589,6 +1589,48 @@ class Process : public std::enable_shared_from_this, size_t ReadMemoryFromInferior(lldb::addr_t vm_addr, void *buf, size_t size, Status &error); + // Callback definition for read Memory in chunks + // + // Status, th

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

2025-04-07 Thread Greg Clayton via lldb-commits
clayborg wrote: > Either no one is going to use this except experts, or people will start > cargo-culting "turn off plugin X and lldb will be faster" and then we get > "Why doesn't 'obvious thing'" work bug reports, to which the answer would be > "turn on plugin X" but people may not even know

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-04-07 Thread Greg Clayton via lldb-commits
@@ -969,6 +969,64 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } +Status MinidumpFileBuilder::ReadWriteMemoryInChunks( +lldb_private::DataBufferHeap &data_buffer, +const lldb_private::CoreFileMemoryRange &range, uint64_t &bytes_read) { + +

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-04-07 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. https://github.com/llvm/llvm-project/pull/129307 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [lldb][lldb-dap] Implement jump to cursor (PR #130503)

2025-04-04 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,165 @@ +//===-- GoToTargetsRequestHandler.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb] Make ELF files able to load section headers from memory. (PR #129166)

2025-04-04 Thread Greg Clayton via lldb-commits
@@ -1477,32 +1506,32 @@ size_t ObjectFileELF::GetSectionHeaderInfo(SectionHeaderColl §ion_headers, } if (idx < section_headers.size()) section_headers.resize(idx); + // Sometimes we are able to read the section header memory from an in memory clayborg

[Lldb-commits] [lldb] [LLDB] Expose checking if the symbol file exists/is loaded via SBModule (PR #134163)

2025-04-03 Thread Greg Clayton via lldb-commits
clayborg wrote: Just a quick comment here for this: ``` /// Get if the symbol file for this module is loaded. bool IsDebugInfoLoaded() const; ``` This isn't clear what it is returning. What it seems like it should be returning from the name is "are there debug symbols in this module. But wha

[Lldb-commits] [lldb] [SBProgress][CLI] Configure sbprogress events to be emitted for the CLI (PR #133309)

2025-03-27 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: I am fine with this being always enabled. I will defer to Jonas to make sure he is https://github.com/llvm/llvm-project/pull/133309 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-27 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,175 @@ +//===-- WriteMemoryRequestHandler.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-27 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,175 @@ +//===-- WriteMemoryRequestHandler.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-27 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,175 @@ +//===-- WriteMemoryRequestHandler.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-27 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,175 @@ +//===-- WriteMemoryRequestHandler.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-27 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,175 @@ +//===-- WriteMemoryRequestHandler.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-27 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,175 @@ +//===-- WriteMemoryRequestHandler.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-27 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,175 @@ +//===-- WriteMemoryRequestHandler.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-27 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,175 @@ +//===-- WriteMemoryRequestHandler.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-27 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. https://github.com/llvm/llvm-project/pull/131820 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [lldb][lldb-dap] Implement jump to cursor (PR #130503)

2025-03-26 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,165 @@ +//===-- GoToTargetsRequestHandler.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [llvm] [lldb][lldb-dap] Implement jump to cursor (PR #130503)

2025-03-26 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,165 @@ +//===-- GoToTargetsRequestHandler.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [llvm] [lldb][lldb-dap] Implement jump to cursor (PR #130503)

2025-03-26 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,165 @@ +//===-- GoToTargetsRequestHandler.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [llvm] [lldb][lldb-dap] Implement jump to cursor (PR #130503)

2025-03-26 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,165 @@ +//===-- GoToTargetsRequestHandler.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [llvm] [lldb][lldb-dap] Implement jump to cursor (PR #130503)

2025-03-25 Thread Greg Clayton via lldb-commits
@@ -77,6 +77,27 @@ enum class PacketStatus { enum class ReplMode { Variable = 0, Command, Auto }; +class Gotos { +public: + /// \return the line_entry corresponding with \p id + /// + /// If \p id is invalid std::nullopt is returned. + std::optional GetLineEntry(uint64_t

[Lldb-commits] [lldb] [llvm] [lldb][lldb-dap] Implement jump to cursor (PR #130503)

2025-03-25 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/130503 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Make breakpoint stop reason more accurate for function breakpoints (PR #130841)

2025-03-24 Thread Greg Clayton via lldb-commits
@@ -962,28 +962,43 @@ llvm::json::Value CreateThreadStopped(DAP &dap, lldb::SBThread &thread, body.try_emplace("reason", "step"); break; case lldb::eStopReasonBreakpoint: { -ExceptionBreakpoint *exc_bp = dap.GetExceptionBPFromStopReason(thread); +const auto *

[Lldb-commits] [lldb] Make breakpoint stop reason more accurate for function breakpoints (PR #130841)

2025-03-24 Thread Greg Clayton via lldb-commits
@@ -392,9 +391,55 @@ struct DAP { void SetThreadFormat(llvm::StringRef format); - InstructionBreakpoint *GetInstructionBreakpoint(const lldb::break_id_t bp_id); + template + BreakpointType *GetBreakpointFromStopReason(lldb::SBThread &thread) { +// Check to see if h

[Lldb-commits] [lldb] [lldb] Make ELF files able to load section headers from memory. (PR #129166)

2025-03-21 Thread Greg Clayton via lldb-commits
@@ -1477,32 +1506,32 @@ size_t ObjectFileELF::GetSectionHeaderInfo(SectionHeaderColl §ion_headers, } if (idx < section_headers.size()) section_headers.resize(idx); + // Sometimes we are able to read the section header memory from an in memory clayborg

[Lldb-commits] [lldb] [lldb] Make ELF files able to load section headers from memory. (PR #129166)

2025-03-21 Thread Greg Clayton via lldb-commits
@@ -1477,32 +1506,32 @@ size_t ObjectFileELF::GetSectionHeaderInfo(SectionHeaderColl §ion_headers, } if (idx < section_headers.size()) section_headers.resize(idx); + // Sometimes we are able to read the section header memory from an in memory clayborg

[Lldb-commits] [lldb] Make breakpoint stop reason more accurate for function breakpoints (PR #130841)

2025-03-18 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Pretty good start. There can be more than one breakpoint at a location and we need to be sure we test these cases. Like we can have an exception breakpoint (which might be at `cxa_throw`) and we can have a function breakpoint for this as well. We need to

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-15 Thread Greg Clayton via lldb-commits
@@ -969,6 +969,83 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } +Status MinidumpFileBuilder::ReadWriteMemoryInChunks( +const std::unique_ptr &data_up, +const lldb_private::CoreFileMemoryRange &range, uint64_t *bytes_read) { + if (!data_up)

[Lldb-commits] [lldb] [lldb] Avoid force loading symbol files in statistics collection (PR #129593)

2025-03-15 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. https://github.com/llvm/llvm-project/pull/129593 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-15 Thread Greg Clayton via lldb-commits
@@ -969,6 +969,83 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } +Status MinidumpFileBuilder::ReadWriteMemoryInChunks( +const std::unique_ptr &data_up, +const lldb_private::CoreFileMemoryRange &range, uint64_t *bytes_read) { + if (!data_up)

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-15 Thread Greg Clayton via lldb-commits
@@ -969,12 +969,89 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } -static uint64_t -GetLargestRangeSize(const std::vector &ranges) { - uint64_t max_size = 0; - for (const auto &core_range : ranges) -max_size = std::max(max_size, core_range.ran

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Greg Clayton via lldb-commits
@@ -969,6 +969,83 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } +Status MinidumpFileBuilder::ReadWriteMemoryInChunks( +const std::unique_ptr &data_up, +const lldb_private::CoreFileMemoryRange &range, uint64_t *bytes_read) { + if (!data_up)

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Greg Clayton via lldb-commits
@@ -969,6 +969,83 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } +Status MinidumpFileBuilder::ReadWriteMemoryInChunks( +const std::unique_ptr &data_up, +const lldb_private::CoreFileMemoryRange &range, uint64_t *bytes_read) {

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Greg Clayton via lldb-commits
@@ -142,6 +142,13 @@ class MinidumpFileBuilder { lldb_private::Status AddDirectory(llvm::minidump::StreamType type, uint64_t stream_size); lldb::offset_t GetCurrentDataEndOffset() const; + + // Read a memory region from the process and w

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Greg Clayton via lldb-commits
@@ -1003,18 +1080,15 @@ MinidumpFileBuilder::AddMemoryList_32(std::vector &ranges, ++region_index; progress.Increment(1, "Adding Memory Range " + core_range.Dump()); -const size_t bytes_read = -m_process_sp->ReadMemory(addr, data_up->GetBytes(), size, erro

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Greg Clayton via lldb-commits
@@ -969,6 +969,83 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } +Status MinidumpFileBuilder::ReadWriteMemoryInChunks( +const std::unique_ptr &data_up, clayborg wrote: Change this to a `lldb_private::DataBufferHeap &data`. Unle

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. https://github.com/llvm/llvm-project/pull/129307 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Greg Clayton via lldb-commits
@@ -969,12 +969,89 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } -static uint64_t -GetLargestRangeSize(const std::vector &ranges) { - uint64_t max_size = 0; - for (const auto &core_range : ranges) -max_size = std::max(max_size, core_range.ran

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Greg Clayton via lldb-commits
@@ -1088,6 +1157,8 @@ MinidumpFileBuilder::AddMemoryList_64(std::vector &ranges, list_header.BaseRVA = memory_ranges_base_rva; m_data.AppendData(&list_header, sizeof(llvm::minidump::Memory64ListHeader)); + auto data_up = std::make_unique( + std::min(GetLargestRangeS

  1   2   3   4   5   6   7   8   9   10   >