[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] 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] 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] 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-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 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] [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] [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-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] [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] [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
@@ -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] [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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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] 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] 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] [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] [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
@@ -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
@@ -20,25 +20,104 @@ #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.

[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
@@ -28,17 +29,90 @@ #include "llvm/ADT/StringRef.h" #include "llvm/BinaryFormat/Minidump.h" #include "llvm/Support/ConvertUTF.h" +#include "llvm/Support/Endian.h" #include "llvm/Support/Error.h" +#include "llvm/TargetParser/Triple.h" #include "Plugins/Process/minidump/Minid

[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
@@ -797,20 +794,89 @@ void MinidumpFileBuilder::AddLinuxFileStreams( } } -Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { - constexpr size_t header_size = sizeof(llvm::minidump::Header); - constexpr size_t directory_size = sizeof(llvm::minidump::Directory

[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
@@ -81,38 +82,42 @@ Status MinidumpFileBuilder::AddHeaderAndCalculateDirectories() { // Now offset the file by the directores so we can write them in later. offset_t directory_offset = m_expected_directories * directory_size; m_saved_data_size += directory_offset; - //

[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] [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-14 Thread Greg Clayton via lldb-commits
clayborg wrote: > Most of the patch is very clean, but I'm bothered by the > `getForeignTUSkeletonCUOffset` function, how it opens up with a mostly > redundant (the callers checks this already) call to > `getForeignTUTypeSignature`, and then proceeds with a reimplementation of > `getCUOffset`

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

2024-06-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to 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] Add options to "statistics dump" to control what sections are dumped (PR #95075)

2024-06-14 Thread Greg Clayton via lldb-commits
@@ -133,7 +133,9 @@ struct ConstStringStats { struct StatisticsOptions { bool summary_only = false; bool load_all_debug_info = false; - bool include_transcript = false; + bool include_targets = true; + bool include_modules = true; clayborg wrote: Do we

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

2024-06-14 Thread Greg Clayton via lldb-commits
@@ -133,7 +133,9 @@ struct ConstStringStats { struct StatisticsOptions { bool summary_only = false; bool load_all_debug_info = false; - bool include_transcript = false; clayborg wrote: I would move this line that was removed back to where it was on line 1

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

2024-06-14 Thread Greg Clayton via lldb-commits
@@ -77,12 +78,33 @@ class CommandObjectStatsDump : public CommandObjectParsed { break; case 's': m_stats_options.summary_only = true; +// In the "summary" mode, the following sections should be omitted by +// default unless their correspond

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

2024-06-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited 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] Add options to "statistics dump" to control what sections are dumped (PR #95075)

2024-06-14 Thread Greg Clayton via lldb-commits
@@ -44,6 +44,30 @@ void SBStatisticsOptions::SetSummaryOnly(bool b) { bool SBStatisticsOptions::GetSummaryOnly() { return m_opaque_up->summary_only; } +void SBStatisticsOptions::SetIncludeTargets(bool b) { + m_opaque_up->include_targets = b; +} + +bool SBStatisticsOptions::

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

2024-06-13 Thread Greg Clayton via lldb-commits
clayborg wrote: I think I have addressed all issues. Does anyone have time to review? 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] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-13 Thread Greg Clayton via lldb-commits
@@ -59,39 +68,67 @@ class MinidumpFileBuilder { // Add ThreadList stream, containing information about all threads running // at the moment of core saving. Contains information about thread // contexts. - lldb_private::Status AddThreadList(const lldb::ProcessSP &process_

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

2024-06-13 Thread Greg Clayton via lldb-commits
@@ -858,10 +923,224 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { return error; } -size_t MinidumpFileBuilder::GetDirectoriesNum() const { - return m_directories.size(); +Status MinidumpFileBuilder::AddMemoryList_32( +const Process::CoreFileMemor

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

2024-06-13 Thread Greg Clayton via lldb-commits
@@ -28,17 +29,90 @@ #include "llvm/ADT/StringRef.h" #include "llvm/BinaryFormat/Minidump.h" #include "llvm/Support/ConvertUTF.h" +#include "llvm/Support/Endian.h" #include "llvm/Support/Error.h" +#include "llvm/TargetParser/Triple.h" #include "Plugins/Process/minidump/Minid

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

2024-06-13 Thread Greg Clayton via lldb-commits
@@ -28,17 +29,90 @@ #include "llvm/ADT/StringRef.h" #include "llvm/BinaryFormat/Minidump.h" #include "llvm/Support/ConvertUTF.h" +#include "llvm/Support/Endian.h" #include "llvm/Support/Error.h" +#include "llvm/TargetParser/Triple.h" #include "Plugins/Process/minidump/Minid

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

2024-06-13 Thread Greg Clayton via lldb-commits
@@ -858,10 +937,225 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { return error; } -size_t MinidumpFileBuilder::GetDirectoriesNum() const { - return m_directories.size(); +Status MinidumpFileBuilder::AddMemoryList_32( +const ProcessSP &process_sp,

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

2024-06-13 Thread Greg Clayton via lldb-commits
@@ -50,48 +60,75 @@ class MinidumpFileBuilder { ~MinidumpFileBuilder() = default; + lldb_private::Status AddHeaderAndCalculateDirectories(); // Add SystemInfo stream, used for storing the most basic information // about the system, platform etc... - lldb_private::St

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

2024-06-13 Thread Greg Clayton via lldb-commits
@@ -858,10 +937,225 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { return error; } -size_t MinidumpFileBuilder::GetDirectoriesNum() const { - return m_directories.size(); +Status MinidumpFileBuilder::AddMemoryList_32( +const ProcessSP &process_sp,

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

2024-06-13 Thread Greg Clayton via lldb-commits
@@ -858,10 +923,224 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { return error; } -size_t MinidumpFileBuilder::GetDirectoriesNum() const { - return m_directories.size(); +Status MinidumpFileBuilder::AddMemoryList_32( +const Process::CoreFileMemor

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

2024-06-13 Thread Greg Clayton via lldb-commits
@@ -797,20 +794,89 @@ void MinidumpFileBuilder::AddLinuxFileStreams( } } -Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { - constexpr size_t header_size = sizeof(llvm::minidump::Header); - constexpr size_t directory_size = sizeof(llvm::minidump::Directory

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

2024-06-13 Thread Greg Clayton via lldb-commits
@@ -797,20 +794,89 @@ void MinidumpFileBuilder::AddLinuxFileStreams( } } -Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { - constexpr size_t header_size = sizeof(llvm::minidump::Header); - constexpr size_t directory_size = sizeof(llvm::minidump::Directory

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

2024-06-13 Thread Greg Clayton via lldb-commits
@@ -59,39 +68,67 @@ class MinidumpFileBuilder { // Add ThreadList stream, containing information about all threads running // at the moment of core saving. Contains information about thread // contexts. - lldb_private::Status AddThreadList(const lldb::ProcessSP &process_

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

2024-06-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited 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] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. 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] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-13 Thread Greg Clayton via lldb-commits
@@ -858,10 +937,225 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { return error; } -size_t MinidumpFileBuilder::GetDirectoriesNum() const { - return m_directories.size(); +Status MinidumpFileBuilder::AddMemoryList_32( +const ProcessSP &process_sp,

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

2024-06-13 Thread Greg Clayton via lldb-commits
@@ -59,39 +68,67 @@ class MinidumpFileBuilder { // Add ThreadList stream, containing information about all threads running // at the moment of core saving. Contains information about thread // contexts. - lldb_private::Status AddThreadList(const lldb::ProcessSP &process_

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

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -59,39 +68,67 @@ class MinidumpFileBuilder { // Add ThreadList stream, containing information about all threads running // at the moment of core saving. Contains information about thread // contexts. - lldb_private::Status AddThreadList(const lldb::ProcessSP &process_

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

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -797,20 +822,75 @@ void MinidumpFileBuilder::AddLinuxFileStreams( } } -Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { - constexpr size_t header_size = sizeof(llvm::minidump::Header); - constexpr size_t directory_size = sizeof(llvm::minidump::Directory

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

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -797,20 +822,75 @@ void MinidumpFileBuilder::AddLinuxFileStreams( } } -Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { - constexpr size_t header_size = sizeof(llvm::minidump::Header); - constexpr size_t directory_size = sizeof(llvm::minidump::Directory

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

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -59,39 +68,67 @@ class MinidumpFileBuilder { // Add ThreadList stream, containing information about all threads running // at the moment of core saving. Contains information about thread // contexts. - lldb_private::Status AddThreadList(const lldb::ProcessSP &process_

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

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -797,20 +822,75 @@ void MinidumpFileBuilder::AddLinuxFileStreams( } } -Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { - constexpr size_t header_size = sizeof(llvm::minidump::Header); - constexpr size_t directory_size = sizeof(llvm::minidump::Directory

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

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -797,20 +822,75 @@ void MinidumpFileBuilder::AddLinuxFileStreams( } } -Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { - constexpr size_t header_size = sizeof(llvm::minidump::Header); - constexpr size_t directory_size = sizeof(llvm::minidump::Directory

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

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -59,39 +68,67 @@ class MinidumpFileBuilder { // Add ThreadList stream, containing information about all threads running // at the moment of core saving. Contains information about thread // contexts. - lldb_private::Status AddThreadList(const lldb::ProcessSP &process_

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

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -797,20 +822,75 @@ void MinidumpFileBuilder::AddLinuxFileStreams( } } -Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { - constexpr size_t header_size = sizeof(llvm::minidump::Header); - constexpr size_t directory_size = sizeof(llvm::minidump::Directory

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

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -59,39 +68,67 @@ class MinidumpFileBuilder { // Add ThreadList stream, containing information about all threads running // at the moment of core saving. Contains information about thread // contexts. - lldb_private::Status AddThreadList(const lldb::ProcessSP &process_

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

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -40,7 +46,7 @@ lldb_private::Status WriteString(const std::string &to_write, /// the data on heap. class MinidumpFileBuilder { public: - MinidumpFileBuilder() = default; + MinidumpFileBuilder(lldb::FileUP&& core_file): m_core_file(std::move(core_file)) {}; ---

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

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -797,20 +822,75 @@ void MinidumpFileBuilder::AddLinuxFileStreams( } } -Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { - constexpr size_t header_size = sizeof(llvm::minidump::Header); - constexpr size_t directory_size = sizeof(llvm::minidump::Directory

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

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -797,20 +822,75 @@ void MinidumpFileBuilder::AddLinuxFileStreams( } } -Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { - constexpr size_t header_size = sizeof(llvm::minidump::Header); - constexpr size_t directory_size = sizeof(llvm::minidump::Directory

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

2024-06-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. 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] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -797,20 +822,75 @@ void MinidumpFileBuilder::AddLinuxFileStreams( } } -Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { - constexpr size_t header_size = sizeof(llvm::minidump::Header); - constexpr size_t directory_size = sizeof(llvm::minidump::Directory

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

2024-06-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited 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][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -810,6 +809,65 @@ const char *SBProcess::GetBroadcasterClass() { return ConstString(Process::GetStaticBroadcasterClass()).AsCString(); } +lldb::SBAddressRangeList +SBProcess::FindRangesInMemory(const void *buf, uint64_t size, + SBAddressRangeL

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

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -810,6 +809,65 @@ const char *SBProcess::GetBroadcasterClass() { return ConstString(Process::GetStaticBroadcasterClass()).AsCString(); } +lldb::SBAddressRangeList +SBProcess::FindRangesInMemory(const void *buf, uint64_t size, + SBAddressRangeL

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

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -810,6 +809,65 @@ const char *SBProcess::GetBroadcasterClass() { return ConstString(Process::GetStaticBroadcasterClass()).AsCString(); } +lldb::SBAddressRangeList +SBProcess::FindRangesInMemory(const void *buf, uint64_t size, + SBAddressRangeL

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

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -810,6 +809,65 @@ const char *SBProcess::GetBroadcasterClass() { return ConstString(Process::GetStaticBroadcasterClass()).AsCString(); } +lldb::SBAddressRangeList +SBProcess::FindRangesInMemory(const void *buf, uint64_t size, + SBAddressRangeL

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

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -810,6 +809,65 @@ const char *SBProcess::GetBroadcasterClass() { return ConstString(Process::GetStaticBroadcasterClass()).AsCString(); } +lldb::SBAddressRangeList +SBProcess::FindRangesInMemory(const void *buf, uint64_t size, + SBAddressRangeL

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

2024-06-12 Thread Greg Clayton via lldb-commits
@@ -2007,6 +2007,124 @@ 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-12 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,31 @@ +import lldb + +SINGLE_INSTANCE_PATTERN = "there_is_only_one_of_me" +DOUBLE_INSTANCE_PATTERN = "there_is_exactly_two_of_me" + + +def GetAddressRanges(test_base): clayborg wrote: You will want to check that multiple memory ranges works, so you nee

[Lldb-commits] [lldb] [WIP] [lldb][Progress] Report progress when completing types from DWARF (PR #91452)

2024-06-11 Thread Greg Clayton via lldb-commits
clayborg wrote: This PR rate limits things. Might be worth trying this out here to see if it helps: https://github.com/llvm/llvm-project/pull/75769 https://github.com/llvm/llvm-project/pull/91452 ___ lldb-commits mailing list lldb-commits@lists.llvm.

[Lldb-commits] [lldb] Fix type lookup bug where wrong decl context was being used for a DIE. (PR #94846)

2024-06-11 Thread Greg Clayton via lldb-commits
https://github.com/clayborg closed https://github.com/llvm/llvm-project/pull/94846 ___ 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-11 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/87740 >From c364215cef4d383bf5cb51bf61d442a5bc9fbfe9 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Sat, 30 Mar 2024 10:50:34 -0700 Subject: [PATCH 1/9] Add support for using foreign type units in .debug_names. Th

[Lldb-commits] [lldb] [lldb] Skip declaration DIEs in the debug_names index (PR #94744)

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

[Lldb-commits] [lldb] [lldb/DWARF] Remove some dead code (PR #95127)

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

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

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

<    1   2   3   4   5   6   7   8   9   10   >