[Lldb-commits] [lldb] [lldb] Fix a crash when using .dwp files and make type lookup reliable with the index cache (PR #79544)

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

[Lldb-commits] [lldb] [lldb] Fix a crash when using .dwp files and make type lookup reliable with the index cache (PR #79544)

2024-02-01 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/79544 >From 90cfa4700d8590d58cecd678ce107ba3ec8481c7 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Thu, 25 Jan 2024 19:21:25 -0800 Subject: [PATCH 1/4] Fix a crash when using .dwp files and make type lookup

[Lldb-commits] [lldb] [lldb][TypeSynthetic][NFC] Make SyntheticChildrenFrontend::Update() return an enum (PR #80167)

2024-02-01 Thread Greg Clayton via lldb-commits
@@ -1305,6 +1305,13 @@ enum CompletionType { eTerminatorCompletion = (1ul << 27) }; +/// Specifies if children need to be re-computed +/// after a call to \ref SyntheticChildrenFrontEnd::Update. +enum class ChildCacheState { + eRefetch = 0, ///< Children need to be

[Lldb-commits] [lldb] [lldb] Fix expressions that involve nested structs/classes/unions. (PR #77029)

2024-02-01 Thread Greg Clayton via lldb-commits
clayborg wrote: > > But if it'd require substantial reengineering to clang to get this working > > - this seems an unfortunate regression to carry in the interim, and it > > might be worth reverting to the previous (differently buggy, but at least > > work-around-able) behavior. > > To

[Lldb-commits] [lldb] [lldb][DWARFIndex] Use IDX_parent to implement GetFullyQualifiedType query (PR #79932)

2024-02-01 Thread Greg Clayton via lldb-commits
clayborg wrote: > > I've added a log message with the `Error` itself being logged as well > > Thanks! I wasted half a day stepping through the DWARF parser recently, > thinking I'm debugging a parser bug, when it was really invalid DWARF > produced by an older version of dsymutil, so even

[Lldb-commits] [lldb] [lldb][TypeSynthetic][NFC] Make SyntheticChildrenFrontend::Update() return an enum (PR #80167)

2024-02-01 Thread Greg Clayton via lldb-commits
clayborg wrote: I like the `eReuse` and `eRefetch` values as well! https://github.com/llvm/llvm-project/pull/80167 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix debug info size statistics for split dwarf (PR #80218)

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

[Lldb-commits] [lldb] Don't cause a premature UpdateIfNeeded when checking in SBValue::GetSP (PR #80222)

2024-01-31 Thread Greg Clayton via lldb-commits
@@ -458,7 +458,12 @@ class ValueObject { virtual bool GetDeclaration(Declaration ); // The functions below should NOT be modified by subclasses + // This gets the current error for this ValueObject, it may update the value + // to ensure that the error is up to date.

[Lldb-commits] [lldb] Don't cause a premature UpdateIfNeeded when checking in SBValue::GetSP (PR #80222)

2024-01-31 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: LGTM with a possible rename mentioned in inline comments. Anyone else have anything? https://github.com/llvm/llvm-project/pull/80222 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] Don't cause a premature UpdateIfNeeded when checking in SBValue::GetSP (PR #80222)

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

[Lldb-commits] [lldb] Fix debug info size statistics for split dwarf (PR #80218)

2024-01-31 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,132 @@ +""" +Test SBTarget.GetStatistics() reporting for dwo files. +""" + +import json +import os + +from lldbsuite.test import lldbtest, lldbutil +from lldbsuite.test.decorators import * +from lldbsuite.test_event.build_exception import BuildError + +

[Lldb-commits] [lldb] Fix debug info size statistics for split dwarf (PR #80218)

2024-01-31 Thread Greg Clayton via lldb-commits
@@ -2667,6 +2667,29 @@ static bool UpdateCompilerContextForSimpleTemplateNames(TypeQuery ) { } return any_context_updated; } + +uint64_t SymbolFileDWARF::GetDebugInfoSize() { + DWARFDebugInfo = DebugInfo(); + uint32_t num_comp_units = info.GetNumUnits(); + + uint64_t

[Lldb-commits] [lldb] [lldb] Fix a crash when using .dwp files and make type lookup reliable with the index cache (PR #79544)

2024-01-31 Thread Greg Clayton via lldb-commits
clayborg wrote: I think I have taken care of everyone's requests, let me know if there is more to do! https://github.com/llvm/llvm-project/pull/79544 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [lldb][TypeSynthetic][NFC] Make SyntheticChildrenFrontend::Update() return an enum (PR #80167)

2024-01-31 Thread Greg Clayton via lldb-commits
@@ -49,14 +49,17 @@ class SyntheticChildrenFrontEnd { virtual size_t GetIndexOfChildWithName(ConstString name) = 0; - // this function is assumed to always succeed and it if fails, the front-end - // should know to deal with it in the correct way (most probably, by

[Lldb-commits] [lldb] [lldb][TypeSynthetic][NFC] Make SyntheticChildrenFrontend::Update() return an enum (PR #80167)

2024-01-31 Thread Greg Clayton via lldb-commits
@@ -49,14 +49,17 @@ class SyntheticChildrenFrontEnd { virtual size_t GetIndexOfChildWithName(ConstString name) = 0; - // this function is assumed to always succeed and it if fails, the front-end - // should know to deal with it in the correct way (most probably, by

[Lldb-commits] [lldb] [lldb] Fix a crash when using .dwp files and make type lookup reliable with the index cache (PR #79544)

2024-01-31 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/79544 >From 641f4f34db2fea4c6c6cf354d77e7ba5688d098b Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Thu, 25 Jan 2024 19:21:25 -0800 Subject: [PATCH 1/4] Fix a crash when using .dwp files and make type lookup

[Lldb-commits] [lldb] [lldb][DWARFIndex] Use IDX_parent to implement GetFullyQualifiedType query (PR #79932)

2024-01-31 Thread Greg Clayton via lldb-commits
@@ -218,6 +219,106 @@ void DebugNamesDWARFIndex::GetCompleteObjCClass( m_fallback.GetCompleteObjCClass(class_name, must_be_implementation, callback); } +namespace { +using Entry = llvm::DWARFDebugNames::Entry; + +/// If `entry` and all of its parents have an `IDX_parent`,

[Lldb-commits] [lldb] [lldb][DWARFIndex] Use IDX_parent to implement GetFullyQualifiedType query (PR #79932)

2024-01-31 Thread Greg Clayton via lldb-commits
@@ -218,6 +219,106 @@ void DebugNamesDWARFIndex::GetCompleteObjCClass( m_fallback.GetCompleteObjCClass(class_name, must_be_implementation, callback); } +namespace { +using Entry = llvm::DWARFDebugNames::Entry; + +/// If `entry` and all of its parents have an `IDX_parent`,

[Lldb-commits] [lldb] [lldb][TypeSynthetic][NFC] Make SyntheticChildrenFrontend::Update() return an enum (PR #80167)

2024-01-31 Thread Greg Clayton via lldb-commits
@@ -49,14 +49,17 @@ class SyntheticChildrenFrontEnd { virtual size_t GetIndexOfChildWithName(ConstString name) = 0; - // this function is assumed to always succeed and it if fails, the front-end - // should know to deal with it in the correct way (most probably, by

[Lldb-commits] [lldb] [lldb] Fix a crash when using .dwp files and make type lookup reliable with the index cache (PR #79544)

2024-01-30 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/79544 >From 641f4f34db2fea4c6c6cf354d77e7ba5688d098b Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Thu, 25 Jan 2024 19:21:25 -0800 Subject: [PATCH 1/3] Fix a crash when using .dwp files and make type lookup

[Lldb-commits] [lldb] [lldb] Fix expressions that involve nested structs/classes/unions. (PR #77029)

2024-01-30 Thread Greg Clayton via lldb-commits
clayborg wrote: > How'd this work before your recent changes, then - when each repeated query > would get one level further down in the nesting? How'd that work given the > clang limitations you're describing? It was because we were actually parsing and converting many extra types. Anytime

[Lldb-commits] [lldb] [lldb] Fix a crash when using .dwp files and make type lookup reliable with the index cache (PR #79544)

2024-01-30 Thread Greg Clayton via lldb-commits
clayborg wrote: > High level makes sense. > > Can you add test to ensure both dwarf4 & dwarf5 work? Also the modified test > covers dwp, have you tested dwo without dwp scenario for completeness? I can add a dwarf4 test, yes. https://github.com/llvm/llvm-project/pull/79544

[Lldb-commits] [lldb] [lldb] Fix a crash when using .dwp files and make type lookup reliable with the index cache (PR #79544)

2024-01-30 Thread Greg Clayton via lldb-commits
clayborg wrote: > > Even if we want to have the skeleton compile unit be parsed first, we would > > need to know this from any accelerator table entry, wether it be from > > .debug_names or from our internal manual index. > > True enough, but I think letting this become a lazy property >

[Lldb-commits] [lldb] [lldb] Fix a crash when using .dwp files and make type lookup reliable with the index cache (PR #79544)

2024-01-30 Thread Greg Clayton via lldb-commits
@@ -81,27 +81,88 @@ void DWARFDebugInfo::ParseUnitsFor(DIERef::Section section) { : m_context.getOrLoadDebugInfoData(); lldb::offset_t offset = 0; while (data.ValidOffset(offset)) { -llvm::Expected unit_sp = DWARFUnit::extract( +

[Lldb-commits] [lldb] [lldb] Fix expressions that involve nested structs/classes/unions. (PR #77029)

2024-01-30 Thread Greg Clayton via lldb-commits
clayborg wrote: The main issue we have is they way that clang works currently with the external AST source. We currently create a forward declaration type "struct Foo;" and we allow it to be completed once. Once it is completed clang expects the struct type to have everything that it needs,

[Lldb-commits] [lldb] [lldb][progress] Correctly check total for deterministic progress (PR #79912)

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

[Lldb-commits] [lldb] [lldb][progress][NFC] Add unit test for progress reports (PR #79533)

2024-01-29 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,125 @@ +//===-- ProgressReportTest.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[Lldb-commits] [lldb] [lldb][progress][NFC] Add unit test for progress reports (PR #79533)

2024-01-29 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,125 @@ +//===-- ProgressReportTest.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[Lldb-commits] [lldb] [lldb][progress][NFC] Add unit test for progress reports (PR #79533)

2024-01-29 Thread Greg Clayton via lldb-commits
@@ -39,7 +39,7 @@ class ProgressEventData : public EventData { GetAsStructuredData(const Event *event_ptr); uint64_t GetID() const { return m_id; } - bool IsFinite() const { return m_total != UINT64_MAX; } + bool IsFinite() const { return m_total != 1; }

[Lldb-commits] [lldb] [lldb][DWARFIndex] Use IDX_parent to implement GetFullyQualifiedType query (PR #79932)

2024-01-29 Thread Greg Clayton via lldb-commits
@@ -218,6 +219,104 @@ void DebugNamesDWARFIndex::GetCompleteObjCClass( m_fallback.GetCompleteObjCClass(class_name, must_be_implementation, callback); } +namespace { +using Entry = llvm::DWARFDebugNames::Entry; + +/// If `entry` and all of its parents have an `IDX_parent`,

[Lldb-commits] [lldb] [lldb][progress] Correctly check total for deterministic progress (PR #79912)

2024-01-29 Thread Greg Clayton via lldb-commits
@@ -39,7 +39,7 @@ class ProgressEventData : public EventData { GetAsStructuredData(const Event *event_ptr); uint64_t GetID() const { return m_id; } - bool IsFinite() const { return m_total != UINT64_MAX; } + bool IsFinite() const { return m_total != 1; }

[Lldb-commits] [lldb] [lldb][progress] Correctly check total for deterministic progress (PR #79912)

2024-01-29 Thread Greg Clayton via lldb-commits
@@ -23,7 +23,6 @@ Progress::Progress(std::string title, std::string details, lldb_private::Debugger *debugger) : m_title(title), m_details(details), m_id(++g_id), m_completed(0), m_total(1) { clayborg wrote: ```

[Lldb-commits] [lldb] [lldb][progress] Correctly check total for deterministic progress (PR #79912)

2024-01-29 Thread Greg Clayton via lldb-commits
@@ -39,7 +39,7 @@ class ProgressEventData : public EventData { GetAsStructuredData(const Event *event_ptr); uint64_t GetID() const { return m_id; } - bool IsFinite() const { return m_total != UINT64_MAX; } + bool IsFinite() const { return m_total != 1; }

[Lldb-commits] [lldb] [lldb][progress] Correctly check total for deterministic progress (PR #79912)

2024-01-29 Thread Greg Clayton via lldb-commits
@@ -41,7 +41,7 @@ void ProgressEventData::Dump(Stream *s) const { s->PutCString(", type = update"); // If m_total is UINT64_MAX, there is no progress to report, just "start" // and "end". If it isn't we will show the completed and total amounts. - if (m_total !=

[Lldb-commits] [lldb] [lldb][NFCI] Minor refactor to CommandObjectProcessHandle::VerifyCommandOptionValue (PR #79901)

2024-01-29 Thread Greg Clayton via lldb-commits
@@ -1591,24 +1591,24 @@ class CommandObjectProcessHandle : public CommandObjectParsed { Options *GetOptions() override { return _options; } - bool VerifyCommandOptionValue(const std::string , int _value) { -bool okay = true; + std::optional

[Lldb-commits] [lldb] [lldb][NFCI] Minor refactor to CommandObjectProcessHandle::VerifyCommandOptionValue (PR #79901)

2024-01-29 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. We should be modify `OptionArgParser::ToBoolean(...)` to return a `std::optional` instead of a local function. It already handles integer strings "0" and "1" correctly. Granted it doesn't allow "00" or "01" to be specified,

[Lldb-commits] [lldb] [lldb][NFCI] Minor refactor to CommandObjectProcessHandle::VerifyCommandOptionValue (PR #79901)

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

[Lldb-commits] [lldb] [lldb] Fix a crash when using .dwp files and make type lookup reliable with the index cache (PR #79544)

2024-01-29 Thread Greg Clayton via lldb-commits
clayborg wrote: Even if we want to have the skeleton compile unit be parsed first, we would need to know this from any accelerator table entry, wether it be from .debug_names or from our internal manual index. Our internal manual index creates a DIERef object with a magic .dwp file index + a

[Lldb-commits] [lldb] [lldb] Fix progress reporting for SymbolLocatorDebugSymbols (PR #79624)

2024-01-26 Thread Greg Clayton via lldb-commits
@@ -776,6 +776,10 @@ std::optional SymbolLocatorDebugSymbols::LocateExecutableSymbolFile( exec_fspec ? exec_fspec->GetFilename().AsCString("") : "", arch ? arch->GetArchitectureName() : "", (const void *)uuid); + Progress progress( + "Locating external

[Lldb-commits] [lldb] [lldb] Fix a crash when using .dwp files and make type lookup reliable with the index cache (PR #79544)

2024-01-26 Thread Greg Clayton via lldb-commits
clayborg wrote: > I'm not following all of this, but it appears to be based on the premise that > it's OK that sometimes split units inside a DWP file are parsed before their > skeleton unit? Why is that OK/when/why/where is that happening? When we have accelerator tables from lldb index

[Lldb-commits] [lldb] [lldb][progress][NFC] Add unit test for progress reports (PR #79533)

2024-01-26 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,105 @@ +#include "Plugins/Platform/MacOSX/PlatformMacOSX.h" +#include "Plugins/Platform/MacOSX/PlatformRemoteMacOSX.h" +#include "lldb/Core/Debugger.h" +#include "lldb/Core/Progress.h" +#include "lldb/Host/FileSystem.h" +#include "lldb/Host/HostInfo.h" +#include

[Lldb-commits] [lldb] [lldb][progress][NFC] Add unit test for progress reports (PR #79533)

2024-01-26 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,105 @@ +#include "Plugins/Platform/MacOSX/PlatformMacOSX.h" +#include "Plugins/Platform/MacOSX/PlatformRemoteMacOSX.h" +#include "lldb/Core/Debugger.h" +#include "lldb/Core/Progress.h" +#include "lldb/Host/FileSystem.h" +#include "lldb/Host/HostInfo.h" +#include

[Lldb-commits] [lldb] [lldb][progress][NFC] Add unit test for progress reports (PR #79533)

2024-01-26 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,105 @@ +#include "Plugins/Platform/MacOSX/PlatformMacOSX.h" +#include "Plugins/Platform/MacOSX/PlatformRemoteMacOSX.h" +#include "lldb/Core/Debugger.h" +#include "lldb/Core/Progress.h" +#include "lldb/Host/FileSystem.h" +#include "lldb/Host/HostInfo.h" +#include

[Lldb-commits] [lldb] [lldb][progress][NFC] Add unit test for progress reports (PR #79533)

2024-01-26 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: It is great to have unit tests for this. I remember with your previous patch we caught an issue where the completed event might not be delivered, or it would be delivered without the values being set correctly, so this will be great to be able to catch

[Lldb-commits] [lldb] [lldb][progress][NFC] Add unit test for progress reports (PR #79533)

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

[Lldb-commits] [lldb] [lldb][NFCI] Remove unused method BreakpointIDList::AddBreakpointID(const char *) (PR #79189)

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

[Lldb-commits] [lldb] [lldb] Include SBFormat.h in LLDB.h (PR #79194)

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

[Lldb-commits] [llvm] [lldb] Added settings for DEBUGINFOD cache location and timeout (PR #78605)

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

[Lldb-commits] [lldb] [lldb][DWARFUnit] Implement PeekDIEName query (PR #78486)

2024-01-19 Thread Greg Clayton via lldb-commits
clayborg wrote: I was thinking about DIE -> name stuff, and was wondering if we would benefit from a cache of DIE offset to `DW_AT_name` and DIE offset to `DW_AT_linkage_name`. Not sure how many times we might lookup DIE names multiple times. https://github.com/llvm/llvm-project/pull/78486

[Lldb-commits] [lldb] [lldb-dap] Add a CMake variable for defining a welcome message (PR #78811)

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

[Lldb-commits] [lldb] [lldb-dap] Add a CMake variable for defining a welcome message (PR #78811)

2024-01-19 Thread Greg Clayton via lldb-commits
@@ -655,6 +663,8 @@ void request_attach(const llvm::json::Object ) { g_dap.SetFrameFormat(GetString(arguments, "customFrameFormat")); g_dap.SetThreadFormat(GetString(arguments, "customThreadFormat")); + PrintWelcomeMessage(); clayborg wrote: We want

[Lldb-commits] [lldb] [lldb-dap] Add a CMake variable for defining a welcome message (PR #78811)

2024-01-19 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Looks like the typo will break the buildbots and we want the welcome message to be printed for launches too right? https://github.com/llvm/llvm-project/pull/78811 ___ lldb-commits mailing list

[Lldb-commits] [lldb] [lldb-dap] Add a CMake variable for defining a welcome message (PR #78811)

2024-01-19 Thread Greg Clayton via lldb-commits
@@ -664,7 +674,7 @@ void request_attach(const llvm::json::Object ) { // Run any initialize LLDB commands the user specified in the launch.json if (llvm::Error err = g_dap.RunInitCommands()) { -response["success"] = false; + response["success"] = false;

[Lldb-commits] [lldb] [lldb][DWARFUnit] Implement PeekDIEName query (PR #78486)

2024-01-19 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Now this is safe and all my issues are gone. Thanks for improving. https://github.com/llvm/llvm-project/pull/78486 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [llvm] Added settings for DEBUGINFOD cache location and timeout (PR #78605)

2024-01-19 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Looks good to me on the LLDB side, but you should probably get the ok from the maintainers of the debug infod library for those changes. https://github.com/llvm/llvm-project/pull/78605 ___ lldb-commits mailing

[Lldb-commits] [lldb] [lldb][DWARFUnit] Implement PeekDIEName query (PR #78486)

2024-01-17 Thread Greg Clayton via lldb-commits
@@ -663,6 +663,14 @@ DWARFUnit::GetDIE(dw_offset_t die_offset) { return DWARFDIE(); // Not found } +llvm::StringRef DWARFUnit::PeekDIEName(dw_offset_t die_offset) { + const DWARFDataExtractor = GetData(); + DWARFDebugInfoEntry die; + if (!die.Extract(data, this,

[Lldb-commits] [lldb] [lldb][Format] Fix missing inlined function names in frame formatting. (PR #78494)

2024-01-17 Thread Greg Clayton via lldb-commits
clayborg wrote: LGTM https://github.com/llvm/llvm-project/pull/78494 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DWARFUnit] Implement PeekDIEName query (PR #78486)

2024-01-17 Thread Greg Clayton via lldb-commits
@@ -663,6 +663,14 @@ DWARFUnit::GetDIE(dw_offset_t die_offset) { return DWARFDIE(); // Not found } +llvm::StringRef DWARFUnit::PeekDIEName(dw_offset_t die_offset) { + const DWARFDataExtractor = GetData(); + DWARFDebugInfoEntry die; + if (!die.Extract(data, this,

[Lldb-commits] [lldb] [lldb] Stop creating BreakpointEventData raw pointers (PR #78508)

2024-01-17 Thread Greg Clayton via lldb-commits
clayborg wrote: lgtm! https://github.com/llvm/llvm-project/pull/78508 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DWARFUnit] Implement PeekDIEName query (PR #78486)

2024-01-17 Thread Greg Clayton via lldb-commits
@@ -104,3 +105,61 @@ TEST(DWARFDIETest, ChildIteration) { DWARFDIE no_children_die(unit, die_child0); EXPECT_TRUE(no_children_die.children().empty()); } + +TEST(DWARFDIETest, PeekName) { + const char *yamldata = R"( +--- !ELF +FileHeader: clayborg wrote:

[Lldb-commits] [lldb] [lldb][DWARFUnit] Implement PeekDIEName query (PR #78486)

2024-01-17 Thread Greg Clayton via lldb-commits
@@ -663,6 +663,14 @@ DWARFUnit::GetDIE(dw_offset_t die_offset) { return DWARFDIE(); // Not found } +llvm::StringRef DWARFUnit::PeekDIEName(dw_offset_t die_offset) { + const DWARFDataExtractor = GetData(); + DWARFDebugInfoEntry die; + if (!die.Extract(data, this,

[Lldb-commits] [lldb] Ensure that the executable module is ModuleList[0] (PR #78360)

2024-01-16 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/78360 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Support dSYMs as modules (PR #77966)

2024-01-16 Thread Greg Clayton via lldb-commits
clayborg wrote: > > > If a module is debug info only, like a dSYM file, and then you try to > > > `target module add` it to a target, it would be nice to add it as the > > > symbol file for an already existing module. The test below, I wouldn't > > > want a target with two things representing

[Lldb-commits] [lldb] [lldb] Support dSYMs as modules (PR #77966)

2024-01-16 Thread Greg Clayton via lldb-commits
clayborg wrote: > If a module is debug info only, like a dSYM file, and then you try to `target > module add` it to a target, it would be nice to add it as the symbol file for > an already existing module. The test below, I wouldn't want a target with two > things representing a.out, which is

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

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

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

2024-01-12 Thread Greg Clayton via lldb-commits
@@ -35,25 +42,28 @@ Progress::~Progress() { ReportProgress(); } -void Progress::Increment(uint64_t amount, std::string update) { +void Progress::Increment(uint64_t amount, + std::optional updated_detail) { if (amount > 0) { std::lock_guard

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

2024-01-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Thanks for the changes. On comment might be able to be reverted, but this looks good. https://github.com/llvm/llvm-project/pull/77547 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

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

[Lldb-commits] [lldb] [lldb-dap] Updating VariableDescription to use GetDescription() as a fallback. (PR #77026)

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

[Lldb-commits] [lldb] [lldb] Support dSYMs as modules (PR #77966)

2024-01-12 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,21 @@ +import os +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * + + +@skipUnlessDarwin +class TargetModuleAddDsymTest(TestBase): +@no_debug_info_test +def test_target_module_add(self): +"""Test that you can add a dSYM as

[Lldb-commits] [lldb] [lldb] Support dSYMs as modules (PR #77966)

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

[Lldb-commits] [lldb] [lldb] Support dSYMs as modules (PR #77966)

2024-01-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: If a module is debug info only, like a dSYM file, and then you try to `target module add` it to a target, it would be nice to add it as the symbol file for an already existing module. The test below, I wouldn't want a target with two things representing

[Lldb-commits] [lldb] [lldb] Adjust DynamicLoaderDarwin::GetThreadLocalData to support changes to TLS on macOS (PR #77854)

2024-01-12 Thread Greg Clayton via lldb-commits
clayborg wrote: It will be nice to not have the TLS test failing on macOS anymore! https://github.com/llvm/llvm-project/pull/77854 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Updating VariableDescription to use GetDescription() as a fallback. (PR #77026)

2024-01-11 Thread Greg Clayton via lldb-commits
@@ -1210,15 +1210,16 @@ bool SBValue::GetDescription(SBStream ) { ValueLocker locker; lldb::ValueObjectSP value_sp(GetSP(locker)); - if (value_sp) { -DumpValueObjectOptions options; -options.SetUseDynamicType(m_opaque_sp->GetUseDynamic()); -

[Lldb-commits] [lldb] [lldb-dap] Updating VariableDescription to use GetDescription() as a fallback. (PR #77026)

2024-01-11 Thread Greg Clayton via lldb-commits
@@ -173,21 +173,21 @@ TryCreateAutoSummaryForContainer(lldb::SBValue ) { lldb::SBValue child = v.GetChildAtIndex(i); if (llvm::StringRef name = child.GetName(); !name.empty()) { - llvm::StringRef value; + llvm::StringRef desc; if (llvm::StringRef

[Lldb-commits] [lldb] [lldb-dap] Updating VariableDescription to use GetDescription() as a fallback. (PR #77026)

2024-01-11 Thread Greg Clayton via lldb-commits
@@ -405,6 +405,9 @@ struct VariableDescription { /// Create a JSON object that represents these extensions to the DAP variable /// response. llvm::json::Object GetVariableExtensionsJSON(); + + /// Returns a description of the value appropraite for the specified context.

[Lldb-commits] [lldb] Fix debug info size statistics for split dwarf (PR #77671)

2024-01-10 Thread Greg Clayton via lldb-commits
clayborg wrote: > > Looks good, need to add tests for: > > > > * split dwarf with .dwo files > > * split dwarf with .dwp file > > @clayborg, do you have suggestion regarding how to test `GetDebugInfoSize()` > for dwo/dwp? yes, for either we just add up the size of any debug info sections for

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

2024-01-10 Thread Greg Clayton via lldb-commits
@@ -35,25 +42,29 @@ Progress::~Progress() { ReportProgress(); } -void Progress::Increment(uint64_t amount, std::string update) { +void Progress::Increment(uint64_t amount, + std::optional updated_detail) { if (amount > 0) { std::lock_guard

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

2024-01-10 Thread Greg Clayton via lldb-commits
@@ -35,25 +42,29 @@ Progress::~Progress() { ReportProgress(); } -void Progress::Increment(uint64_t amount, std::string update) { +void Progress::Increment(uint64_t amount, + std::optional updated_detail) { if (amount > 0) { std::lock_guard

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

2024-01-10 Thread Greg Clayton via lldb-commits
@@ -96,13 +97,14 @@ class Progress { static std::atomic g_id; /// The title of the progress activity. std::string m_title; + std::string m_details; std::mutex m_mutex; /// A unique integer identifier for progress reporting. const uint64_t m_id; /// How much

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

2024-01-10 Thread Greg Clayton via lldb-commits
@@ -11,15 +11,19 @@ #include "lldb/Core/Debugger.h" #include "lldb/Utility/StreamString.h" +#include + using namespace lldb; using namespace lldb_private; std::atomic Progress::g_id(0); -Progress::Progress(std::string title, uint64_t total,

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

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

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

2024-01-10 Thread Greg Clayton via lldb-commits
@@ -30,18 +34,19 @@ Progress::~Progress() { // Make sure to always report progress completed when this object is // destructed so it indicates the progress dialog/activity should go away. std::lock_guard guard(m_mutex); - if (!m_completed) -m_completed = m_total; +

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

2024-01-10 Thread Greg Clayton via lldb-commits
@@ -51,9 +56,10 @@ void Progress::Increment(uint64_t amount, std::string update) { void Progress::ReportProgress(std::string update) { if (!m_complete) { // Make sure we only send one notification that indicates the progress is -// complete. -m_complete =

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

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

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

2024-01-10 Thread Greg Clayton via lldb-commits
@@ -30,18 +34,19 @@ Progress::~Progress() { // Make sure to always report progress completed when this object is // destructed so it indicates the progress dialog/activity should go away. std::lock_guard guard(m_mutex); - if (!m_completed) -m_completed = m_total; +

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

2024-01-10 Thread Greg Clayton via lldb-commits
@@ -30,18 +34,19 @@ Progress::~Progress() { // Make sure to always report progress completed when this object is // destructed so it indicates the progress dialog/activity should go away. std::lock_guard guard(m_mutex); - if (!m_completed) -m_completed = m_total; +

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

2024-01-10 Thread Greg Clayton via lldb-commits
@@ -51,9 +56,10 @@ void Progress::Increment(uint64_t amount, std::string update) { void Progress::ReportProgress(std::string update) { clayborg wrote: remove `std::string update` as we have it in `m_details` https://github.com/llvm/llvm-project/pull/77547

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

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

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

2024-01-10 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: A bit more cleanup, see inline comment https://github.com/llvm/llvm-project/pull/77547 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Updating VariableDescription to use GetDescription() as a fallback. (PR #77026)

2024-01-10 Thread Greg Clayton via lldb-commits
clayborg wrote: > > Is there a way we can tell that the request is from the console and only > > enable this feature if we are going to dump it to the debug console? > > Yea, the DAP has a context we can use to limit this >

[Lldb-commits] [lldb] Fix debug info size statistics for split dwarf (PR #77671)

2024-01-10 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Looks good, need to add tests for: - split dwarf with .dwo files - split dwarf with .dwp file https://github.com/llvm/llvm-project/pull/77671 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [lldb-dap] Updating VariableDescription to use GetDescription() as a fallback. (PR #77026)

2024-01-10 Thread Greg Clayton via lldb-commits
clayborg wrote: Is there a way we can tell that the request is from the console and only enable this feature if we are going to dump it to the debug console? https://github.com/llvm/llvm-project/pull/77026 ___ lldb-commits mailing list

[Lldb-commits] [lldb] [lldb-dap] Updating VariableDescription to use GetDescription() as a fallback. (PR #77026)

2024-01-10 Thread Greg Clayton via lldb-commits
clayborg wrote: > > Looks fine to me. Can we add a test? > > Updated the existing tests to check the adjusted format. > > One issue I did notice with tests is that the response to an expression will > include a response are automatically persisted by > `SBValue::GetDescription()`, so you

[Lldb-commits] [lldb] Add settings and code that limits the number of progress events. (PR #75769)

2024-01-10 Thread Greg Clayton via lldb-commits
@@ -1430,6 +1445,279 @@ void Debugger::SetDestroyCallback( m_destroy_callback_baton = baton; } + + /// Notify the progress thread that there is new progress data. +void Debugger::NotifyProgress(std::unique_ptr _up) { + // Start the progress thread if it isn't already

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

2024-01-09 Thread Greg Clayton via lldb-commits
@@ -69,7 +69,8 @@ class Progress { /// /// @param [in] debugger An optional debugger pointer to specify that this /// progress is to be reported only to specific debuggers. - Progress(std::string title, uint64_t total = UINT64_MAX, + Progress(std::string title,

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

2024-01-09 Thread Greg Clayton via lldb-commits
@@ -519,8 +519,7 @@ void SymbolFileDWARF::InitializeObject() { if (apple_names.GetByteSize() > 0 || apple_namespaces.GetByteSize() > 0 || apple_types.GetByteSize() > 0 || apple_objc.GetByteSize() > 0) { - Progress progress(llvm::formatv("Loading Apple DWARF

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

2024-01-09 Thread Greg Clayton via lldb-commits
@@ -532,8 +531,7 @@ void SymbolFileDWARF::InitializeObject() { DWARFDataExtractor debug_names; LoadSectionData(eSectionTypeDWARFDebugNames, debug_names); if (debug_names.GetByteSize() > 0) { - Progress progress( - llvm::formatv("Loading DWARF5 index

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

2024-01-09 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. The roots of this look really good. A few nits we can choose to fix or do in another patch. https://github.com/llvm/llvm-project/pull/77547 ___ lldb-commits mailing list

[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

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

<    3   4   5   6   7   8   9   10   11   12   >