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

2023-10-19 Thread Alex Langford via lldb-commits
@@ -677,3 +677,30 @@ void SBModule::GarbageCollectAllocatedModules() { const bool mandatory = false; ModuleList::RemoveOrphanSharedModules(mandatory); } + +void SBModule::SetLocateDwoCallback(lldb::SBModuleLocateDwoCallback callback, +voi

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

2023-10-19 Thread Alex Langford via lldb-commits
@@ -696,3 +696,55 @@ template <> bool SetNumberFromPyObject(double &number, PyObject *obj) { $1 = $input == Py_None; $1 = $1 || PyCallable_Check(reinterpret_cast($input)); } + +// For lldb::SBModuleLocateDwoCallback +// The `baton` is the actual Python function passed, and

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

2023-10-19 Thread Alex Langford via lldb-commits
@@ -139,6 +139,13 @@ typedef void (*SBDebuggerDestroyCallback)(lldb::user_id_t debugger_id, typedef SBError (*SBPlatformLocateModuleCallback)( void *baton, const SBModuleSpec &module_spec, SBFileSpec &module_file_spec, SBFileSpec &symbol_file_spec); + +typedef SBError

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

2023-10-19 Thread Alex Langford via lldb-commits
@@ -1168,4 +1168,58 @@ static SBError LLDBSwigPythonCallLocateModuleCallback( return *sb_error_ptr; } + +// `comp_dir` is allowed to be NULL. All other arguments must be valid values. +static SBError LLDBSwigPythonCallLocateDwoCallback( +void *baton, const SBFileSpec &ob

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

2023-10-19 Thread Alex Langford via lldb-commits
@@ -1742,20 +1742,37 @@ SymbolFileDWARF::GetDwoSymbolFileForCompileUnit( if (std::shared_ptr dwp_sp = GetDwpSymbolFile()) return dwp_sp; - FileSpec dwo_file(dwo_name); - FileSystem::Instance().Resolve(dwo_file); - bool found = false; + const char *comp_dir = + c

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

2023-10-19 Thread Alex Langford via lldb-commits
@@ -1168,4 +1168,58 @@ static SBError LLDBSwigPythonCallLocateModuleCallback( return *sb_error_ptr; } + +// `comp_dir` is allowed to be NULL. All other arguments must be valid values. +static SBError LLDBSwigPythonCallLocateDwoCallback( +void *baton, const SBFileSpec &ob

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

2023-10-19 Thread Alex Langford via lldb-commits
@@ -1168,4 +1168,58 @@ static SBError LLDBSwigPythonCallLocateModuleCallback( return *sb_error_ptr; } + +// `comp_dir` is allowed to be NULL. All other arguments must be valid values. +static SBError LLDBSwigPythonCallLocateDwoCallback( +void *baton, const SBFileSpec &ob

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

2023-10-19 Thread Alex Langford via lldb-commits
@@ -1168,4 +1168,58 @@ static SBError LLDBSwigPythonCallLocateModuleCallback( return *sb_error_ptr; } + +// `comp_dir` is allowed to be NULL. All other arguments must be valid values. +static SBError LLDBSwigPythonCallLocateDwoCallback( +void *baton, const SBFileSpec &ob

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

2023-10-19 Thread Alex Langford via lldb-commits
@@ -0,0 +1,119 @@ +""" +Test module locate dwo callback functionality +""" + +import ctypes +import shutil +from lldbsuite.test.decorators import * +import lldb +from lldbsuite.test import lldbtest, lldbutil + + +class LocateDwoCallbackTestCase(lldbtest.TestBase): +NO_DEBUG_IN

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

2023-10-19 Thread Alex Langford via lldb-commits
@@ -1742,20 +1742,37 @@ SymbolFileDWARF::GetDwoSymbolFileForCompileUnit( if (std::shared_ptr dwp_sp = GetDwpSymbolFile()) return dwp_sp; - FileSpec dwo_file(dwo_name); - FileSystem::Instance().Resolve(dwo_file); - bool found = false; + const char *comp_dir = + c

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

2023-10-19 Thread Alex Langford via lldb-commits
@@ -0,0 +1,119 @@ +""" +Test module locate dwo callback functionality +""" + +import ctypes +import shutil +from lldbsuite.test.decorators import * +import lldb +from lldbsuite.test import lldbtest, lldbutil + + +class LocateDwoCallbackTestCase(lldbtest.TestBase): +NO_DEBUG_IN

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

2023-10-20 Thread Alex Langford via lldb-commits
@@ -7183,7 +7183,8 @@ GetNthTemplateArgument(const clang::ClassTemplateSpecializationDecl *decl, // (including the ones preceding the parameter pack). const auto &pack = args[last_idx]; const size_t pack_idx = idx - last_idx; - assert(pack_idx < pack.pack_size() && "par

[Lldb-commits] [lldb] [LLDB] Update breakpoint-command.test to use string instead of number. (PR #69796)

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

[Lldb-commits] [lldb] [LLDB] Update breakpoint-command.test to use string instead of number. (PR #69796)

2023-10-20 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. What an interesting failure condition πŸ™‚ Some arbitrary string with spaces seems a lot less likely to be a false positive compared to a number. https://github.com/llvm/llvm-project/pull/69796 ___

[Lldb-commits] [lldb] [LLDB] Update breakpoint-command.test to use string instead of number. (PR #69796)

2023-10-20 Thread Alex Langford via lldb-commits
@@ -1,7 +1,7 @@ # REQUIRES: lua || python # RUN: %build %p/Inputs/dummy-target.c -o %t.out -# RUN: %lldb %t.out -o 'b main' -o 'break command add 1 -o "script print(95000 + 126)"' -o 'r' | FileCheck %s +# RUN: %lldb %t.out -o 'b main' -o 'break command add 1 -o "script print(

[Lldb-commits] [lldb] [lldb] Add a single bit constructor for RegisterFlags::Field (PR #69315)

2023-10-23 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Sorry for the delay, this looks fine to me. I don't have much to say about your RFC (since it's not something I have a lot of expertise on) but I look forward to seeing it get implemented! πŸ˜„ https://github.com/llvm/llvm-project/pull/693

[Lldb-commits] [lldb] [lldb][docs] Update contributing links (PR #69726)

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

[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 l

[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). https://github.com/llvm/l

[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 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 Function::GetCompilerConte

[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 CompilerDeclContext(

[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 &sc, // 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 breadcrumb

[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 Comp

[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] [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: Ap

[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: Ap

[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: Ap

[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: Ap

[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
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! πŸ˜„ https://github.com/llvm/llvm-project/p

[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: Apa

[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: Ap

[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 = w

[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: Ap

[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
@@ -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 = w

[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 &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
@@ -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: Apa

[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 sym

[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 &rhs) 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

[Lldb-commits] [lldb] [lldb][AArch64] Correct type of 32 bit GPR RegisterValues when using core files (PR #70054)

2023-10-24 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Since this bug only really manifests with later changes, I think it's fine to fix it without a test for now. Please make sure there is a test that exercises this behavior in your follow-up. https://github.com/llvm/llvm-project/pull/700

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

2023-10-24 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. LGTM with everyone else's comments. Thanks for working on this! https://github.com/llvm/llvm-project/pull/69989 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cg

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

2023-10-24 Thread Alex Langford via lldb-commits
https://github.com/bulbazord edited https://github.com/llvm/llvm-project/pull/69991 ___ 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-24 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. I think I looked at every changed line, looks good to me overall. Found one place with a small style issue but it's not a blocker. Thanks! https://github.com/llvm/llvm-project/pull/69991 ___ lld

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

2023-10-24 Thread Alex Langford via lldb-commits
@@ -34,16 +34,17 @@ CommandObjectMultipleThreads::CommandObjectMultipleThreads( m_arguments.push_back({thread_arg}); } -bool CommandObjectIterateOverThreads::DoExecute(Args &command, +void CommandObjectIterateOverThreads::DoExecute(Args &command,

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

2023-10-24 Thread Alex Langford via lldb-commits
https://github.com/bulbazord 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/Interpreter] Make ScriptedInterface Object creation more generic (PR #68052)

2023-10-24 Thread Alex Langford via lldb-commits
@@ -32,6 +32,84 @@ class ScriptedPythonInterface : virtual public ScriptedInterface { ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter); ~ScriptedPythonInterface() override = default; + template + llvm::Expected + CreatePluginObject(llvm::StringRef cla

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

2023-10-24 Thread Alex Langford via lldb-commits
@@ -32,6 +32,84 @@ class ScriptedPythonInterface : virtual public ScriptedInterface { ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter); ~ScriptedPythonInterface() override = default; + template + llvm::Expected + CreatePluginObject(llvm::StringRef cla

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

2023-10-24 Thread Alex Langford via lldb-commits
@@ -32,6 +32,84 @@ class ScriptedPythonInterface : virtual public ScriptedInterface { ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter); ~ScriptedPythonInterface() override = default; + template + llvm::Expected + CreatePluginObject(llvm::StringRef cla

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

2023-10-24 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: Works for me generally. I'm curious to know if some of these can be pure virtual function as Jonas mentioned. https://github.com/llvm/llvm-project/pull/68052 ___ lldb-commits mailing list lldb-commits@lists.llvm

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

2023-10-24 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: Ap

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

2023-10-24 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: Ap

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

2023-10-25 Thread Alex Langford via lldb-commits
@@ -53,44 +49,52 @@ bool WatchpointResource::Contains(addr_t addr) { void WatchpointResource::AddOwner(const WatchpointSP &wp_sp) { std::lock_guard guard(m_owners_mutex); - m_owners.Add(wp_sp); + m_owners.push_back(wp_sp); } void WatchpointResource::RemoveOwner(Watchpo

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

2023-10-25 Thread Alex Langford via lldb-commits
@@ -53,44 +49,52 @@ bool WatchpointResource::Contains(addr_t addr) { void WatchpointResource::AddOwner(const WatchpointSP &wp_sp) { std::lock_guard guard(m_owners_mutex); - m_owners.Add(wp_sp); + m_owners.push_back(wp_sp); } void WatchpointResource::RemoveOwner(Watchpo

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

2023-10-25 Thread Alex Langford via lldb-commits
@@ -53,44 +49,52 @@ bool WatchpointResource::Contains(addr_t addr) { void WatchpointResource::AddOwner(const WatchpointSP &wp_sp) { std::lock_guard guard(m_owners_mutex); - m_owners.Add(wp_sp); + m_owners.push_back(wp_sp); } void WatchpointResource::RemoveOwner(Watchpo

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

2023-10-25 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: Ap

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

2023-10-25 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. LGTM. I didn't realize lldb-server didn't use libXML, learned something new today. :) https://github.com/llvm/llvm-project/pull/69951 ___ lldb-commits mailing list lldb-commits@lists.llvm.org ht

[Lldb-commits] [lldb] [lldb][AArch64] Add SME2's ZT0 register (PR #70205)

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

[Lldb-commits] [lldb] [lldb][AArch64] Add SME2's ZT0 register (PR #70205)

2023-10-25 Thread Alex Langford via lldb-commits
@@ -625,6 +662,18 @@ NativeRegisterContextLinux_arm64::CacheAllRegisters(uint32_t &cached_size) { error = ReadZA(); if (error.Fail()) return error; + +// We will only be restoring ZT data if ZA is active. As writing to an +// inactive ZT enables ZA, which

[Lldb-commits] [lldb] Improve debug names index fetching global variables performance (PR #70231)

2023-10-25 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: This patch looks fine to me in idea, but next time please leave your review up for longer so others have time to take a look as well. https://github.com/llvm/llvm-project/pull/70231 ___ lldb-commits mailing list

[Lldb-commits] [lldb] Improve debug names index fetching global variables performance (PR #70231)

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

[Lldb-commits] [lldb] Improve debug names index fetching global variables performance (PR #70231)

2023-10-25 Thread Alex Langford via lldb-commits
@@ -129,8 +129,19 @@ void DebugNamesDWARFIndex::GetGlobalVariables( DWARFUnit &cu, llvm::function_ref callback) { uint64_t cu_offset = cu.GetOffset(); bool found_entry_for_cu = false; - for (const DebugNames::NameIndex &ni: *m_debug_names_up) { -for (DebugNames::Na

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

2023-10-25 Thread Alex Langford via lldb-commits
bulbazord wrote: > > > I think I looked at every changed line, looks good to me overall. Found > > > one place with a small style issue but it's not a blocker. Thanks! > > > > > > Thanks @bulbazord! Do you know why the `code_formatter` check/bot didn't > > flag that or the other one-line `if`

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

2023-10-25 Thread Alex Langford via lldb-commits
@@ -53,44 +49,52 @@ bool WatchpointResource::Contains(addr_t addr) { void WatchpointResource::AddOwner(const WatchpointSP &wp_sp) { std::lock_guard guard(m_owners_mutex); - m_owners.Add(wp_sp); + m_owners.push_back(wp_sp); } void WatchpointResource::RemoveOwner(Watchpo

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

2023-10-25 Thread Alex Langford via lldb-commits
@@ -67,18 +67,15 @@ size_t WatchpointResource::GetNumberOfOwners() { bool WatchpointResource::OwnersContains(WatchpointSP &wp_sp) { std::lock_guard guard(m_owners_mutex); const auto &it = std::find(m_owners.begin(), m_owners.end(), wp_sp); - if (it != m_owners.end()) -

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

2023-10-25 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] [lldb] [mostly NFC] Large WP foundation: WatchpointResources (PR #68845)

2023-10-25 Thread Alex Langford via lldb-commits
@@ -67,18 +67,15 @@ size_t WatchpointResource::GetNumberOfOwners() { bool WatchpointResource::OwnersContains(WatchpointSP &wp_sp) { std::lock_guard guard(m_owners_mutex); const auto &it = std::find(m_owners.begin(), m_owners.end(), wp_sp); - if (it != m_owners.end()) -

[Lldb-commits] [lldb] [lldb][AArch64][Linux] Rename IsEnabled to IsPresent (PR #70303)

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

[Lldb-commits] [lldb] [lldb][AArch64][Linux] Rename IsEnabled to IsPresent (PR #70303)

2023-10-26 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. LGTM πŸ˜ƒ https://github.com/llvm/llvm-project/pull/70303 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][AArch64][Linux] Rename IsEnabled to IsPresent (PR #70303)

2023-10-26 Thread Alex Langford via lldb-commits
@@ -610,7 +610,7 @@ NativeRegisterContextLinux_arm64::CacheAllRegisters(uint32_t &cached_size) { return error; // Here this means, does the system have ZA, not whether it is active. bulbazord wrote: You could probably remove this comment https://githu

[Lldb-commits] [lldb] [lldb] Replace the usage of module imp with module importlib (PR #70443)

2023-10-27 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: `importlib` has been around since Python 3.1, maybe we shouldn't have the conditional logic to use `imp` instead? I'm pretty sure the minimum supported version is 3.6 since that's what LLVM requires. https://github.com/llvm/llvm-project/pull/70443 __

[Lldb-commits] [lldb] [lldb] Make use of Scripted{Python, }Interface for ScriptedThreadPlan (PR #70392)

2023-10-27 Thread Alex Langford via lldb-commits
@@ -0,0 +1,92 @@ +//===-- ScriptedThreadPlanPythonInterface.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: Apa

[Lldb-commits] [lldb] [lldb] Make use of Scripted{Python, }Interface for ScriptedThreadPlan (PR #70392)

2023-10-27 Thread Alex Langford via lldb-commits
@@ -0,0 +1,40 @@ +//===-- ScriptedThreadInterface.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: Apa

[Lldb-commits] [lldb] [lldb] Make use of Scripted{Python, }Interface for ScriptedThreadPlan (PR #70392)

2023-10-27 Thread Alex Langford via lldb-commits
@@ -0,0 +1,40 @@ +//===-- ScriptedThreadInterface.h ---*- C++ -*-===// bulbazord wrote: The header is missing the world `Plan` https://github.com/llvm/llvm-project/pull/70392 ___ lldb-commi

[Lldb-commits] [lldb] [lldb] Make use of Scripted{Python, }Interface for ScriptedThreadPlan (PR #70392)

2023-10-27 Thread Alex Langford via lldb-commits
@@ -104,6 +104,19 @@ ScriptInterpreter::GetStatusFromSBError(const lldb::SBError &error) const { return Status(); } +Event * +ScriptInterpreter::GetOpaqueTypeFromSBEvent(const lldb::SBEvent &event) const { + return event.m_opaque_ptr; +} + +Stream *ScriptInterpreter::GetOp

[Lldb-commits] [lldb] [lldb] Make use of Scripted{Python, }Interface for ScriptedThreadPlan (PR #70392)

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

[Lldb-commits] [lldb] [lldb] Add logging to ObjectFileMachO::ParseSymtab (PR #70490)

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

[Lldb-commits] [lldb] [lldb] Add logging to ObjectFileMachO::ParseSymtab (PR #70490)

2023-10-27 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. looks fine to me, one small question though https://github.com/llvm/llvm-project/pull/70490 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[Lldb-commits] [lldb] [lldb] Add logging to ObjectFileMachO::ParseSymtab (PR #70490)

2023-10-27 Thread Alex Langford via lldb-commits
@@ -2652,7 +2654,9 @@ void ObjectFileMachO::ParseSymtab(Symtab &symtab) { std::vector external_sym_trie_entries; std::set resolver_addresses; - if (dyld_trie_data.GetByteSize() > 0) { + const size_t dyld_trie_data_size = dyld_trie_data.GetByteSize(); + if (dyld_trie_dat

[Lldb-commits] [lldb] [lldb] Make use of Scripted{Python, }Interface for ScriptedThreadPlan (PR #70392)

2023-10-27 Thread Alex Langford via lldb-commits
@@ -104,6 +104,19 @@ ScriptInterpreter::GetStatusFromSBError(const lldb::SBError &error) const { return Status(); } +Event * +ScriptInterpreter::GetOpaqueTypeFromSBEvent(const lldb::SBEvent &event) const { + return event.m_opaque_ptr; +} + +Stream *ScriptInterpreter::GetOp

[Lldb-commits] [lldb] [lldb] Make use of Scripted{Python, }Interface for ScriptedThreadPlan (PR #70392)

2023-10-27 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. I think all of my comments have been addressed. Thanks! https://github.com/llvm/llvm-project/pull/70392 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[Lldb-commits] [lldb] [lldb] Remove some declarations without definitions (PR #70514)

2023-10-27 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. I can't find any uses of these either. I also checked in Apple's downstream swift fork, it doesn't look used there either. LGTM https://github.com/llvm/llvm-project/pull/70514 ___ lldb-commits

[Lldb-commits] [lldb] Fix the DEVELOPER_DIR computation (PR #70528)

2023-10-27 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Makes sense to me https://github.com/llvm/llvm-project/pull/70528 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix the DEVELOPER_DIR computation (PR #70528)

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

[Lldb-commits] [lldb] Fix the DEVELOPER_DIR computation (PR #70528)

2023-10-27 Thread Alex Langford via lldb-commits
@@ -461,13 +461,11 @@ static void ParseOSVersion(llvm::VersionTuple &version, NSString *Key) { // Invoke xcrun with the shlib dir. if (FileSpec fspec = HostInfo::GetShlibDir()) { if (FileSystem::Instance().Exists(fspec)) { -std::string contents_dir = -

[Lldb-commits] [lldb] Fix the DEVELOPER_DIR computation (PR #70528)

2023-10-27 Thread Alex Langford via lldb-commits
@@ -461,13 +461,11 @@ static void ParseOSVersion(llvm::VersionTuple &version, NSString *Key) { // Invoke xcrun with the shlib dir. if (FileSpec fspec = HostInfo::GetShlibDir()) { if (FileSystem::Instance().Exists(fspec)) { -std::string contents_dir = -

[Lldb-commits] [lldb] [lldb] Fix missing comsumeError() with LLDB_LOG in ObjectFileCOFF/PECOFF (PR #70793)

2023-10-31 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. https://github.com/llvm/llvm-project/pull/70793 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add the ability to get a C++ vtable ValueObject from another ValueObj… (PR #67599)

2023-10-31 Thread Alex Langford via lldb-commits
bulbazord wrote: The change was not reverted upstream. It was reverted in that @DanielCChen 's llvm-project fork. Unfortunately that's the nature of GitHub. https://github.com/llvm/llvm-project/pull/67599 ___ lldb-commits mailing list lldb-commits@l

[Lldb-commits] [lldb] [lldb] Replace the usage of module imp with module importlib (PR #70443)

2023-10-31 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Thanks for taking the time to make sure it works with Python 3.6! I'm a big fan of this kind of modernization/cleanup work. πŸ˜„ https://github.com/llvm/llvm-project/pull/70443 ___ lldb-commits ma

[Lldb-commits] [lldb] [lldb][AArch64] Add SME2's ZT0 register (PR #70205)

2023-10-31 Thread Alex Langford via lldb-commits
bulbazord wrote: Looks fine to me, though I'm not an expert in this area. If nobody else reviews or approves soon, I can do so. https://github.com/llvm/llvm-project/pull/70205 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llv

[Lldb-commits] [lldb] [lldb][AArch64] Read SME2's ZT0 register from Linux core files (PR #70934)

2023-11-01 Thread Alex Langford via lldb-commits
@@ -339,6 +337,18 @@ bool RegisterContextCorePOSIX_arm64::ReadRegister(const RegisterInfo *reg_info, value.SetFromMemoryData(*reg_info, src + sizeof(sve::user_za_header), reg_info->byte_size, lldb::eByteOrderLittle,

[Lldb-commits] [lldb] [lldb][split-dwarf] Add --errors-only argument separate-debug-info list (PR #71000)

2023-11-01 Thread Alex Langford via lldb-commits
@@ -445,7 +445,11 @@ class SymbolFile : public PluginInterface { /// contains the keys "type", "symfile", and "separate-debug-info-files". /// "type" can be used to assume the structure of each object in /// "separate-debug-info-files". - virtual bool GetSepa

[Lldb-commits] [lldb] [lldb][AArch64] Move register info reconfigure into architecture plugin (PR #70950)

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

[Lldb-commits] [lldb] [lldb][AArch64] Move register info reconfigure into architecture plugin (PR #70950)

2023-11-01 Thread Alex Langford via lldb-commits
@@ -373,14 +374,8 @@ bool GDBRemoteRegisterContext::WriteRegisterBytes(const RegisterInfo *reg_info, if (dst == nullptr) return false; - // Code below is specific to AArch64 target in SVE or SME state - // If vector granule (vg) register is being written then thread's

[Lldb-commits] [llvm] [lldb] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-01 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: Out of curiosity, why did you choose the delimiter as ' ' instead of something like ';'? https://github.com/llvm/llvm-project/pull/70996 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.ll

[Lldb-commits] [lldb] [llvm] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

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

<    6   7   8   9   10   11   12   13   14   15   >