[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -441,6 +441,19 @@ class ValueObject { virtual int64_t GetValueAsSigned(int64_t fail_value, bool *success = nullptr); + llvm::APSInt GetValueAsAPSInt(); + + llvm::APFloat GetValueAsFloat(); + + bool GetValueAsBool(); + + /// Update the value of the current object to

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -668,6 +699,32 @@ class ValueObject { CreateValueObjectFromData(llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type); + static lldb::ValueObjectSP + CreateValueObjectFromBytes(lldb::TargetSP ta

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -2809,6 +2919,243 @@ ValueObjectSP ValueObject::CastPointerType(const char *name, TypeSP &type_sp) { return valobj_sp; } +lldb::addr_t ValueObject::GetLoadAddress() { + lldb::addr_t addr_value = LLDB_INVALID_ADDRESS; + lldb::TargetSP target_sp = GetTargetSP(); + if (t

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [lldb][ClangUserExpression][NFCI] Pass the most specific ExecutionContextScope possible into ClangExpressionParser (PR #87657)

2024-04-04 Thread Greg Clayton via lldb-commits
@@ -553,9 +553,9 @@ bool ClangUserExpression::PrepareForParsing( } bool ClangUserExpression::TryParse( -DiagnosticManager &diagnostic_manager, ExecutionContextScope *exe_scope, -ExecutionContext &exe_ctx, lldb_private::ExecutionPolicy execution_policy, -bool keep_r

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

2024-04-04 Thread Greg Clayton via lldb-commits
https://github.com/clayborg created https://github.com/llvm/llvm-project/pull/87740 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] [lldb][MinidumpFileBuilder] Fix addition of MemoryList steam (PR #88564)

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

[Lldb-commits] [lldb] [lldb][MinidumpFileBuilder] Fix addition of MemoryList steam (PR #88564)

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

[Lldb-commits] [lldb] [lldb][MinidumpFileBuilder] Fix addition of MemoryList steam (PR #88564)

2024-04-15 Thread Greg Clayton via lldb-commits
@@ -657,8 +657,11 @@ MinidumpFileBuilder::AddMemoryList(const lldb::ProcessSP &process_sp, auto data_up = std::make_unique(size, 0); const size_t bytes_read = process_sp->ReadMemory(addr, data_up->GetBytes(), size, error); -if (bytes_read == 0) +if (err

[Lldb-commits] [lldb] [lldb][MinidumpFileBuilder] Fix addition of MemoryList steam (PR #88564)

2024-04-15 Thread Greg Clayton via lldb-commits
@@ -657,8 +657,11 @@ MinidumpFileBuilder::AddMemoryList(const lldb::ProcessSP &process_sp, auto data_up = std::make_unique(size, 0); const size_t bytes_read = process_sp->ReadMemory(addr, data_up->GetBytes(), size, error); -if (bytes_read == 0) +if (err

[Lldb-commits] [lldb] Summarize std::string's when created from data. (PR #89110)

2024-04-29 Thread Greg Clayton via lldb-commits
@@ -287,8 +291,52 @@ bool lldb_private::formatters::LibStdcppStringSummaryProvider( } else return true; } break; -case eAddressTypeHost: - break; +case eAddressTypeHost: { + + DataExtractor data; + Status error; + valobj.GetData(da

[Lldb-commits] [lldb] Summarize std::string's when created from data. (PR #89110)

2024-04-29 Thread Greg Clayton via lldb-commits
@@ -254,13 +254,17 @@ bool lldb_private::formatters::LibStdcppStringSummaryProvider( } else addr_of_string = valobj.GetAddressOf(scalar_is_load_addr, &addr_type); - if (addr_of_string != LLDB_INVALID_ADDRESS) { + + // We have to check for host address here + /

[Lldb-commits] [lldb] Summarize std::string's when created from data. (PR #89110)

2024-04-29 Thread Greg Clayton via lldb-commits
@@ -287,8 +291,52 @@ bool lldb_private::formatters::LibStdcppStringSummaryProvider( } else return true; } break; -case eAddressTypeHost: - break; +case eAddressTypeHost: { + + DataExtractor data; + Status error; + valobj.GetData(da

[Lldb-commits] [lldb] Summarize std::string's when created from data. (PR #89110)

2024-04-29 Thread Greg Clayton via lldb-commits
@@ -287,8 +291,52 @@ bool lldb_private::formatters::LibStdcppStringSummaryProvider( } else return true; } break; -case eAddressTypeHost: - break; +case eAddressTypeHost: { + + DataExtractor data; + Status error; + valobj.GetData(da

[Lldb-commits] [lldb] Summarize std::string's when created from data. (PR #89110)

2024-04-29 Thread Greg Clayton via lldb-commits
@@ -287,8 +291,52 @@ bool lldb_private::formatters::LibStdcppStringSummaryProvider( } else return true; } break; -case eAddressTypeHost: - break; +case eAddressTypeHost: { + + DataExtractor data; + Status error; + valobj.GetData(da

[Lldb-commits] [lldb] Summarize std::string's when created from data. (PR #89110)

2024-04-30 Thread Greg Clayton via lldb-commits
@@ -287,8 +292,49 @@ bool lldb_private::formatters::LibStdcppStringSummaryProvider( } else return true; } break; -case eAddressTypeHost: - break; +case eAddressTypeHost: { + + DataExtractor data; + Status error; + valobj.GetData(da

[Lldb-commits] [lldb] Summarize std::string's when created from data. (PR #89110)

2024-04-30 Thread Greg Clayton via lldb-commits
@@ -287,8 +292,49 @@ bool lldb_private::formatters::LibStdcppStringSummaryProvider( } else return true; } break; -case eAddressTypeHost: - break; +case eAddressTypeHost: { + + DataExtractor data; + Status error; + valobj.GetData(da

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-04-30 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. You will need to hook this up so it actually works, and then add a test case to verify this works as expected. https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing

[Lldb-commits] [lldb] LLDB Debuginfod tests and a fix or two (PR #90622)

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

[Lldb-commits] [lldb] SBDebugger: Add new APIs `AddDestroyCallback` and `RemoveDestroyCallback` (PR #89868)

2024-05-02 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. I agree with all comments here. I like being able to add and remove destroy callbacks. See my inline comments for changing `AddDestroyCallback` and `RemoveDestroyCallback`. https://github.com/llvm/llvm-project/pull/89868 _

[Lldb-commits] [lldb] SBDebugger: Add new APIs `AddDestroyCallback` and `RemoveDestroyCallback` (PR #89868)

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

[Lldb-commits] [lldb] SBDebugger: Add new APIs `AddDestroyCallback` and `RemoveDestroyCallback` (PR #89868)

2024-05-02 Thread Greg Clayton via lldb-commits
@@ -321,9 +321,26 @@ class LLDB_API SBDebugger { void SetLoggingCallback(lldb::LogOutputCallback log_callback, void *baton); + /// DEPRECATED: We used to only support one Destroy callback. Now that we + /// support Add and Remove, you should only remove Destroy callbacks

[Lldb-commits] [lldb] [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #90663)

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

[Lldb-commits] [lldb] [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #90663)

2024-05-03 Thread Greg Clayton via lldb-commits
@@ -1631,27 +1631,34 @@ bool SymbolFileDWARF::CompleteType(CompilerType &compiler_type) { return true; } - DWARFDIE dwarf_die = GetDIE(die_it->getSecond()); - if (dwarf_die) { -// Once we start resolving this type, remove it from the forward -// declaration ma

[Lldb-commits] [lldb] [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #90663)

2024-05-03 Thread Greg Clayton via lldb-commits
@@ -154,6 +154,27 @@ static bool TagIsRecordType(dw_tag_t tag) { } } +static bool +IsForwardDeclaration(const lldb_private::plugin::dwarf::DWARFDIE &die, + const ParsedDWARFTypeAttributes &attrs, + LanguageType cu_language) { + if (at

[Lldb-commits] [lldb] [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #90663)

2024-05-03 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Looks pretty good to me as long as the test suite is happy. https://github.com/llvm/llvm-project/pull/90663 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[Lldb-commits] [lldb] [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #90663)

2024-05-03 Thread Greg Clayton via lldb-commits
clayborg wrote: > > > > Is any of it testable? > > > > > > > > > Good question. Though this is mostly meant to be "NFC" (with very large > > > quotes), I can imagine us doing something like forcing the parsing of a > > > specific type (`type lookup ` ?), and then checking that the > > > modu

[Lldb-commits] [lldb] [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #90663)

2024-05-03 Thread Greg Clayton via lldb-commits
clayborg wrote: > The tests your described testing this change doesn't break things by delaying > definition DIE searching, which I think is already covered by existing tests > (created for other purposes, but also covers this case). I was thinking about > testing the definition DIE searching

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

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

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-06 Thread Greg Clayton via lldb-commits
@@ -2044,6 +2052,15 @@ bool CommandInterpreter::HandleCommand(const char *command_line, m_transcript_stream << result.GetOutputData(); m_transcript_stream << result.GetErrorData(); + // Add output and error to the transcript item after splitting lines. In the + // futur

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-06 Thread Greg Clayton via lldb-commits
@@ -766,6 +768,12 @@ class CommandInterpreter : public Broadcaster, CommandUsageMap m_command_usages; StreamString m_transcript_stream; + + /// Contains a list of handled commands, output and error. Each element in + /// the list is a dictionary with three keys: "command

[Lldb-commits] [lldb] [lldb/aarch64] Fix unwinding when signal interrupts a leaf function (PR #91321)

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

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

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

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-07 Thread Greg Clayton via lldb-commits
@@ -290,6 +290,31 @@ class StructuredData { void GetDescription(lldb_private::Stream &s) const override; +/// Creates an Array of substrings by splitting a string around the +/// occurrences of a separator character. +/// +/// \param[in] s +/// The i

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-07 Thread Greg Clayton via lldb-commits
@@ -85,3 +86,91 @@ def test_command_output(self): self.assertEqual(res.GetOutput(), "") self.assertIsNotNone(res.GetError()) self.assertEqual(res.GetError(), "") + +def test_structured_transcript(self): +"""Test structured transcript generati

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-07 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. Needs a few changes. See inline comments. https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-07 Thread Greg Clayton via lldb-commits
@@ -2044,6 +2052,15 @@ bool CommandInterpreter::HandleCommand(const char *command_line, m_transcript_stream << result.GetOutputData(); m_transcript_stream << result.GetErrorData(); + // Add output and error to the transcript item after splitting lines. In the + // futur

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-07 Thread Greg Clayton via lldb-commits
@@ -289,3 +292,35 @@ void StructuredData::Null::GetDescription(lldb_private::Stream &s) const { void StructuredData::Generic::GetDescription(lldb_private::Stream &s) const { s.Printf("%p", m_object); } + +/// This is the same implementation as `StringRef::split`. Not dependi

[Lldb-commits] [lldb] [lldb][DWARF] Sort ranges list in dwarf 5. (PR #91343)

2024-05-08 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. https://github.com/llvm/llvm-project/pull/91343 ___ 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-05-08 Thread Greg Clayton via lldb-commits
@@ -117,6 +118,10 @@ bool ProcessInfo::IsScriptedProcess() const { return m_scripted_metadata_sp && *m_scripted_metadata_sp; } +bool ProcessInstanceInfo::NiceValueIsValid() const { + return m_nice_value >= PRIO_MIN && m_nice_value <= PRIO_MAX; clayborg wrot

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

2024-05-08 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited 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

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

2024-05-08 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. So `ProcessInstanceInfo` is already very OS specific, so I can't object to adding more OS specific information to this structure. It would be nice to abstract OS specific things into a dictionary so allow OS specific things to

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

2024-05-08 Thread Greg Clayton via lldb-commits
@@ -254,6 +277,8 @@ class ProcessInstanceInfo : public ProcessInfo { struct timespec m_system_time {}; struct timespec m_cumulative_user_time {}; struct timespec m_cumulative_system_time {}; + int8_t m_nice_value = INT8_MAX; clayborg wrote: maybe make t

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

2024-05-08 Thread Greg Clayton via lldb-commits
@@ -144,6 +144,19 @@ class ProcessInstanceInfo : public ProcessInfo { long int tv_usec = 0; }; + enum class ProcessState { +Unknown, +Dead, +DiskSleep, +Idle, +Paging, +Parked, +Running, +Sleeping, +TracedOrStopped, +Zombie, + };

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

2024-05-08 Thread Greg Clayton via lldb-commits
@@ -17,6 +17,7 @@ #include #include +#include clayborg wrote: Not every OS will have this header file, so I am not sure we can/should be importing this header. Windows build will most likely fail and any non unix based OS as well. https://github.com/llv

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

2024-05-08 Thread Greg Clayton via lldb-commits
@@ -12,6 +12,9 @@ #include "lldb/Utility/ProcessInfo.h" #include "gtest/gtest.h" +#include +#include clayborg wrote: it is ok to include this header file here because this is a linux specific host test. https://github.com/llvm/llvm-project/pull/91544

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

2024-05-08 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited 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

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

2024-05-09 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: How many notifications happen during an expression? We want to make sure this doesn't slow down expression evaluation by any appreciable amount. If we spam these notifications, without having any throttling in place (I have an open patch for this I haven'

[Lldb-commits] [lldb] [lldb-dap] Fix a race during shutdown (PR #91591)

2024-05-09 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: I can't remember: does terminate come before disconnecting? Or is it the other way around? https://github.com/llvm/llvm-project/pull/91591 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.l

[Lldb-commits] [lldb] [lldb][ELF] Move address class map into the symbol table (PR #91603)

2024-05-09 Thread Greg Clayton via lldb-commits
@@ -23,6 +23,8 @@ class Symtab { public: typedef std::vector IndexCollection; typedef UniqueCStringMap NameToIndexMap; + typedef std::map + FileAddressToAddressClassMap; clayborg wrote: You might want to use a llvm::DenseMap if possible. std::map use

[Lldb-commits] [lldb] [lldb-dap] Fix a race during shutdown (PR #91591)

2024-05-10 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Sounds good, thanks for the clarification. https://github.com/llvm/llvm-project/pull/91591 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

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

2024-05-10 Thread Greg Clayton via lldb-commits
@@ -91,14 +87,16 @@ static bool GetStatusInfo(::pid_t Pid, ProcessInstanceInfo &ProcessInfo, if (Rest.empty()) return false; StatFields stat_fields; - if (sscanf(Rest.data(), - "%d %s %c %d %d %d %d %d %u %lu %lu %lu %lu %lu %lu %ld %ld", - &st

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

2024-05-10 Thread Greg Clayton via lldb-commits
@@ -254,6 +280,8 @@ class ProcessInstanceInfo : public ProcessInfo { struct timespec m_system_time {}; struct timespec m_cumulative_user_time {}; struct timespec m_cumulative_system_time {}; + std::optional m_priority_value = std::nullopt; + bool m_zombie = false; -

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

2024-05-10 Thread Greg Clayton via lldb-commits
@@ -12,6 +12,9 @@ #include "lldb/Utility/ProcessInfo.h" #include "gtest/gtest.h" +#include +#include clayborg wrote: This is fine if this is a host test, so nothing needs to be done. We are expecting linux + posix here which is fine. https://github.com/ll

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

2024-05-10 Thread Greg Clayton via lldb-commits
@@ -144,6 +144,19 @@ class ProcessInstanceInfo : public ProcessInfo { long int tv_usec = 0; }; + enum class ProcessState { +Unknown, +Dead, +DiskSleep, +Idle, +Paging, +Parked, +Running, +Sleeping, +TracedOrStopped, +Zombie, + };

[Lldb-commits] [lldb] [lldb] Add ability to show enum as name and value at the same time (PR #90059)

2024-05-10 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. So each `ValueObject` has the ability to show its value as an enumeration if its format is set to `eFormatEnum`. If the format is set to `eFormatHex`, `eFormatUnsigned`, or `eFormatSigned`, then we show the numeric value. Can

[Lldb-commits] [lldb] [lldb] Add ability to show enum as name and value at the same time (PR #90059)

2024-05-10 Thread Greg Clayton via lldb-commits
clayborg wrote: If your register has fields, you can set its format to be eFormatEnum by default. Each register defines how it gets displayed when we query the dynamic register information from the `lldb-server` or `debugserver` https://github.com/llvm/llvm-project/pull/90059

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

2024-05-10 Thread Greg Clayton via lldb-commits
@@ -147,96 +148,111 @@ class ProcessInstanceInfo : public ProcessInfo { ProcessInstanceInfo() = default; ProcessInstanceInfo(const char *name, const ArchSpec &arch, lldb::pid_t pid) - : ProcessInfo(name, arch, pid), m_euid(UINT32_MAX), m_egid(UINT32_MAX), -m_p

[Lldb-commits] [lldb] [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #90663)

2024-05-10 Thread Greg Clayton via lldb-commits
clayborg wrote: This is causing a clang assertion due: ``` (lldb) type lookup std::ios_base Assertion failed: (DD && "queried property of class with no definition"), function data, file DeclCXX.h, line 464. bt (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = hit program asse

[Lldb-commits] [lldb] [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #90663)

2024-05-10 Thread Greg Clayton via lldb-commits
clayborg wrote: Is `SymbolFileDWARF::CompleteType(...)` responsible for trying to find a non-declaration DIE first? The issue might arise from having a .debug_names table that has `DW_IDX_parent` entries that means that there might be forward declarations included in the DWARF index. https://

[Lldb-commits] [lldb] [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #90663)

2024-05-10 Thread Greg Clayton via lldb-commits
clayborg wrote: Ok, I found the issue. `.debug_names` tables with `DW_IDX_parent` entries, might contain tons of entries for forward declared classes because in my example `std::ios_base` is the parent declaration context for `seekdir`, `openmode`, and `iostate` so `.debug_names` entries for t

[Lldb-commits] [lldb] [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #90663)

2024-05-10 Thread Greg Clayton via lldb-commits
clayborg wrote: See the `/// <<< newly added for fix` comments for the new lines https://github.com/llvm/llvm-project/pull/90663 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DWARF] Do not complete type from declaration die. (PR #91799)

2024-05-10 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Let me verify this works. I would also like this to fix: ``` bool DebugNamesDWARFIndex::ProcessEntry( const DebugNames::Entry &entry, llvm::function_ref callback) { std::optional ref = ToDIERef(entry); if (!ref) return true; SymbolFileDWARF

[Lldb-commits] [lldb] [lldb][DWARF] Do not complete type from declaration die. (PR #91799)

2024-05-10 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. This does fix things on your side. I will take care of a new PR for not searching all definition DIEs from the .debug_names. https://github.com/llvm/llvm-project/pull/91799 ___ lldb-commits maili

[Lldb-commits] [lldb] [lldb][DWARF] Do not complete type from declaration die. (PR #91799)

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

[Lldb-commits] [lldb] [lldb][DWARF] Do not complete type from declaration die. (PR #91799)

2024-05-10 Thread Greg Clayton via lldb-commits
@@ -2343,7 +2343,10 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE &die, // clang::ExternalASTSource queries for this type. m_ast.SetHasExternalStorage(clang_type.GetOpaqueQualType(), false); - if (!die) + ParsedDWARFTypeAttributes attrs(die); + bool

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-05-10 Thread Greg Clayton via lldb-commits
https://github.com/clayborg created https://github.com/llvm/llvm-project/pull/91808 When a .debug_names table has entries that use the DW_IDX_parent attributes, we can end up with entries in the .debug_names table that are not full definitions. This is because a class that is foward declared,

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

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

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-05-10 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/91808 >From 0cc1be6988e6ab5498151f32485f525a66133be2 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Fri, 10 May 2024 13:49:22 -0700 Subject: [PATCH] Improve performance of .debug_names lookups when DW_IDX_parent a

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-05-10 Thread Greg Clayton via lldb-commits
clayborg wrote: > The change/explanation looks intuitive, but I remember having seen DIE entry > with `DW_AT_declaration (true)` but is not a forward declaration (it is a > definition and has other attributes) . Will we cause regression in that case? No, it is ok for `DW_AT_declaration(true)`

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-05-10 Thread Greg Clayton via lldb-commits
clayborg wrote: > we should probably fix the underlying issue instead: #77696 This is one fix that is needed. Quoted from an e-mail chain: > I need to find my notes from those days, but I don't think we did. As Greg > points out, the standard forbids forward declarations in debug_names; entrie

[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

2024-05-10 Thread Greg Clayton via lldb-commits
clayborg wrote: > we should probably fix the underlying issue instead: #77696 We still have binaries that are floating around for now that contain this issue and this was causing crashes. So it would be nice to fix this in LLDB for now and back this out after we have a stable and trustable .de

[Lldb-commits] [lldb] SBDebugger: Add new APIs `AddDestroyCallback` and `RemoveDestroyCallback` (PR #89868)

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

[Lldb-commits] [lldb] SBDebugger: Add new APIs `AddDestroyCallback` and `RemoveDestroyCallback` (PR #89868)

2024-05-10 Thread Greg Clayton via lldb-commits
@@ -1689,35 +1689,56 @@ void SBDebugger::SetLoggingCallback(lldb::LogOutputCallback log_callback, void SBDebugger::SetDestroyCallback( lldb::SBDebuggerDestroyCallback destroy_callback, void *baton) { LLDB_INSTRUMENT_VA(this, destroy_callback, baton); + if (m_opaque_sp

[Lldb-commits] [lldb] SBDebugger: Add new APIs `AddDestroyCallback` and `RemoveDestroyCallback` (PR #89868)

2024-05-10 Thread Greg Clayton via lldb-commits
@@ -1689,35 +1689,56 @@ void SBDebugger::SetLoggingCallback(lldb::LogOutputCallback log_callback, void SBDebugger::SetDestroyCallback( lldb::SBDebuggerDestroyCallback destroy_callback, void *baton) { LLDB_INSTRUMENT_VA(this, destroy_callback, baton); + if (m_opaque_sp

[Lldb-commits] [lldb] SBDebugger: Add new APIs `AddDestroyCallback` and `RemoveDestroyCallback` (PR #89868)

2024-05-10 Thread Greg Clayton via lldb-commits
@@ -731,8 +747,11 @@ class Debugger : public std::enable_shared_from_this, lldb::TargetSP m_dummy_target_sp; Diagnostics::CallbackID m_diagnostics_callback_id; - lldb_private::DebuggerDestroyCallback m_destroy_callback = nullptr; - void *m_destroy_callback_baton = nullp

[Lldb-commits] [lldb] SBDebugger: Add new APIs `AddDestroyCallback` and `RemoveDestroyCallback` (PR #89868)

2024-05-10 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. We should make this thread safe. It can only help and this isn't an API which gets called all of the time, so performance isn't an issue. A few inline comments https://github.com/llvm/llvm-project/pull/89868 __

Re: [Lldb-commits] [PATCH] D114288: [NFC] Refactor symbol table parsing.

2021-12-03 Thread Greg Clayton via lldb-commits
Thanks for doing that! I was able to successfully run the test on linux, and then I added extra context to the stop. It seems that the two breakpoints are set correctly, but the second breakpoint is not hit and the program exits. So all is good from the symbol table changes as far as I have been

[Lldb-commits] [lldb] 244258e - Modify DataEncoder to be able to encode data in an object owned buffer.

2021-12-07 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2021-12-07T09:44:57-08:00 New Revision: 244258e35acc92b3293e91ddecee6a8c8613ec20 URL: https://github.com/llvm/llvm-project/commit/244258e35acc92b3293e91ddecee6a8c8613ec20 DIFF: https://github.com/llvm/llvm-project/commit/244258e35acc92b3293e91ddecee6a8c8613ec20.diff

[Lldb-commits] [lldb] cfe5d76 - Fix buildbot after https://reviews.llvm.org/D115073.

2021-12-07 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2021-12-07T12:03:45-08:00 New Revision: cfe5d768be95ae0a62cf430e56e7762cebf81a65 URL: https://github.com/llvm/llvm-project/commit/cfe5d768be95ae0a62cf430e56e7762cebf81a65 DIFF: https://github.com/llvm/llvm-project/commit/cfe5d768be95ae0a62cf430e56e7762cebf81a65.diff

[Lldb-commits] [lldb] 220854a - Fix buildbots after https://reviews.llvm.org/D115073.

2021-12-07 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2021-12-07T12:19:00-08:00 New Revision: 220854a47bdc0c281dbaafb54411ec65e76212b3 URL: https://github.com/llvm/llvm-project/commit/220854a47bdc0c281dbaafb54411ec65e76212b3 DIFF: https://github.com/llvm/llvm-project/commit/220854a47bdc0c281dbaafb54411ec65e76212b3.diff

[Lldb-commits] [lldb] da816ca - Added the ability to cache the finalized symbol tables subsequent debug sessions to start faster.

2021-12-16 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2021-12-16T09:59:55-08:00 New Revision: da816ca0cb3b1367fe90b3e6fb73439c93ed80df URL: https://github.com/llvm/llvm-project/commit/da816ca0cb3b1367fe90b3e6fb73439c93ed80df DIFF: https://github.com/llvm/llvm-project/commit/da816ca0cb3b1367fe90b3e6fb73439c93ed80df.diff

[Lldb-commits] [lldb] 59f1d0e - Fix windows buildbots after https://reviews.llvm.org/D115324

2021-12-16 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2021-12-16T16:13:58-08:00 New Revision: 59f1d0eed58ce0f23c3a5a324d122a99f9757228 URL: https://github.com/llvm/llvm-project/commit/59f1d0eed58ce0f23c3a5a324d122a99f9757228 DIFF: https://github.com/llvm/llvm-project/commit/59f1d0eed58ce0f23c3a5a324d122a99f9757228.diff

[Lldb-commits] [lldb] 2a844c8 - Fix macOS buildbots after https://reviews.llvm.org/D115324.

2021-12-17 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2021-12-17T12:14:44-08:00 New Revision: 2a844c8869909960fb006a668d30c7349f55ee7e URL: https://github.com/llvm/llvm-project/commit/2a844c8869909960fb006a668d30c7349f55ee7e DIFF: https://github.com/llvm/llvm-project/commit/2a844c8869909960fb006a668d30c7349f55ee7e.diff

[Lldb-commits] [lldb] a2154b1 - Cache the manual DWARF index out to the LLDB cache directory when the LLDB index cache is enabled.

2021-12-28 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2021-12-28T11:00:28-08:00 New Revision: a2154b19515304f42000160bed820630c3780db8 URL: https://github.com/llvm/llvm-project/commit/a2154b19515304f42000160bed820630c3780db8 DIFF: https://github.com/llvm/llvm-project/commit/a2154b19515304f42000160bed820630c3780db8.diff

[Lldb-commits] [lldb] 48207b2 - Fix "settings set -g" so it works again.

2021-12-28 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2021-12-28T11:03:09-08:00 New Revision: 48207b2559c6b012ce167f2e76acea39e9d405cf URL: https://github.com/llvm/llvm-project/commit/48207b2559c6b012ce167f2e76acea39e9d405cf DIFF: https://github.com/llvm/llvm-project/commit/48207b2559c6b012ce167f2e76acea39e9d405cf.diff

Re: [Lldb-commits] [PATCH] D115951: Cache the manual DWARF index out to the LLDB cache directory when the LLDB index cache is enabled.

2021-12-29 Thread Greg Clayton via lldb-commits
Thanks Pavel, that fix is good. > On Dec 29, 2021, at 1:05 AM, Pavel Labath via Phabricator > wrote: > > labath added a comment. > > The problem was that (without accelerator tables) we would always have more > than one cache file for a given module. I have now adjusted the test (daed479 > <

[Lldb-commits] [lldb] 3db7cc1 - Fix a double debug info size counting in top level stats for "statistics dump".

2022-02-10 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2022-02-10T10:55:18-08:00 New Revision: 3db7cc1ba41f192d9eeb33cdaf06f4e95abf6bdc URL: https://github.com/llvm/llvm-project/commit/3db7cc1ba41f192d9eeb33cdaf06f4e95abf6bdc DIFF: https://github.com/llvm/llvm-project/commit/3db7cc1ba41f192d9eeb33cdaf06f4e95abf6bdc.diff

[Lldb-commits] [lldb] 9febd1e - Fix race condition when launching and attaching.

2022-02-17 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2022-02-17T13:18:49-08:00 New Revision: 9febd1e573fb8b3d1de5844b7bfd33eb998f0106 URL: https://github.com/llvm/llvm-project/commit/9febd1e573fb8b3d1de5844b7bfd33eb998f0106 DIFF: https://github.com/llvm/llvm-project/commit/9febd1e573fb8b3d1de5844b7bfd33eb998f0106.diff

[Lldb-commits] [lldb] 3805455 - Fix buildbots after https://reviews.llvm.org/D119797

2022-02-18 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2022-02-17T23:59:15-08:00 New Revision: 38054556a08884aa15d3ebc720e2f43d0cb5a944 URL: https://github.com/llvm/llvm-project/commit/38054556a08884aa15d3ebc720e2f43d0cb5a944 DIFF: https://github.com/llvm/llvm-project/commit/38054556a08884aa15d3ebc720e2f43d0cb5a944.diff

[Lldb-commits] [lldb] 63e5121 - Fix race condition when launching and attaching.

2022-03-03 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2022-03-03T16:20:27-08:00 New Revision: 63e512100ac62efd5f009c6b490194e973a9d1ce URL: https://github.com/llvm/llvm-project/commit/63e512100ac62efd5f009c6b490194e973a9d1ce DIFF: https://github.com/llvm/llvm-project/commit/63e512100ac62efd5f009c6b490194e973a9d1ce.diff

[Lldb-commits] [lldb] c41c574 - Fix buildbots after https://reviews.llvm.org/D120755.

2022-03-07 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2022-03-07T11:46:56-08:00 New Revision: c41c57468949036a06695f06a97a8e14e8b252bd URL: https://github.com/llvm/llvm-project/commit/c41c57468949036a06695f06a97a8e14e8b252bd DIFF: https://github.com/llvm/llvm-project/commit/c41c57468949036a06695f06a97a8e14e8b252bd.diff

[Lldb-commits] [lldb] 9429b67 - [NFC] Improve FileSpec internal APIs and usage in preparation for adding caching of resolved/absolute.

2022-07-22 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2022-07-22T10:12:31-07:00 New Revision: 9429b67b8e300e638d7828bbcb95585f85c4df4d URL: https://github.com/llvm/llvm-project/commit/9429b67b8e300e638d7828bbcb95585f85c4df4d DIFF: https://github.com/llvm/llvm-project/commit/9429b67b8e300e638d7828bbcb95585f85c4df4d.diff

[Lldb-commits] [lldb] f959d81 - Fix buildbot breakage after https://reviews.llvm.org/D130309.

2022-07-22 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2022-07-22T13:24:26-07:00 New Revision: f959d815f4637890ebbacca379f1c38ab47e4e14 URL: https://github.com/llvm/llvm-project/commit/f959d815f4637890ebbacca379f1c38ab47e4e14 DIFF: https://github.com/llvm/llvm-project/commit/f959d815f4637890ebbacca379f1c38ab47e4e14.diff

[Lldb-commits] [lldb] 0bbce7a - Fix buildbot breakage after https://reviews.llvm.org/D130309.

2022-07-22 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2022-07-22T13:59:06-07:00 New Revision: 0bbce7a4c2d2bff622bdadd4323f93f5d90e6d24 URL: https://github.com/llvm/llvm-project/commit/0bbce7a4c2d2bff622bdadd4323f93f5d90e6d24 DIFF: https://github.com/llvm/llvm-project/commit/0bbce7a4c2d2bff622bdadd4323f93f5d90e6d24.diff

<    19   20   21   22   23   24   25   26   27   28   >