[Lldb-commits] [lldb] [lldb] Zero extend APInt when piece size is bigger than the bitwidth (PR #150149)

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

[Lldb-commits] [lldb] [lldb] support ieee_single and ieee_double gdbtypes for registers (PR #150268)

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

[Lldb-commits] [lldb] [lldb] Zero extend APInt when piece size is bigger than the bitwidth (PR #150149)

2025-07-24 Thread Greg Clayton via lldb-commits
clayborg wrote: I added Pavel Labath and David Blaikie in case they have any info on this. The story if we have some RiscV code that is creating location values for variables that use DW_OP_piece and they are using: ``` DW_OP_lit0, DW_OP_stack_value, DW_OP_piece 0x28 ``` to try and zero fill i

[Lldb-commits] [lldb] [lldb] Zero extend APInt when piece size is bigger than the bitwidth (PR #150149)

2025-07-24 Thread Greg Clayton via lldb-commits
@@ -1978,7 +1978,12 @@ llvm::Expected DWARFExpression::Evaluate( // grows to the nearest host integer type. llvm::APInt fail_value(1, 0, false); llvm::APInt ap_int = scalar.UInt128(fail_value); -assert(ap_int.getBitWidth() >= bit_

[Lldb-commits] [lldb] [lldb] Zero extend APInt when piece size is bigger than the bitwidth (PR #150149)

2025-07-24 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. I am good with this. We should wait for anyone else to chime in for a day or two. https://github.com/llvm/llvm-project/pull/150149 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https:

[Lldb-commits] [lldb] [lldb] Zero extend APInt when piece size is bigger than the bitwidth (PR #150149)

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

[Lldb-commits] [lldb] [lldb] Zero extend APInt when piece size is bigger than the bitwidth (PR #150149)

2025-07-24 Thread Greg Clayton via lldb-commits
@@ -1978,7 +1978,12 @@ llvm::Expected DWARFExpression::Evaluate( // grows to the nearest host integer type. llvm::APInt fail_value(1, 0, false); llvm::APInt ap_int = scalar.UInt128(fail_value); -assert(ap_int.getBitWidth() >= bit_

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

2025-07-17 Thread Greg Clayton via lldb-commits
@@ -965,6 +965,16 @@ Status PluginManager::SaveCore(const lldb::ProcessSP &process_sp, return error; } + if (!options.GetProcess()) +options.SetProcess(process_sp); clayborg wrote: We should be doing this before calling SaveCore as what if this pr

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

2025-07-17 Thread Greg Clayton via lldb-commits
@@ -965,6 +965,16 @@ Status PluginManager::SaveCore(const lldb::ProcessSP &process_sp, return error; } + if (!options.GetProcess()) +options.SetProcess(process_sp); + + // Make sure the process sp is the same as the one we are using. + if (options.GetProcess() !=

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

2025-07-17 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. 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] Implement RISCV function unwinding using instruction emulation (PR #147434)

2025-07-15 Thread Greg Clayton via lldb-commits
clayborg wrote: > > Unfortunately there is no easy way to add testing for this. No RISCV > > hardware at the disposal. I welcome the suggestions. > > Make a core file that does not include any internal data and then it can be > tested on any system. If you have to satisfy internal policies aro

[Lldb-commits] [lldb] [lldb] Implement RISCV function unwinding using instruction emulation (PR #147434)

2025-07-15 Thread Greg Clayton via lldb-commits
@@ -57,11 +57,12 @@ class EmulateInstructionRISCV : public EmulateInstruction { static bool SupportsThisInstructionType(InstructionType inst_type) { switch (inst_type) { -case eInstructionTypeAny: -case eInstructionTypePCModifying: +case lldb_private::eInstru

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

2025-07-15 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: This patch looks good to me unless we are trying to protect the ModuleList contents during the notification to ensure it doesn't change before the notification has been delivered. Jim and Jonas? Thoughts? https://github.com/llvm/llvm-project/pull/148774 _

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

2025-07-15 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. 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 Greg Clayton 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] [LLDB] Fix Incorrect offset for Memory64 RVA in Minidump (+ Testing changes) (PR #146777)

2025-07-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. Make the process subclasses that save core files use the `llvm::Expected GetMemoryRegionsToSave();` from `SaveCoreOptions`. This will ensure everyone is using the same list. https://github.com/llvm/llvm-project/pull/146777 ___

[Lldb-commits] [lldb] [LLDB] Fix Incorrect offset for Memory64 RVA in Minidump (+ Testing changes) (PR #146777)

2025-07-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. Remove flags from all APIs. Enable 64 bit for any non stack memory regions to allow us to test the 64 bit memory regions all of the time. https://github.com/llvm/llvm-project/pull/146777 ___

[Lldb-commits] [lldb] [LLDB][NVIDIA] Add Disassembler log channel (PR #148290)

2025-07-11 Thread Greg Clayton via lldb-commits
https://github.com/clayborg closed https://github.com/llvm/llvm-project/pull/148290 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][NVIDIA] Add Disassembler log channel (PR #148290)

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

[Lldb-commits] [lldb] [LLDB][NVIDIA] Add Disassembler log channel (PR #148290)

2025-07-11 Thread Greg Clayton via lldb-commits
@@ -49,6 +49,7 @@ enum class LLDBLog : Log::MaskType { Watchpoints = Log::ChannelFlag<30>, OnDemand = Log::ChannelFlag<31>, Source = Log::ChannelFlag<32>, + Disassembler = Log::ChannelFlag<33>, LLVM_MARK_AS_BITMASK_ENUM(OnDemand), clayborg wrote: I t

[Lldb-commits] [lldb] [LLDB][NVIDIA] Add Disassembler log channel (PR #148290)

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

[Lldb-commits] [lldb] [LLDB][NVIDIA] Add Disassembler log channel (PR #148290)

2025-07-11 Thread Greg Clayton via lldb-commits
@@ -1146,7 +1146,7 @@ class InstructionLLVMC : public lldb_private::Instruction { } } -if (Log *log = GetLog(LLDBLog::Process)) { +if (Log *log = GetLog(LLDBLog::Disassembler)) { clayborg wrote: We do have the option to specify multiple fla

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

2025-07-03 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. 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] [lldb] [llvm] AMD fix module path (PR #146978)

2025-07-03 Thread Greg Clayton via lldb-commits
clayborg wrote: This didn't come out right... This should be for my GPU branch only. https://github.com/llvm/llvm-project/pull/146978 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] AMD fix module path (PR #146978)

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

[Lldb-commits] [lldb] [lldb] Fix FindProcessImpl() for iOS simulators (PR #139174)

2025-06-18 Thread Greg Clayton via lldb-commits
@@ -621,22 +623,25 @@ DataExtractor data(arg_data.GetBytes(), arg_data_size, } Environment &proc_env = process_info.GetEnvironment(); + bool is_simulator = false; while ((cstr = data.GetCStr(&offset))) { clayborg wrote:

[Lldb-commits] [lldb] [lldb] Fix FindProcessImpl() for iOS simulators (PR #139174)

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

[Lldb-commits] [lldb] [lldb] Fix FindProcessImpl() for iOS simulators (PR #139174)

2025-06-18 Thread Greg Clayton via lldb-commits
@@ -621,22 +623,25 @@ DataExtractor data(arg_data.GetBytes(), arg_data_size, } Environment &proc_env = process_info.GetEnvironment(); + bool is_simulator = false; while ((cstr = data.GetCStr(&offset))) { if (cstr[0] == '\0')

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

2025-06-17 Thread Greg Clayton via lldb-commits
@@ -353,6 +386,8 @@ llvm::json::Value DebuggerStats::ReportStatistics( for (const auto &symbol_module : symbol_modules.Modules()) module_stat.symfile_modules.push_back((intptr_t)symbol_module.get()); } + UpdateDwoFileCounts(sym_file, total_dwo_file_

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

2025-06-17 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. 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 Greg Clayton via lldb-commits
@@ -33,6 +33,37 @@ static void EmplaceSafeString(llvm::json::Object &obj, llvm::StringRef key, obj.try_emplace(key, llvm::json::fixUTF8(str)); } +static void UpdateDwoFileCounts(SymbolFile *sym_file, +uint32_t &total_dwo_file_count, +

[Lldb-commits] [lldb] Add a python JIT loader class. (PR #142514)

2025-06-17 Thread Greg Clayton via lldb-commits
clayborg wrote: > It also seems architecturally wrong to try to guess and influence what > BreakpointResolvers do behind their backs. After all, the resolver might be > just some Python Code you know nothing about. How would you instrument that? > If I set a regular expression name breakpoint,

[Lldb-commits] [lldb] [LLDB] Expose enumerator for separate-debug-info in SBModule (PR #144119)

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

[Lldb-commits] [lldb] [LLDB] Expose enumerator for separate-debug-info in SBModule (PR #144119)

2025-06-17 Thread Greg Clayton via lldb-commits
@@ -633,6 +633,14 @@ lldb::SBFileSpec SBModule::GetSymbolFileSpec() const { return sb_file_spec; } +lldb::SBFileSpecList SBModule::GetSeparateDebugInfoFiles() { clayborg wrote: lldb::SBModuleSpecList https://github.com/llvm/llvm-project/pull/144119 ___

[Lldb-commits] [lldb] [LLDB] Expose enumerator for separate-debug-info in SBModule (PR #144119)

2025-06-17 Thread Greg Clayton via lldb-commits
@@ -287,6 +287,14 @@ class LLDB_API SBModule { /// A const reference to the file specification object. lldb::SBFileSpec GetSymbolFileSpec() const; + /// Get a list of filespecs associated with all the separate symbol files + /// associated with this module. + /// +

[Lldb-commits] [lldb] [LLDB] Expose enumerator for separate-debug-info in SBModule (PR #144119)

2025-06-17 Thread Greg Clayton via lldb-commits
@@ -31,6 +31,11 @@ SBFileSpecList::SBFileSpecList(const SBFileSpecList &rhs) { m_opaque_up = clone(rhs.m_opaque_up); } +SBFileSpecList::SBFileSpecList(FileSpecList &&list) +: m_opaque_up(new FileSpecList(std::move(list))) { + LLDB_INSTRUMENT_VA(this); +} + -

[Lldb-commits] [lldb] [LLDB] Expose enumerator for separate-debug-info in SBModule (PR #144119)

2025-06-17 Thread Greg Clayton via lldb-commits
@@ -223,6 +223,10 @@ class SymbolFileOnDemand : public lldb_private::SymbolFile { return m_sym_file_impl->SetDebugInfoHadFrameVariableErrors(); } + lldb_private::FileSpecList GetSeparateDebugInfoFiles() override { clayborg wrote: ModuleSpecList https

[Lldb-commits] [lldb] [LLDB] Expose enumerator for separate-debug-info in SBModule (PR #144119)

2025-06-17 Thread Greg Clayton via lldb-commits
@@ -482,6 +482,8 @@ class Module : public std::enable_shared_from_this, const FileSpec &GetSymbolFileFileSpec() const { return m_symfile_spec; } + FileSpecList GetSeparateDebugInfoFiles(); clayborg wrote: ModuleSpecList https://github.com/llvm/llvm-proje

[Lldb-commits] [lldb] [LLDB] Expose enumerator for separate-debug-info in SBModule (PR #144119)

2025-06-17 Thread Greg Clayton via lldb-commits
@@ -472,6 +473,16 @@ class SymbolFile : public PluginInterface { return false; }; + /// Return a map of separate debug info files that are loaded. + /// + /// Unlike GetSeparateDebugInfo(), this function will only return the list of + /// files, if there are errors t

[Lldb-commits] [lldb] [lldb] Properly handle locate module callback when Target change arch (PR #143793)

2025-06-17 Thread Greg Clayton via lldb-commits
@@ -1706,6 +1706,8 @@ bool Target::SetArchitecture(const ArchSpec &arch_spec, bool set_platform, if (PlatformSP arch_platform_sp = GetDebugger().GetPlatformList().GetOrCreate(other, {}, &platfo

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

2025-06-17 Thread Greg Clayton via lldb-commits
clayborg wrote: No comments, good to merge IMHO. 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] Fix `ObjectFileMachO` object format when missing version load commands (PR #144177)

2025-06-17 Thread Greg Clayton via lldb-commits
clayborg wrote: One idea is to add a new string method on the llvm::Triple class: ``` const std::string strNoObjectFormat() const; ``` And this would check if the object format is in the string in `llvm::Triple::Data` and if so strip it and return it, else return the `llvm::Triple::Data` as i

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

2025-06-16 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: We really should get the object file format correct from a triple extracted from a LLDB ObjectFile at all times. In the mach-o parser we know it is a mach-o file, so we really should always set this IMHO to be as correct as possible and possibly fix the L

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

2025-06-13 Thread Greg Clayton via lldb-commits
clayborg wrote: > The reason is that those files don't have load commands like > `LC_BUILD_VERSION` or `LC_VERSION_MIN_*` What kind of files don't have this `LC_VERSION_MIN_*` set? That seems like the bug we should be fixing. https://github.com/llvm/llvm-project/pull/143633 __

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

2025-06-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: This seems ok, but we should get some ok from the owners or contributors to the `llvm/lib/TargetParser/Triple.cpp` file. https://github.com/llvm/llvm-project/pull/143633 ___ lldb-commits mailing list lldb-commit

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

2025-06-13 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-06-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited 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] [lldb][Minidump Parser] Implement a range data vector for minidump memory ranges (PR #136040)

2025-06-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Just one nit in the less than operator. 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/l

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

2025-06-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. 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 Greg Clayton 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] Add a python JIT loader class. (PR #142514)

2025-06-09 Thread Greg Clayton via lldb-commits
clayborg wrote: > This seems like a generic module loading observer. I don't see anything JIT > specific about it. Not saying a generic module loading observer is not a good > idea. But calling it a JITLoader seems pretty confusing to me. true, in the current form. Check out the comments in my

[Lldb-commits] [lldb] Add a python JIT loader class. (PR #142514)

2025-06-09 Thread Greg Clayton via lldb-commits
clayborg wrote: > > This seems like a generic module loading observer. I don't see anything JIT > > specific about it. Not saying a generic module loading observer is not a > > good idea. But calling it a JITLoader seems pretty confusing to me. > > +1 on the name. The design seems very general

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

2025-06-09 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. Just add a quick test for this and it is ready to go. https://github.com/llvm/llvm-project/pull/134133 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/

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

2025-06-09 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved 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-06-06 Thread Greg Clayton via lldb-commits
@@ -486,6 +544,12 @@ class PluginManager { static InstrumentationRuntimeCreateInstance GetInstrumentationRuntimeCreateCallbackAtIndex(uint32_t idx); + static std::vector + GetInstrumentationRuntimePluginInfo(); clayborg wrote: Did the system runtime stu

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

2025-06-06 Thread Greg Clayton 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 Greg Clayton 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 Greg Clayton 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 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-06-05 Thread Greg Clayton 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 Greg Clayton 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 Greg Clayton 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 Greg Clayton 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 Greg Clayton 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] Add commands to list/enable/disable plugins (PR #134418)

2025-06-05 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] [lldb] Set default object format to `MachO` in `ObjectFileMachO` (PR #142704)

2025-06-04 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. The test is ok. Mach-o files have LC_SEGMENT_64 load commands, so no need to change the test really. I mean, we can probably remove it and still have a mach-o file, but not sure we need to. https://github.com/llvm/llvm-project/pull/142704

[Lldb-commits] [lldb] [lldb] Fix SIGSEGV in `GetPtraceScope()` in `Procfs.cpp` (PR #142224)

2025-06-02 Thread Greg Clayton via lldb-commits
@@ -120,6 +120,21 @@ TEST(Perf, RealPtraceScope) { << "Sensible values of ptrace_scope are between 0 and 3"; } +TEST(Perf, RealPtraceScopeWhenNotExist) { + // We first check we can NOT read /proc/sys/kernel/yama/ptrace_scope + auto buffer_or_error = + errorOrToExp

[Lldb-commits] [lldb] [lldb] Fix SIGSEGV in `GetPtraceScope()` in `Procfs.cpp` (PR #142224)

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

[Lldb-commits] [lldb] [lldb] Fix SIGSEGV in `GetPtraceScope()` in `Procfs.cpp` (PR #142224)

2025-06-02 Thread Greg Clayton via lldb-commits
@@ -120,6 +120,21 @@ TEST(Perf, RealPtraceScope) { << "Sensible values of ptrace_scope are between 0 and 3"; } +TEST(Perf, RealPtraceScopeWhenNotExist) { + // We first check we can NOT read /proc/sys/kernel/yama/ptrace_scope + auto buffer_or_error = + errorOrToExp

[Lldb-commits] [lldb] [lldb] Fix SIGSEGV in `GetPtraceScope()` in `Procfs.cpp` (PR #142224)

2025-06-02 Thread Greg Clayton via lldb-commits
@@ -120,6 +120,21 @@ TEST(Perf, RealPtraceScope) { << "Sensible values of ptrace_scope are between 0 and 3"; } +TEST(Perf, RealPtraceScopeWhenNotExist) { + // We first check we can NOT read /proc/sys/kernel/yama/ptrace_scope + auto buffer_or_error = + errorOrToExp

[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) { + +

  1   2   3   4   5   6   7   8   9   10   >