[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-14 Thread Greg Clayton via lldb-commits
@@ -858,10 +953,247 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { return error; } -size_t MinidumpFileBuilder::GetDirectoriesNum() const { - return m_directories.size(); +static size_t GetLargestRange(const Process::CoreFileMemoryRanges &ranges) { +

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-14 Thread Greg Clayton via lldb-commits
@@ -791,26 +812,101 @@ void MinidumpFileBuilder::AddLinuxFileStreams( size_t size = memory_buffer->getBufferSize(); if (size == 0) continue; - AddDirectory(stream, size); + error = AddDirectory(stream, size); + if (error.Fail()) +retur

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-14 Thread Greg Clayton via lldb-commits
@@ -858,10 +953,247 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { return error; } -size_t MinidumpFileBuilder::GetDirectoriesNum() const { - return m_directories.size(); +static size_t GetLargestRange(const Process::CoreFileMemoryRanges &ranges) { +

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-17 Thread Greg Clayton via lldb-commits
clayborg wrote: > My previous message reflected my confusion about the usefulness about the > DW_IDX_cu+DW_IDX_tu combo. Let me try to start over. > > The thing I don't like about this patch is the duplication between > `getForeignTUSkeletonCUOffset` (the new function) and `getCUOffset` (the

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-17 Thread Greg Clayton via lldb-commits
clayborg wrote: > > But we won't want a CU index back if we have a `DW_IDX_type_unit` that is a > > local type unit. Makes no sense to return a CUOffset from such entries. > > Can you elaborate on that? I believe it doesn't make sense to you, but I just > don't see the logic behind it. In part

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -20,25 +20,96 @@ #include "lldb/Target/RegisterContext.h" #include "lldb/Target/StopInfo.h" #include "lldb/Target/ThreadList.h" +#include "lldb/Utility/DataBufferHeap.h" #include "lldb/Utility/DataExtractor.h" #include "lldb/Utility/LLDBLog.h" #include "lldb/Utility/Log.h

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -791,26 +805,99 @@ void MinidumpFileBuilder::AddLinuxFileStreams( size_t size = memory_buffer->getBufferSize(); if (size == 0) continue; - AddDirectory(stream, size); + error = AddDirectory(stream, size); + if (error.Fail()) +return

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -858,10 +953,247 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { return error; } -size_t MinidumpFileBuilder::GetDirectoriesNum() const { - return m_directories.size(); +static size_t GetLargestRange(const Process::CoreFileMemoryRanges &ranges) { +

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -791,26 +805,99 @@ void MinidumpFileBuilder::AddLinuxFileStreams( size_t size = memory_buffer->getBufferSize(); if (size == 0) continue; - AddDirectory(stream, size); + error = AddDirectory(stream, size); + if (error.Fail()) +return

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -480,71 +559,64 @@ class ArchThreadContexts { } }; -// Function returns start and size of the memory region that contains -// memory location pointed to by the current stack pointer. -llvm::Expected> -findStackHelper(const lldb::ProcessSP &process_sp, uint64_t rsp) { - M

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -791,26 +805,99 @@ void MinidumpFileBuilder::AddLinuxFileStreams( size_t size = memory_buffer->getBufferSize(); if (size == 0) continue; - AddDirectory(stream, size); + error = AddDirectory(stream, size); + if (error.Fail()) +return

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -858,10 +953,247 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { return error; } -size_t MinidumpFileBuilder::GetDirectoriesNum() const { - return m_directories.size(); +static size_t GetLargestRange(const Process::CoreFileMemoryRanges &ranges) { +

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -821,47 +908,285 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { Status error; size_t bytes_written; - bytes_written = header_size; - error = core_file->Write(&header, bytes_written); - if (error.Fail() || bytes_written != header_size) { -if

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -821,47 +908,285 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { Status error; size_t bytes_written; - bytes_written = header_size; - error = core_file->Write(&header, bytes_written); - if (error.Fail() || bytes_written != header_size) { -if

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -858,10 +953,247 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { return error; } -size_t MinidumpFileBuilder::GetDirectoriesNum() const { - return m_directories.size(); +static size_t GetLargestRange(const Process::CoreFileMemoryRanges &ranges) { +

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -821,47 +908,285 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { Status error; size_t bytes_written; - bytes_written = header_size; - error = core_file->Write(&header, bytes_written); - if (error.Fail() || bytes_written != header_size) { -if

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -480,71 +559,64 @@ class ArchThreadContexts { } }; -// Function returns start and size of the memory region that contains -// memory location pointed to by the current stack pointer. -llvm::Expected> -findStackHelper(const lldb::ProcessSP &process_sp, uint64_t rsp) { - M

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -821,47 +908,285 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { Status error; size_t bytes_written; - bytes_written = header_size; - error = core_file->Write(&header, bytes_written); - if (error.Fail() || bytes_written != header_size) { -if

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -821,47 +908,285 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { Status error; size_t bytes_written; - bytes_written = header_size; - error = core_file->Write(&header, bytes_written); - if (error.Fail() || bytes_written != header_size) { -if

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -791,26 +805,99 @@ void MinidumpFileBuilder::AddLinuxFileStreams( size_t size = memory_buffer->getBufferSize(); if (size == 0) continue; - AddDirectory(stream, size); + error = AddDirectory(stream, size); + if (error.Fail()) +return

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -821,47 +908,285 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { Status error; size_t bytes_written; - bytes_written = header_size; - error = core_file->Write(&header, bytes_written); - if (error.Fail() || bytes_written != header_size) { -if

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -821,47 +908,285 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { Status error; size_t bytes_written; - bytes_written = header_size; - error = core_file->Write(&header, bytes_written); - if (error.Fail() || bytes_written != header_size) { -if

[Lldb-commits] [lldb] [lldb] Add/change options in `statistics dump` to control what sections are dumped (PR #95075)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -25,6 +25,15 @@ class LLDB_API SBStatisticsOptions { void SetSummaryOnly(bool b); bool GetSummaryOnly(); + void SetIncludeTargets(bool b); + bool GetIncludeTargets() const; + + void SetIncludeModules(bool b); + bool GetIncludeModules() const; + + void SetIncludeTra

[Lldb-commits] [lldb] [lldb] Add/change options in `statistics dump` to control what sections are dumped (PR #95075)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -76,13 +77,22 @@ class CommandObjectStatsDump : public CommandObjectParsed { m_all_targets = true; break; case 's': -m_stats_options.summary_only = true; +m_stats_options.SetSummaryOnly(true); break; case 'f': -m_

[Lldb-commits] [lldb] [lldb] Add/change options in `statistics dump` to control what sections are dumped (PR #95075)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -1425,8 +1425,21 @@ let Command = "statistics dump" in { Desc<"Dump the total possible debug info statistics. " "Force loading all the debug information if not yet loaded, and collect " "statistics with those.">; + def statistics_dump_targets: Option<"targets",

[Lldb-commits] [lldb] [lldb] Add/change options in `statistics dump` to control what sections are dumped (PR #95075)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -76,13 +77,22 @@ class CommandObjectStatsDump : public CommandObjectParsed { m_all_targets = true; break; case 's': -m_stats_options.summary_only = true; +m_stats_options.SetSummaryOnly(true); break; case 'f': -m_

[Lldb-commits] [lldb] [lldb] Add/change options in `statistics dump` to control what sections are dumped (PR #95075)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -76,13 +77,22 @@ class CommandObjectStatsDump : public CommandObjectParsed { m_all_targets = true; break; case 's': -m_stats_options.summary_only = true; +m_stats_options.SetSummaryOnly(true); break; case 'f': -m_

[Lldb-commits] [lldb] [lldb] Add/change options in `statistics dump` to control what sections are dumped (PR #95075)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -1425,8 +1425,21 @@ let Command = "statistics dump" in { Desc<"Dump the total possible debug info statistics. " "Force loading all the debug information if not yet loaded, and collect " "statistics with those.">; + def statistics_dump_targets: Option<"targets",

[Lldb-commits] [lldb] [lldb] Add/change options in `statistics dump` to control what sections are dumped (PR #95075)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -29,6 +29,9 @@ struct OptionArgParser { static bool ToBoolean(llvm::StringRef s, bool fail_value, bool *success_ptr); + static bool ToBoolean(llvm::StringRef option_name, llvm::StringRef option_arg, +bool fail_value, Status &error); + --

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -791,26 +807,101 @@ void MinidumpFileBuilder::AddLinuxFileStreams( size_t size = memory_buffer->getBufferSize(); if (size == 0) continue; - AddDirectory(stream, size); + error = AddDirectory(stream, size); + if (error.Fail()) +retur

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -20,25 +20,98 @@ #include "lldb/Target/RegisterContext.h" #include "lldb/Target/StopInfo.h" #include "lldb/Target/ThreadList.h" +#include "lldb/Utility/DataBufferHeap.h" #include "lldb/Utility/DataExtractor.h" #include "lldb/Utility/LLDBLog.h" #include "lldb/Utility/Log.h

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -791,26 +807,101 @@ void MinidumpFileBuilder::AddLinuxFileStreams( size_t size = memory_buffer->getBufferSize(); if (size == 0) continue; - AddDirectory(stream, size); + error = AddDirectory(stream, size); + if (error.Fail()) +retur

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-17 Thread Greg Clayton via lldb-commits
@@ -791,26 +807,101 @@ void MinidumpFileBuilder::AddLinuxFileStreams( size_t size = memory_buffer->getBufferSize(); if (size == 0) continue; - AddDirectory(stream, size); + error = AddDirectory(stream, size); + if (error.Fail()) +retur

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-18 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Looks good to me! https://github.com/llvm/llvm-project/pull/95312 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add/change options in `statistics dump` to control what sections are dumped (PR #95075)

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

[Lldb-commits] [lldb] [lldb] Fix SBAddressRange validation checks. (PR #95997)

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

[Lldb-commits] [lldb] [lldb] Add/change options in `statistics dump` to control what sections are dumped (PR #95075)

2024-06-18 Thread Greg Clayton via lldb-commits
https://github.com/clayborg closed https://github.com/llvm/llvm-project/pull/95075 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix SBAddressRange validation checks. (PR #95997)

2024-06-20 Thread Greg Clayton via lldb-commits
clayborg wrote: > This class behaves quite differently from other SB API classes. Normally, the > opaque pointer can be cleared to release the potentially more resource heavy > private counterpart. `AddressRange` is a pretty simple class, so I understand > that it makes things easier if we gua

[Lldb-commits] [lldb] [lldb] Fix SBAddressRange validation checks. (PR #95997)

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

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

2024-06-20 Thread Greg Clayton via lldb-commits
@@ -58,6 +58,8 @@ class LLDB_API SBAddressRange { friend class SBFunction; friend class SBProcess; + lldb_private::AddressRange &ref() const; + clayborg wrote: This is no longer needed right? This PR contains this fix right? https://github.com/llvm/llvm

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

2024-06-20 Thread Greg Clayton via lldb-commits
@@ -64,7 +64,7 @@ bool SBAddressRange::operator!=(const SBAddressRange &rhs) { void SBAddressRange::Clear() { LLDB_INSTRUMENT_VA(this); - m_opaque_up.reset(); + m_opaque_up->Clear(); clayborg wrote: This is no longer needed right? This PR contains this fi

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

2024-06-20 Thread Greg Clayton via lldb-commits
@@ -2007,6 +2007,135 @@ size_t Process::ReadMemory(addr_t addr, void *buf, size_t size, Status &error) { } } +void Process::DoFindInMemory(lldb::addr_t start_addr, lldb::addr_t end_addr, + const uint8_t *buf, size_t size, +

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

2024-06-20 Thread Greg Clayton via lldb-commits
@@ -101,3 +101,5 @@ bool SBAddressRange::GetDescription(SBStream &description, m_opaque_up->GetDescription(&stream, target.GetSP().get()); return true; } + +lldb_private::AddressRange &SBAddressRange::ref() const { return *m_opaque_up; } clayborg wrote: T

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

2024-06-20 Thread Greg Clayton via lldb-commits
@@ -2800,6 +2809,10 @@ void PruneThreadPlans(); virtual size_t DoReadMemory(lldb::addr_t vm_addr, void *buf, size_t size, Status &error) = 0; + void DoFindInMemory(lldb::addr_t start_addr, lldb::addr_t end_addr, + const uin

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

2024-06-20 Thread Greg Clayton via lldb-commits
@@ -92,3 +92,7 @@ bool SBAddressRangeList::GetDescription(SBStream &description, stream << "]"; return true; } + +lldb_private::AddressRanges &SBAddressRangeList::ref() const { + return m_opaque_up->ref(); +} clayborg wrote: we might want to add an `asser

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #96243)

2024-06-20 Thread Greg Clayton via lldb-commits
https://github.com/clayborg created https://github.com/llvm/llvm-project/pull/96243 This patch adds support for the new foreign type unit support in .debug_names. Features include: - don't manually index foreign TUs if we have info for them - only use the type unit entries that match the .dwo f

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-20 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/87740 >From badd915257bb192add91696e0b8530c057bd385f Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Sat, 30 Mar 2024 10:50:34 -0700 Subject: [PATCH 01/11] Add support for using foreign type units in .debug_names.

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-20 Thread Greg Clayton via lldb-commits
clayborg wrote: @ayermolo: you suggestion worked. thanks. This PR is back on track... @labath: I implemented your suggestions, let me know if this look ok now https://github.com/llvm/llvm-project/pull/87740 ___ lldb-commits mailing list lldb-commits@l

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #96243)

2024-06-20 Thread Greg Clayton via lldb-commits
clayborg wrote: I got the original PR back on track... https://github.com/llvm/llvm-project/pull/96243 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #96243)

2024-06-20 Thread Greg Clayton via lldb-commits
https://github.com/clayborg closed https://github.com/llvm/llvm-project/pull/96243 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-21 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/87740 >From badd915257bb192add91696e0b8530c057bd385f Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Sat, 30 Mar 2024 10:50:34 -0700 Subject: [PATCH 01/12] Add support for using foreign type units in .debug_names.

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-21 Thread Greg Clayton via lldb-commits
@@ -1727,45 +1727,61 @@ lldb::ModuleSP SymbolFileDWARF::GetExternalModule(ConstString name) { return pos->second; } -DWARFDIE -SymbolFileDWARF::GetDIE(const DIERef &die_ref) { - // This method can be called without going through the symbol vendor so we - // need to lock t

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-21 Thread Greg Clayton via lldb-commits
clayborg wrote: All issues resolved except the change of `GetDIERefSymbolFile`. Let me know if you agree with my comments, or want a `GetSymbolFileByFileIndex(std::optional file_idx)`. https://github.com/llvm/llvm-project/pull/87740 ___ lldb-commits

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

2024-06-21 Thread Greg Clayton via lldb-commits
@@ -2007,6 +2007,135 @@ size_t Process::ReadMemory(addr_t addr, void *buf, size_t size, Status &error) { } } +void Process::DoFindInMemory(lldb::addr_t start_addr, lldb::addr_t end_addr, + const uint8_t *buf, size_t size, +

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

2024-06-21 Thread Greg Clayton via lldb-commits
@@ -2007,6 +2007,135 @@ size_t Process::ReadMemory(addr_t addr, void *buf, size_t size, Status &error) { } } +void Process::DoFindInMemory(lldb::addr_t start_addr, lldb::addr_t end_addr, + const uint8_t *buf, size_t size, +

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

2024-06-21 Thread Greg Clayton via lldb-commits
@@ -2007,6 +2007,135 @@ size_t Process::ReadMemory(addr_t addr, void *buf, size_t size, Status &error) { } } +void Process::DoFindInMemory(lldb::addr_t start_addr, lldb::addr_t end_addr, + const uint8_t *buf, size_t size, +

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

2024-06-21 Thread Greg Clayton via lldb-commits
@@ -2007,6 +2007,135 @@ size_t Process::ReadMemory(addr_t addr, void *buf, size_t size, Status &error) { } } +void Process::DoFindInMemory(lldb::addr_t start_addr, lldb::addr_t end_addr, + const uint8_t *buf, size_t size, +

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

2024-06-21 Thread Greg Clayton via lldb-commits
@@ -2007,6 +2007,135 @@ size_t Process::ReadMemory(addr_t addr, void *buf, size_t size, Status &error) { } } +void Process::DoFindInMemory(lldb::addr_t start_addr, lldb::addr_t end_addr, + const uint8_t *buf, size_t size, +

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

2024-06-21 Thread Greg Clayton via lldb-commits
@@ -2007,6 +2007,135 @@ size_t Process::ReadMemory(addr_t addr, void *buf, size_t size, Status &error) { } } +void Process::DoFindInMemory(lldb::addr_t start_addr, lldb::addr_t end_addr, + const uint8_t *buf, size_t size, +

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

2024-06-21 Thread Greg Clayton via lldb-commits
@@ -2007,6 +2007,135 @@ size_t Process::ReadMemory(addr_t addr, void *buf, size_t size, Status &error) { } } +void Process::DoFindInMemory(lldb::addr_t start_addr, lldb::addr_t end_addr, + const uint8_t *buf, size_t size, +

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

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

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-24 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/87740 >From 3f99b41eac0e04e15bdb99bea2ee75703936ea00 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Sat, 30 Mar 2024 10:50:34 -0700 Subject: [PATCH 01/12] Add support for using foreign type units in .debug_names.

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-24 Thread Greg Clayton via lldb-commits
https://github.com/clayborg closed https://github.com/llvm/llvm-project/pull/87740 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] fc066ca - Fix buildbots for https://github.com/llvm/llvm-project/pull/87740

2024-06-24 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2024-06-24T10:16:39-07:00 New Revision: fc066ca1c32b4aef549f3e371dc70589804aba0f URL: https://github.com/llvm/llvm-project/commit/fc066ca1c32b4aef549f3e371dc70589804aba0f DIFF: https://github.com/llvm/llvm-project/commit/fc066ca1c32b4aef549f3e371dc70589804aba0f.diff

[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

2024-06-24 Thread Greg Clayton via lldb-commits
clayborg wrote: An extra character snuck in and messed with the buildbots, fixed with: ``` commit fc066ca1c32b4aef549f3e371dc70589804aba0f (HEAD -> main, origin/main, origin/HEAD) Author: Greg Clayton Date: Mon Jun 24 10:15:55 2024 -0700 Fix buildbots for https://github.com/llvm/llvm-pro

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-24 Thread Greg Clayton via lldb-commits
https://github.com/clayborg closed https://github.com/llvm/llvm-project/pull/95312 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix tests for FindInMemory SB API introduced in #95007. (PR #96565)

2024-06-24 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Just add a description to what this test had wrong, what is fixed and any other needed details and this should be good to go https://github.com/llvm/llvm-project/pull/96565 ___ lldb-commits mailing list lldb-comm

[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #96569)

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

[Lldb-commits] [lldb] [lldb/DWARF] Search fallback to the manual index in GetFullyQualified… (PR #102123)

2024-08-12 Thread Greg Clayton via lldb-commits
clayborg wrote: The main issue that this covers is when you have N .o files compiled with .debug_names, and M .o files compiled without it, and then you link N+M into a final executable. The linker will simply concatenate all of the .o files section together, but the linker doesn't know anythi

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

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

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; clayborg wrote: Do

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -615,7 +615,16 @@ bool ValueObject::GetSummaryAsCString(TypeSummaryImpl *summary_ptr, m_synthetic_value->UpdateValueIfNeeded(); // the summary might depend on // the synthetic children being

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -615,7 +615,16 @@ bool ValueObject::GetSummaryAsCString(TypeSummaryImpl *summary_ptr, m_synthetic_value->UpdateValueIfNeeded(); // the summary might depend on // the synthetic children being

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -1,7 +1,13 @@ // Test that the lldb command `statistics` works. +#include + +void foo() { + std::string str = "hello world"; clayborg wrote: We want to test that this works for: - built in C++ summary formatters (std::string) - python summary formatters - s

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -1,7 +1,13 @@ // Test that the lldb command `statistics` works. +#include + +void foo() { + std::string str = "hello world"; clayborg wrote: We should also test a type that uses a template as some summary providers match based on a regex like: ``` std::vec

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -918,3 +920,24 @@ def test_order_of_options_do_not_matter(self): debug_stats_1, f"The order of options '{options[0]}' and '{options[1]}' should not matter", ) + +def test_summary_statistics_providers(self): +""" +

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -615,7 +615,16 @@ bool ValueObject::GetSummaryAsCString(TypeSummaryImpl *summary_ptr, m_synthetic_value->UpdateValueIfNeeded(); // the summary might depend on // the synthetic children being

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -408,3 +410,23 @@ llvm::json::Value DebuggerStats::ReportStatistics( return std::move(global_stats); } + +llvm::json::Value SummaryStatistics::ToJSON() const { + json::Object body {{ + {"invocationCount", GetSummaryCount()}, + {"totalTime", GetTotalTime()}, +

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -258,6 +258,7 @@ class TargetProperties : public Properties { bool GetDebugUtilityExpression() const; + clayborg wrote: remove blank line https://github.com/llvm/llvm-project/pull/102708 ___ lldb-commits mail

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #102570)

2024-08-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg closed https://github.com/llvm/llvm-project/pull/102570 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: While this does solve the problem, it means other clients that want to do the same thing will need to create this same kind of code. I would propose we modify `ModuleList::FindSymbolsWithNameAndType(...)` to take an extra parameter `SymbolContext &sc` whi

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/102835 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
clayborg wrote: > I agree that passing some sort of "hint" object to prioritize the search > would be a more complete solution, but since this is @DmT021's first > contribution to LLVM I think we should merge this change if there are no > concerns with the current implementation, and if @DmT02

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Thanks for trying this, and yes, this is exactly what I was thinking! After seeing all of the code changes that this created, I suggested in ModuleList.h that we add a the symbol context as a default parameter to the functions as `const SymbolContext *sc

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/102835 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -295,7 +295,7 @@ class ModuleList { /// \see Module::FindFunctions () void FindFunctions(const RegularExpression &name, const ModuleFunctionSearchOptions &options, - SymbolContextList &sc_list); + const SymbolC

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -285,7 +285,7 @@ class ModuleList { /// \see Module::FindFunctions () void FindFunctions(ConstString name, lldb::FunctionNameType name_type_mask, const ModuleFunctionSearchOptions &options, - SymbolContextList &sc_list) const; +

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -355,6 +355,7 @@ class ModuleList { void FindSymbolsWithNameAndType(ConstString name, lldb::SymbolType symbol_type, + const SymbolContext &sc, SymbolContextList &sc_list)

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -1764,8 +1764,8 @@ lldb::SBSymbolContextList SBTarget::FindFunctions(const char *name, function_options.include_inlines = true; FunctionNameType mask = static_cast(name_type_mask); - target_sp->GetImages().FindFunctions(ConstString(name), mask, -

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -351,8 +351,8 @@ CommandObjectDisassemble::GetNameRanges(CommandReturnObject &result) { // Find functions matching the given name. SymbolContextList sc_list; - GetTarget().GetImages().FindFunctions(name, eFunctionNameTypeAuto, -

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
clayborg wrote: We should also document in the headerdoc this new `const SymbolContext *sc = nullptr` argument and say something like: ``` /// \param[in] sc If the value is NULL, then all modules will be searched in /// order. If the value is a valid pointer and if a module is specified in th

[Lldb-commits] [lldb] [lldb] Add 'FindInMemory()' overload for PostMortemProcess. (PR #102536)

2024-08-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,83 @@ +//===-- PostMortemProcess.cpp ---*- C++ -*-===// +// +// 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: Apa

[Lldb-commits] [lldb] [lldb] Add 'FindInMemory()' overload for PostMortemProcess. (PR #102536)

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

[Lldb-commits] [lldb] [lldb] Add 'FindInMemory()' overload for PostMortemProcess. (PR #102536)

2024-08-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,83 @@ +//===-- PostMortemProcess.cpp ---*- C++ -*-===// +// +// 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: Apa

[Lldb-commits] [lldb] [lldb] Add 'FindInMemory()' overload for PostMortemProcess. (PR #102536)

2024-08-13 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,83 @@ +//===-- PostMortemProcess.cpp ---*- C++ -*-===// +// +// 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: Apa

<    12   13   14   15   16   17   18   19   20   21   >