[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

[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 , llvm::function_ref callback) { uint64_t cu_offset = cu.GetOffset(); bool found_entry_for_cu = false; - for (const DebugNames::NameIndex : *m_debug_names_up) { -for

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

[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 _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 may

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

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

[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 _sp) { std::lock_guard guard(m_owners_mutex); - m_owners.Add(wp_sp); + m_owners.push_back(wp_sp); } void

[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 _sp) { std::lock_guard guard(m_owners_mutex); - m_owners.Add(wp_sp); + m_owners.push_back(wp_sp); } void

[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 _sp) { std::lock_guard guard(m_owners_mutex); - m_owners.Add(wp_sp); + m_owners.push_back(wp_sp); } void

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

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

[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] [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 ); ~ScriptedPythonInterface() override = default; + template + llvm::Expected + CreatePluginObject(llvm::StringRef class_name, +

[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 ); ~ScriptedPythonInterface() override = default; + template + llvm::Expected + CreatePluginObject(llvm::StringRef class_name, +

[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 ); ~ScriptedPythonInterface() override = default; + template + llvm::Expected + CreatePluginObject(llvm::StringRef class_name, +

[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] 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 , +void CommandObjectIterateOverThreads::DoExecute(Args ,

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

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

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

[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] 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] [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] 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][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] 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! 

[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

[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
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] [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 = args[last_idx]; const size_t pack_idx = idx - last_idx; - assert(pack_idx < pack.pack_size() &&

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

[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): +

[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

[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): +

[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

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

[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

[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 _spec, SBFileSpec _file_spec, SBFileSpec _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

[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 , 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 we

[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, +

[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

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

2023-10-19 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: Because SymbolFile is holding onto the function pointer as a static member, this is a global setting that you can't apply to only just one `SBDebugger` object. It's an all-or-nothing thing. Maybe that's what you want, but LLDB already has architectural

[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 , 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 we

[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

[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 , 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 we

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

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

[Lldb-commits] [lldb] [lldb][progress] Add discrete boolean flag to progress reports (PR #69516)

2023-10-19 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: I was thinking more about this last night, I'm not sure the word "discrete" is the right word for what this describes. It's not a bad word per se, but if a ProgressEvent isn't discrete, it's not really "continuous" either (or any of the other antonyms

[Lldb-commits] [lldb] [lldb][NFCI] Remove duplicated code in DWARFParser (PR #69531)

2023-10-18 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. I looked at the implementations and I didn't notice anything too different either. This brings us from 3 implementations of this logic to 2. Hopefully we can make it 1 someday soon.  https://github.com/llvm/llvm-project/pull/69531

[Lldb-commits] [lldb] [lldb][progress] Add discrete boolean flag to progress reports (PR #69516)

2023-10-18 Thread Alex Langford via lldb-commits
@@ -16,9 +16,10 @@ using namespace lldb_private; std::atomic Progress::g_id(0); -Progress::Progress(std::string title, uint64_t total, +Progress::Progress(std::string title, bool is_discrete, uint64_t total, lldb_private::Debugger *debugger) -:

[Lldb-commits] [lldb] [lldb][progress] Add discrete boolean flag to progress reports (PR #69516)

2023-10-18 Thread Alex Langford via lldb-commits
@@ -37,5 +37,8 @@ def test_dwarf_symbol_loading_progress_report_structured_data(self): event = lldbutil.fetch_next_event(self, self.listener, self.broadcaster) progress_data = lldb.SBDebugger.GetProgressDataFromEvent(event) -message =

[Lldb-commits] [lldb] [lldb][progress] Add discrete boolean flag to progress reports (PR #69516)

2023-10-18 Thread Alex Langford via lldb-commits
@@ -16,7 +16,7 @@ using namespace lldb_private; std::atomic Progress::g_id(0); -Progress::Progress(std::string title, uint64_t total, +Progress::Progress(std::string title, bool is_discrete, uint64_t total, bulbazord wrote: You added this parameter but it

[Lldb-commits] [lldb] [lldb][progress] Add discrete boolean flag to progress reports (PR #69516)

2023-10-18 Thread Alex Langford via lldb-commits
https://github.com/bulbazord requested changes to this pull request. Looks fine but it doesn't look like `is_discrete` is being propagated correctly everywhere? https://github.com/llvm/llvm-project/pull/69516 ___ lldb-commits mailing list

[Lldb-commits] [lldb] [lldb][progress] Add discrete boolean flag to progress reports (PR #69516)

2023-10-18 Thread Alex Langford via lldb-commits
https://github.com/bulbazord edited https://github.com/llvm/llvm-project/pull/69516 ___ 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-18 Thread Alex Langford via lldb-commits
@@ -0,0 +1,241 @@ +//===-- ReportRetriever.cpp *- 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: Apache-2.0

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

2023-10-18 Thread Alex Langford via lldb-commits
@@ -0,0 +1,108 @@ +//===-- InstrumentationRuntimeLibsanitizers.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

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

2023-10-18 Thread Alex Langford via lldb-commits
@@ -0,0 +1,241 @@ +//===-- ReportRetriever.cpp *- 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: Apache-2.0

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

2023-10-18 Thread Alex Langford via lldb-commits
@@ -0,0 +1,241 @@ +//===-- ReportRetriever.cpp *- 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: Apache-2.0

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

2023-10-18 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: Overall looks alright to me. Aside from the inline feedback, I have 2 general pieces of feedback. 1. It might be easier if you broke this up into 2 separate commits. You're doing 2 things in 1 commit: Refactoring InstrumentationRuntimeAsan and adding a

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

2023-10-18 Thread Alex Langford via lldb-commits
@@ -0,0 +1,241 @@ +//===-- ReportRetriever.cpp *- 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: Apache-2.0

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

2023-10-18 Thread Alex Langford via lldb-commits
@@ -1,5 +1,7 @@ +add_subdirectory(Libsanitizers) bulbazord wrote: +1 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-18 Thread Alex Langford via lldb-commits
@@ -0,0 +1,241 @@ +//===-- ReportRetriever.cpp *- 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: Apache-2.0

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

2023-10-18 Thread Alex Langford via lldb-commits
@@ -0,0 +1,241 @@ +//===-- ReportRetriever.cpp *- 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: Apache-2.0

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

2023-10-18 Thread Alex Langford via lldb-commits
@@ -0,0 +1,108 @@ +//===-- InstrumentationRuntimeLibsanitizers.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

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

2023-10-18 Thread Alex Langford via lldb-commits
@@ -0,0 +1,108 @@ +//===-- InstrumentationRuntimeLibsanitizers.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

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

2023-10-18 Thread Alex Langford via lldb-commits
@@ -0,0 +1,241 @@ +//===-- ReportRetriever.cpp *- 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: Apache-2.0

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

2023-10-18 Thread Alex Langford via lldb-commits
@@ -0,0 +1,241 @@ +//===-- ReportRetriever.cpp *- 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: Apache-2.0

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

2023-10-18 Thread Alex Langford via lldb-commits
@@ -280,29 +81,13 @@ void InstrumentationRuntimeASan::Activate() { if (!process_sp) return; - ConstString symbol_name("_ZN6__asanL7AsanDieEv"); - const Symbol *symbol = GetRuntimeModuleSP()->FindFirstSymbolWithNameAndType( - symbol_name, eSymbolTypeCode); +

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

2023-10-18 Thread Alex Langford via lldb-commits
https://github.com/bulbazord 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] [lldb] Scalar::GetValue() should take a Stream by reference (PR #69231)

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

[Lldb-commits] [lldb] [lldb] Scalar::GetValue() should take a Stream by reference (PR #69231)

2023-10-17 Thread Alex Langford via lldb-commits
bulbazord wrote: > There are probably a lot of functions that could be converted from a "Stream > *" to "Stream &". Yes, when I have a spare 5-10 minutes I pick a function and convert it. I don't want to end up with a huge diff that is difficult to merge downstream so I do it piecemeal.

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

2023-10-17 Thread Alex Langford via lldb-commits
@@ -17,11 +17,17 @@ class RegisterFlags { public: class Field { public: +/// Where start is the least significant bit and end is the most +/// significant bit. The start bit must be <= the end bit. Field(std::string name, unsigned start, unsigned end)

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

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

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

2023-10-17 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: Makes sense to me since this seems to be a relatively common pattern (from the tests). Is there anywhere you can begin to use this other than in the tests? Or is this building up to [your proposal on adding register field info to

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