[Lldb-commits] [lldb] [lldb] Part 1 of 2 - Refactor `CommandObject::Execute(...)` return `void` (not `bool`) (PR #69989)

2023-10-23 Thread Dave Lee via lldb-commits
https://github.com/kastiglione commented: I've thought about doing this before too, so +1 from me. Let's see what comments there are. https://github.com/llvm/llvm-project/pull/69989 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [lldb] Part 1 of 2 - Refactor `CommandObject::Execute(...)` return `void` (not `bool`) (PR #69989)

2023-10-23 Thread Dave Lee via lldb-commits
@@ -429,11 +428,12 @@ llvm::StringRef CommandObjectProxy::GetUnsupportedError() { return "command is not implemented"; } -bool CommandObjectProxy::Execute(const char *args_string, +void CommandObjectProxy::Execute(const char *args_string,

[Lldb-commits] [lldb] Reintroduce accidentally deleted "protected" keyword in SymbolFileDWARF (PR #69990)

2023-10-23 Thread Walter Erquinigo via lldb-commits
@@ -321,6 +322,7 @@ class SymbolFileDWARF : public SymbolFileCommon { m_file_index = file_index; } +protected: walter-erquinigo wrote: Sure, after you merge this patch, I'll send another one exposing only what's needed. I'll also remove

[Lldb-commits] [lldb] Reintroduce accidentally deleted "protected" keyword in SymbolFileDWARF (PR #69990)

2023-10-23 Thread Augusto Noronha via lldb-commits
@@ -321,6 +322,7 @@ class SymbolFileDWARF : public SymbolFileCommon { m_file_index = file_index; } +protected: augusto2112 wrote: I think the big issue on keeping everything public is that will will use those methods without realizing they were

[Lldb-commits] [lldb] Reintroduce accidentally deleted "protected" keyword in SymbolFileDWARF (PR #69990)

2023-10-23 Thread Walter Erquinigo via lldb-commits
https://github.com/walter-erquinigo approved this pull request. https://github.com/llvm/llvm-project/pull/69990 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Reintroduce accidentally deleted "protected" keyword in SymbolFileDWARF (PR #69990)

2023-10-23 Thread Walter Erquinigo via lldb-commits
@@ -321,6 +322,7 @@ class SymbolFileDWARF : public SymbolFileCommon { m_file_index = file_index; } +protected: walter-erquinigo wrote: The ivars thing make sense. Could you at least just move the ivars into a protected or private section for now? If

[Lldb-commits] [lldb] Reintroduce accidentally deleted "protected" keyword in SymbolFileDWARF (PR #69990)

2023-10-23 Thread Augusto Noronha via lldb-commits
@@ -321,6 +322,7 @@ class SymbolFileDWARF : public SymbolFileCommon { m_file_index = file_index; } +protected: augusto2112 wrote: Can't we merge it and then you can open your isolated patch with the methods you want to expose? Right now everything is

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -34,7 +34,7 @@ struct CompilerContext { } bool operator!=(const CompilerContext ) const { return !(*this == rhs); } - void Dump() const; + void Dump(Stream *s) const; bulbazord wrote: Yes, we basically always want the stream to be a valid pointer, a

[Lldb-commits] [lldb] Reintroduce accidentally deleted "protected" keyword in SymbolFileDWARF (PR #69990)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -321,6 +322,7 @@ class SymbolFileDWARF : public SymbolFileCommon { m_file_index = file_index; } +protected: bulbazord wrote: Which things are you using specifically? If you want to use them out of tree, we should think more carefully about which

[Lldb-commits] [lldb] [lldb] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -266,33 +268,73 @@ void Watchpoint::Dump(Stream *s) const { // If prefix is nullptr, we display the watch id and ignore the prefix // altogether. -void Watchpoint::DumpSnapshots(Stream *s, const char *prefix) const { - if (!prefix) { -s->Printf("\nWatchpoint %u hit:",

[Lldb-commits] [lldb] [lldb] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -491,14 +491,13 @@ static StopInfoSP GetStopInfoForHardwareBP(Thread , Target *target, uint64_t exc_sub_sub_code) { // Try hardware watchpoint. if (target) { +// LWP_TODO: We need to find the WatchpointResource that

[Lldb-commits] [lldb] [lldb] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -3105,102 +3122,184 @@ Status ProcessGDBRemote::DisableBreakpointSite(BreakpointSite *bp_site) { } // Pre-requisite: wp != NULL. -static GDBStoppointType GetGDBStoppointType(Watchpoint *wp) { - assert(wp); - bool watch_read = wp->WatchpointRead(); - bool watch_write =

[Lldb-commits] [lldb] [lldb] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -266,33 +268,73 @@ void Watchpoint::Dump(Stream *s) const { // If prefix is nullptr, we display the watch id and ignore the prefix // altogether. -void Watchpoint::DumpSnapshots(Stream *s, const char *prefix) const { - if (!prefix) { -s->Printf("\nWatchpoint %u hit:",

[Lldb-commits] [lldb] [lldb] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -0,0 +1,90 @@ +//===-- WatchpointCollection.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] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -3105,102 +3122,184 @@ Status ProcessGDBRemote::DisableBreakpointSite(BreakpointSite *bp_site) { } // Pre-requisite: wp != NULL. -static GDBStoppointType GetGDBStoppointType(Watchpoint *wp) { - assert(wp); - bool watch_read = wp->WatchpointRead(); - bool watch_write =

[Lldb-commits] [lldb] [lldb] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -0,0 +1,140 @@ +//===-- WatchpointResource.h *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[Lldb-commits] [lldb] [lldb] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -0,0 +1,140 @@ +//===-- WatchpointResource.h *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[Lldb-commits] [lldb] [lldb] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-23 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: A lot of the `WatchpointResourceList::FindBy` methods can probably be rewritten with `std::find_if` (or `llvm::find_if` which is a little easier to use IMO). Overall, looks like a pretty nice mostly-NFC refactor! 

[Lldb-commits] [lldb] [lldb] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -0,0 +1,90 @@ +//===-- WatchpointCollection.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] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -0,0 +1,140 @@ +//===-- WatchpointResource.h *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[Lldb-commits] [lldb] [lldb] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -266,33 +268,73 @@ void Watchpoint::Dump(Stream *s) const { // If prefix is nullptr, we display the watch id and ignore the prefix // altogether. -void Watchpoint::DumpSnapshots(Stream *s, const char *prefix) const { - if (!prefix) { -s->Printf("\nWatchpoint %u hit:",

[Lldb-commits] [lldb] [lldb] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -0,0 +1,140 @@ +//===-- WatchpointResource.h *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[Lldb-commits] [lldb] [lldb] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -0,0 +1,140 @@ +//===-- WatchpointResource.h *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[Lldb-commits] [lldb] [lldb] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -0,0 +1,140 @@ +//===-- WatchpointResource.h *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[Lldb-commits] [lldb] [lldb] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-23 Thread Alex Langford via lldb-commits
https://github.com/bulbazord edited https://github.com/llvm/llvm-project/pull/68845 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Reintroduce accidentally deleted "protected" keyword in SymbolFileDWARF (PR #69990)

2023-10-23 Thread Walter Erquinigo via lldb-commits
https://github.com/walter-erquinigo edited https://github.com/llvm/llvm-project/pull/69990 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Reintroduce accidentally deleted "protected" keyword in SymbolFileDWARF (PR #69990)

2023-10-23 Thread Walter Erquinigo via lldb-commits
https://github.com/walter-erquinigo requested changes to this pull request. https://github.com/llvm/llvm-project/pull/69990 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Reintroduce accidentally deleted "protected" keyword in SymbolFileDWARF (PR #69990)

2023-10-23 Thread Walter Erquinigo via lldb-commits
@@ -321,6 +322,7 @@ class SymbolFileDWARF : public SymbolFileCommon { m_file_index = file_index; } +protected: walter-erquinigo wrote: My bad for merging this, but I beg you not to reintroduce it. I originally intended to have an isolated patch just

[Lldb-commits] [lldb] [Reland] Detect against invalid variant index for LibStdC++ std::variant data formatters (PR #69614)

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

[Lldb-commits] [lldb] [lldb-vscode] Allow specifying a custom escape prefix for LLDB commands (PR #69238)

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

[Lldb-commits] [lldb] [lldb] Part 2 of 2 - Refactor `CommandObject::DoExecute(...)` return `void` (not `bool`) (PR #69991)

2023-10-23 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Pete Lawrence (PortalPete) Changes [lldb] Part 2 of 2 - Refactor `CommandObject::DoExecute(...)` to return `void` instead of ~~`bool`~~ Justifications: - The code doesn't ultimately apply the `true`/`false` return values. - The methods

[Lldb-commits] [lldb] [lldb] Part 1 of 2 - Refactor `CommandObject::Execute(...)` return `void` (not `bool`) (PR #69989)

2023-10-23 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/69989 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Reintroduce accidentally deleted "protected" keyword in SymbolFileDWARF (PR #69990)

2023-10-23 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Augusto Noronha (augusto2112) Changes The "protected" was accidentally removed during refactoring of SymbolFileDWARF. Reintroduce it and also make DWARFASTParser a friend class since 040c4f4d98f3306e068521e3c218bdbc170f81f3 was merged and

[Lldb-commits] [lldb] Reintroduce accidentally deleted "protected" keyword in SymbolFileDWARF (PR #69990)

2023-10-23 Thread Augusto Noronha via lldb-commits
https://github.com/augusto2112 created https://github.com/llvm/llvm-project/pull/69990 The "protected" was accidentally removed during refactoring of SymbolFileDWARF. Reintroduce it and also make DWARFASTParser a friend class since 040c4f4d98f3306e068521e3c218bdbc170f81f3 was merged and won't

[Lldb-commits] [lldb] [lldb] Part 1 of 2 - Refactor `CommandObject::Execute(...)` return `void` (not `bool`) (PR #69989)

2023-10-23 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Pete Lawrence (PortalPete) Changes Justifications: - The code doesn't ultimately apply the `true`/`false` return values. - The methods already pass around a `CommandReturnObject`, typically with a `result` parameter. - Each command return

[Lldb-commits] [lldb] [lldb] Part 1 of 2 - Refactor `CommandObject::Execute(...)` return `void` (not `bool`) (PR #69989)

2023-10-23 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/69989 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Greg Clayton via lldb-commits
@@ -64,49 +64,51 @@ bool lldb_private::contextMatches(llvm::ArrayRef context_chain, return true; } -void CompilerContext::Dump() const { +void CompilerContext::Dump(Stream *s) const { clayborg wrote: "Stream "

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Greg Clayton via lldb-commits
@@ -34,7 +34,7 @@ struct CompilerContext { } bool operator!=(const CompilerContext ) const { return !(*this == rhs); } - void Dump() const; + void Dump(Stream *s) const; clayborg wrote: I think Alex Langford is trying to get rid of functions that take

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Greg Clayton via lldb-commits
@@ -373,47 +373,49 @@ std::vector DWARFDIE::GetDeclContextDIEs() const { return result; } -void DWARFDIE::GetDeclContext( -llvm::SmallVectorImpl ) const { +std::vector DWARFDIE::GetDeclContext() const { + std::vector context; const dw_tag_t tag = Tag(); if (tag

[Lldb-commits] [lldb] [lldb] Part 1 of 2 - Refactor `CommandObject::Execute(...)` to return `void` instead of ~~`bool`~~ (PR #69989)

2023-10-23 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete created https://github.com/llvm/llvm-project/pull/69989 Justifications: - The code doesn't ultimately apply the `true`/`false` return values. - The methods already pass around a `CommandReturnObject`, typically with a `result` parameter. - Each command return

[Lldb-commits] [lldb] [lldb][NFC] Move DWARFASTParserClang::GetTypeForDIE to DWARFASTParser (PR #69764)

2023-10-23 Thread Augusto Noronha via lldb-commits
https://github.com/augusto2112 closed https://github.com/llvm/llvm-project/pull/69764 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D159314: [lldb] Introduce OperatingSystem{, Python}Interface and make use it

2023-10-23 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. Since @bulbazord asked me offline, all the repeat it here: Everything that was deleted here was replaced by either a call to the existing `ScriptedPythonInterface::Dispatch` method or depends on the new way to create scripted plugin objects

[Lldb-commits] [lldb] e6b3a27 - [lldb][NFC] Move DWARFASTParserClang::GetTypeForDIE to DWARFASTParser (#69764)

2023-10-23 Thread via lldb-commits
Author: Augusto Noronha Date: 2023-10-23T17:22:16-07:00 New Revision: e6b3a2753b173aa87bd9ac373a150106856e80e4 URL: https://github.com/llvm/llvm-project/commit/e6b3a2753b173aa87bd9ac373a150106856e80e4 DIFF:

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Adrian Prantl via lldb-commits
@@ -26,7 +26,7 @@ // CHECK-ANON-S1: CXXRecordDecl {{.*}} imported in A struct StructB s3; -// CHECK-ANON-S2: CXXRecordDecl {{.*}} imported in A.B {{.*}} struct +// CHECK-ANON-S2: CXXRecordDecl {{.*}} imported in A.B {{.*}}struct adrian-prantl wrote: In case

[Lldb-commits] [lldb] [lldb/Interpreter] Make ScriptedInterface Object creation more generic (PR #68052)

2023-10-23 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben edited https://github.com/llvm/llvm-project/pull/68052 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][NFC] Move DWARFASTParserClang::GetTypeForDIE to DWARFASTParser (PR #69764)

2023-10-23 Thread Augusto Noronha via lldb-commits
https://github.com/augusto2112 edited https://github.com/llvm/llvm-project/pull/69764 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Unifying Scripted Affordance Interfaces (wip) (PR #68052)

2023-10-23 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben edited https://github.com/llvm/llvm-project/pull/68052 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][NFC] Move GetTypeForDIE from to DWARFASTParser (PR #69764)

2023-10-23 Thread Augusto Noronha via lldb-commits
https://github.com/augusto2112 updated https://github.com/llvm/llvm-project/pull/69764 >From 040c4f4d98f3306e068521e3c218bdbc170f81f3 Mon Sep 17 00:00:00 2001 From: Augusto Noronha Date: Fri, 20 Oct 2023 12:59:00 -0700 Subject: [PATCH] [lldb][NFC] Move DWARFASTParserClang::GetTypeForDIE to

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Adrian Prantl via lldb-commits
@@ -322,10 +322,12 @@ std::vector parseCompilerContext() { } result.push_back({kind, ConstString{value}}); } - outs() << "Search context: {\n"; - for (auto entry: result) -entry.Dump(); - outs() << "}\n"; + outs() << "Search context: {"; +

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Adrian Prantl via lldb-commits
@@ -396,6 +396,17 @@ void Function::GetDescription(Stream *s, lldb::DescriptionLevel level, s->AsRawOstream() << ", name = \"" << name << '"'; if (mangled) s->AsRawOstream() << ", mangled = \"" << mangled << '"'; + if (level == eDescriptionLevelVerbose) { +*s

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/69981 >From 8ef2fc770ac08aa4e5411a16a04fbe8a1dcb8233 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Mon, 23 Oct 2023 15:55:40 -0700 Subject: [PATCH] Expose DWARFDIE::GetDeclContext() in

[Lldb-commits] [lldb] [lldb] Unifying Scripted Affordance Interfaces (wip) (PR #68052)

2023-10-23 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/68052 >From cd6c231c27d60e9254936544f8758c945e5a Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Mon, 23 Oct 2023 15:08:19 -0700 Subject: [PATCH] [lldb/Interpreter] Make ScriptedInterface Object

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/69981 >From 037a18f413cfabd3d0fdd1f1eb2fd0867ac33ecd Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Mon, 23 Oct 2023 15:55:40 -0700 Subject: [PATCH] Expose DWARFDIE::GetDeclContext() in

[Lldb-commits] [lldb] [lldb] Add `SBModule.SetLocateDwoCallback` (PR #69517)

2023-10-23 Thread via lldb-commits
jimingham wrote: Given that the Modules that we create are a shared resource for all Debuggers, it would be strange to have two debuggers with different paths. Would you want to tell debugger A whose callback didn't locate the DWO that it has no debug info, but the one whose callback did

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Adrian Prantl via lldb-commits
@@ -142,8 +142,7 @@ TypeSP DWARFASTParserClang::ParseTypeFromClangModule(const SymbolContext , // If this type comes from a Clang module, recursively look in the // DWARF section of the .pcm file in the module cache. Clang // generates DWO skeleton units as breadcrumbs

[Lldb-commits] [lldb] [lldb][NFC] Remote reference to Swift in DWARFASTParser::Kind enum (PR #69984)

2023-10-23 Thread Augusto Noronha via lldb-commits
https://github.com/augusto2112 closed https://github.com/llvm/llvm-project/pull/69984 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] e453569 - [lldb][NFC] Remote reference to Swift in DWARFASTParser::Kind enum (#69984)

2023-10-23 Thread via lldb-commits
Author: Augusto Noronha Date: 2023-10-23T16:37:45-07:00 New Revision: e45356910f826194003e9bd62a2406971b2fe3f3 URL: https://github.com/llvm/llvm-project/commit/e45356910f826194003e9bd62a2406971b2fe3f3 DIFF:

[Lldb-commits] [lldb] [lldb][NFC] Remote reference to Swift in DWARFASTParser::Kind enum (PR #69984)

2023-10-23 Thread Augusto Noronha via lldb-commits
https://github.com/augusto2112 created https://github.com/llvm/llvm-project/pull/69984 None >From 2500e7fadc72c56a887b27d5f271bea5af70ccab Mon Sep 17 00:00:00 2001 From: Augusto Noronha Date: Mon, 23 Oct 2023 16:35:24 -0700 Subject: [PATCH] [lldb][NFC] Remote reference to Swift in

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Michael Buch via lldb-commits
@@ -396,6 +396,17 @@ void Function::GetDescription(Stream *s, lldb::DescriptionLevel level, s->AsRawOstream() << ", name = \"" << name << '"'; if (mangled) s->AsRawOstream() << ", mangled = \"" << mangled << '"'; + if (level == eDescriptionLevelVerbose) { +*s

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Michael Buch via lldb-commits
@@ -322,10 +322,12 @@ std::vector parseCompilerContext() { } result.push_back({kind, ConstString{value}}); } - outs() << "Search context: {\n"; - for (auto entry: result) -entry.Dump(); - outs() << "}\n"; + outs() << "Search context: {"; +

[Lldb-commits] [lldb] [lldb][NFC] Move GetTypeForDIE from to DWARFASTParser (PR #69764)

2023-10-23 Thread Augusto Noronha via lldb-commits
https://github.com/augusto2112 updated https://github.com/llvm/llvm-project/pull/69764 >From d84b4b293a97b75a34e4208c914988a2e5231d66 Mon Sep 17 00:00:00 2001 From: Augusto Noronha Date: Fri, 20 Oct 2023 12:59:00 -0700 Subject: [PATCH] [lldb][NFC] Move GetTypeForDIE from to DWARFASTParser ---

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Michael Buch via lldb-commits
@@ -396,6 +396,17 @@ void Function::GetDescription(Stream *s, lldb::DescriptionLevel level, s->AsRawOstream() << ", name = \"" << name << '"'; if (mangled) s->AsRawOstream() << ", mangled = \"" << mangled << '"'; + if (level == eDescriptionLevelVerbose) { +*s

[Lldb-commits] [lldb] [lldb][NFC] Implement llvm-style RTTI for DWARFASTParser (PR #69762)

2023-10-23 Thread Augusto Noronha via lldb-commits
https://github.com/augusto2112 closed https://github.com/llvm/llvm-project/pull/69762 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 61c4ee9 - [lldb][NFC] Implement llvm-style RTTI for DWARFASTParser (#69762)

2023-10-23 Thread via lldb-commits
Author: Augusto Noronha Date: 2023-10-23T16:25:18-07:00 New Revision: 61c4ee94498f99f45b630bc491ad11db236a3b82 URL: https://github.com/llvm/llvm-project/commit/61c4ee94498f99f45b630bc491ad11db236a3b82 DIFF:

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread via lldb-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 840d0b7e03045c30b052dce8d0bb82f3fa0c5d6d 6b41e8ccaf7c3daf787cb7f7399ba815c5fe5b77 --

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -142,8 +142,7 @@ TypeSP DWARFASTParserClang::ParseTypeFromClangModule(const SymbolContext , // If this type comes from a Clang module, recursively look in the // DWARF section of the .pcm file in the module cache. Clang // generates DWO skeleton units as breadcrumbs

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -533,6 +533,12 @@ class Function : public UserID, public SymbolContextScope { /// The DeclContext, or NULL if none exists. CompilerDeclContext GetDeclContext(); + /// Get the CompilerContext for this function, if available. + /// + /// \return + /// The

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -1391,7 +1391,16 @@ SymbolFileDWARFDebugMap::GetDeclContextContainingUID(lldb::user_id_t type_uid) { SymbolFileDWARF *oso_dwarf = GetSymbolFileByOSOIndex(oso_idx); if (oso_dwarf) return oso_dwarf->GetDeclContextContainingUID(type_uid); - return

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -816,6 +818,8 @@ Expected opts::symbols::getAction() { "Specify search type (-find) to use search options."); return dumpModule; + + bulbazord wrote: Spurious whitespace https://github.com/llvm/llvm-project/pull/69981

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Alex Langford via lldb-commits
@@ -519,7 +530,17 @@ CompilerDeclContext Function::GetDeclContext() { if (SymbolFile *sym_file = module_sp->GetSymbolFile()) return sym_file->GetDeclContextForUID(GetID()); } - return CompilerDeclContext(); + return {}; +} + +std::vector

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: overall LGTM, few questions though https://github.com/llvm/llvm-project/pull/69981 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Alex Langford via lldb-commits
https://github.com/bulbazord edited https://github.com/llvm/llvm-project/pull/69981 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Jonas Devlieghere via lldb-commits
@@ -533,6 +533,12 @@ class Function : public UserID, public SymbolContextScope { /// The DeclContext, or NULL if none exists. CompilerDeclContext GetDeclContext(); + /// Get the CompilerContext for this function, if available. + /// + /// \return + /// The

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Walter Erquinigo via lldb-commits
https://github.com/walter-erquinigo approved this pull request. https://github.com/llvm/llvm-project/pull/69981 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Adrian Prantl (adrian-prantl) Changes I need this API in the Swift plugin, but it seems generally useful enough to expose it in the main branch. --- Full diff: https://github.com/llvm/llvm-project/pull/69981.diff 15 Files Affected: -

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl created https://github.com/llvm/llvm-project/pull/69981 I need this API in the Swift plugin, but it seems generally useful enough to expose it in the main branch. >From 6b41e8ccaf7c3daf787cb7f7399ba815c5fe5b77 Mon Sep 17 00:00:00 2001 From: Adrian Prantl

[Lldb-commits] [lldb] [lldb] Add `SBModule.SetLocateDwoCallback` (PR #69517)

2023-10-23 Thread Alex Langford via lldb-commits
bulbazord wrote: In that case, maybe it doesn't make sense for every Debugger to have its own callback and SymbolFile should own it? Can't say I'm a fan of having this effectively be a global variable since I've seen it be an issue in other situations (e.g. Logging).

[Lldb-commits] [lldb] [lldb] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-23 Thread Jason Molenda via lldb-commits
@@ -0,0 +1,140 @@ +//===-- WatchpointResource.h *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[Lldb-commits] [lldb] [lldb] Refactor InstrumentationRuntimeAsan and add a new plugin (PR #69388)

2023-10-23 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Thanks for breaking it up, that made it easier for me to review. I don't see any issues with it right now, so LGTM. https://github.com/llvm/llvm-project/pull/69388 ___ lldb-commits mailing list

[Lldb-commits] [lldb] [lldb] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-23 Thread Jason Molenda via lldb-commits
@@ -0,0 +1,140 @@ +//===-- WatchpointResource.h *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[Lldb-commits] [lldb] 83a6b02 - [lldb] Move comments and add missing periods (NFC)

2023-10-23 Thread Jonas Devlieghere via lldb-commits
Author: Jonas Devlieghere Date: 2023-10-23T15:29:01-07:00 New Revision: 83a6b02c3d79f0ac714690e1baec14efb1c24fe9 URL: https://github.com/llvm/llvm-project/commit/83a6b02c3d79f0ac714690e1baec14efb1c24fe9 DIFF:

[Lldb-commits] [PATCH] D159314: [lldb] Introduce OperatingSystem{, Python}Interface and make us it

2023-10-23 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 557856. mib marked 2 inline comments as done. mib added a comment. Address @bulbazord comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159314/new/ https://reviews.llvm.org/D159314 Files:

[Lldb-commits] [lldb] [lldb] Add value to enumerator dump (PR #69815)

2023-10-23 Thread Greg Clayton via lldb-commits
clayborg wrote: I agree with what Jim said as well. I would rather see the IDEs add the ability to change the format for the values like Xcode can so that people can see their values as needed. The summary here isn't a perfect option for this because if you switch the format to

[Lldb-commits] [lldb] [lldb] Add value to enumerator dump (PR #69815)

2023-10-23 Thread via lldb-commits
jimingham wrote: This is a mostly orthogonal comment, but at some point, we really should switch all the summaries that pretend to be the value of a variable to value providing Synthetic Children. Summaries are currently playing two fairly different roles, one some free-form text that

[Lldb-commits] [lldb] [lldb] Add value to enumerator dump (PR #69815)

2023-10-23 Thread Greg Clayton via lldb-commits
clayborg wrote: Another thing other IDEs do is show something like "{...}" as the value for a struct/union/class. This is what Visual Studio used to do. https://github.com/llvm/llvm-project/pull/69815 ___ lldb-commits mailing list

[Lldb-commits] [lldb] [lldb] Add value to enumerator dump (PR #69815)

2023-10-23 Thread Greg Clayton via lldb-commits
clayborg wrote: If we have a "Foo *", the value will show up as the pointer value _and_ the summary for the Pointee (if `Foo` has a summary provider, it will show a summary for it along with the pointer. If we have a "Foo", then there will be no value for the struct/class instance and it will

[Lldb-commits] [lldb] [lldb] Add value to enumerator dump (PR #69815)

2023-10-23 Thread Greg Clayton via lldb-commits
clayborg wrote: What IDE are you using for the screenshot above? The issue you might run into is that IDE might only be showing the value string and not the summary string. XCode and Visual Studio code will show the value if there is one _and_ the summary if there is one. If there is no value

[Lldb-commits] [lldb] [lldb] Add value to enumerator dump (PR #69815)

2023-10-23 Thread Greg Clayton via lldb-commits
clayborg wrote: > Making sure I'm following along properly. For context, this is the debug > experience I'm most used to: > ![Capture](https://user-images.githubusercontent.com/4587626/277433029-e45937dc-9b78-4a3d-9321-1fa99a35daa8.PNG) > > It sounds like you're saying we shouldn't change the

[Lldb-commits] [lldb] [lldb] Refactor InstrumentationRuntimeAsan and add a new plugin (PR #69388)

2023-10-23 Thread Jonas Devlieghere via lldb-commits
@@ -0,0 +1,120 @@ +//===-- InstrumentationRuntimeASan.cpp ===// JDevlieghere wrote: I know it's a bit unwieldy, but should this file be called `InstrumentationRuntimeASanLibsanitizers`?

[Lldb-commits] [lldb] [lldb] Refactor InstrumentationRuntimeAsan and add a new plugin (PR #69388)

2023-10-23 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere approved this pull request. LGTM with the filename updated. https://github.com/llvm/llvm-project/pull/69388 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [lldb] Refactor InstrumentationRuntimeAsan and add a new plugin (PR #69388)

2023-10-23 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere edited https://github.com/llvm/llvm-project/pull/69388 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [clang-format] Don't break between string literal operands of << (PR #69871)

2023-10-23 Thread Owen Pan via lldb-commits
owenca wrote: > I think adding the possibility of breaking '<<' is a good idea if it's > optional, what do u think? +1, but see also https://github.com/llvm/llvm-project/pull/69859#issuecomment-1776064714. https://github.com/llvm/llvm-project/pull/69871

[Lldb-commits] [lldb] [lldb][lldb-server] Enable sending RegisterFlags as XML (PR #69951)

2023-10-23 Thread Jonas Devlieghere via lldb-commits
JDevlieghere wrote: > And if you're not familiar with lldb-server and XML, as I wasn't, it doesn't > use libXML to generate it. That's why I'm building strings to fit with the > existing target.xml code. It's somewhat implied, but is the goal to (continue to) avoid that dependency? Other

[Lldb-commits] [lldb] [LLDB] Update docs on building documentation (PR #69858)

2023-10-23 Thread Aiden Grossman via lldb-commits
https://github.com/boomanaiden154 closed https://github.com/llvm/llvm-project/pull/69858 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 2f15082 - [LLDB] Update docs on building documentation (#69858)

2023-10-23 Thread via lldb-commits
Author: Aiden Grossman Date: 2023-10-23T12:59:39-07:00 New Revision: 2f15082b15f12461246e9e1fe1ea0cb106c27a34 URL: https://github.com/llvm/llvm-project/commit/2f15082b15f12461246e9e1fe1ea0cb106c27a34 DIFF:

[Lldb-commits] [lldb] [LLDB] Update docs on building documentation (PR #69858)

2023-10-23 Thread Aiden Grossman via lldb-commits
https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/69858 >From 4d94c5fae6f72e3ad551cf3381b0a0e9efecbf9a Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Sat, 21 Oct 2023 15:46:39 -0700 Subject: [PATCH 1/2] [LLDB] Update docs on building documentation This

[Lldb-commits] [lldb] Update stdckdint.h and make it available in pre-C23 modes. (PR #69649)

2023-10-23 Thread via lldb-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/69649 >From 0c57e45f6ee16e43cc6388b1ca6beb88bbc7b925 Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 19 Oct 2023 22:23:03 + Subject: [PATCH 1/4] Update stdckdint.h and make it available in pre-C23 modes.

[Lldb-commits] [lldb] [lldb] Add value to enumerator dump (PR #69815)

2023-10-23 Thread Aaron Ballman via lldb-commits
AaronBallman wrote: Making sure I'm following along properly. For context, this is the debug experience I'm most used to: ![Capture](https://github.com/llvm/llvm-project/assets/4587626/e45937dc-9b78-4a3d-9321-1fa99a35daa8) It sounds like you're saying we shouldn't change the enum formatter to

[Lldb-commits] [lldb] [lldb][lldb-server] Enable sending RegisterFlags as XML (PR #69951)

2023-10-23 Thread Greg Clayton via lldb-commits
@@ -10,6 +10,7 @@ #define LLDB_TARGET_REGISTERFLAGS_H #include "lldb/Utility/Log.h" +#include "lldb/Utility/StreamString.h" clayborg wrote: We can just forward declare StreamString, and possibly remove Log.h above as well if we want to.

[Lldb-commits] [lldb] [lldb][lldb-server] Enable sending RegisterFlags as XML (PR #69951)

2023-10-23 Thread Greg Clayton via lldb-commits
@@ -175,3 +175,35 @@ std::string RegisterFlags::AsTable(uint32_t max_width) const { return table; } + +void RegisterFlags::ToXML(StreamString ) const { + // Example XML: + // + // + // + strm.Indent(); + strm << ""; + for (const Field : m_fields) { +//

  1   2   >