[Lldb-commits] [lldb] a203546 - Revert "[lldb] Call FixUpPointer in WritePointerToMemory"

2025-08-12 Thread Felipe de Azevedo Piovezan via lldb-commits
Author: Felipe de Azevedo Piovezan Date: 2025-08-12T18:51:00-07:00 New Revision: a2035464960a71c1297aa6f81f9bdc7606c8f515 URL: https://github.com/llvm/llvm-project/commit/a2035464960a71c1297aa6f81f9bdc7606c8f515 DIFF: https://github.com/llvm/llvm-project/commit/a2035464960a71c1297aa6f81f9bdc760

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-11 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: I believe @adrian-prantl merged this by mistake. Feel free to continue the discussion here and I'll address the points in a follow up, or just revert and repost. https://github.com/llvm/llvm-project/pull/152020 ___ lldb-commits m

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (PR #152798)

2025-08-11 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan closed https://github.com/llvm/llvm-project/pull/152798 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (PR #152798)

2025-08-11 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -640,6 +640,9 @@ void IRMemoryMap::WritePointerToMemory(lldb::addr_t process_address, lldb::addr_t address, Status &error) { error.Clear(); + if (auto process_sp = GetProcessWP().lock()) +address = process_sp->FixAnyAddress(add

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-11 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: > Maybe a Doxygen comment explaining why you get the API lock back but not the > stop lock would address your concerns? This is exactly how this started, actually. I felt like I should document why we get one lock back but not the other, and explain why such a method is

[Lldb-commits] [lldb] [lldb] Make StackID call Fix{Code, Data} pointers (PR #152796)

2025-08-11 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan closed https://github.com/llvm/llvm-project/pull/152796 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-11 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: I was thinking a bit more about the `Destroy` method, which I was not too too happy with, and thought about just changing it to be a "Resume" method. Something like the below, what do you think? ``` diff --git a/lldb/include/lldb/Target/ExecutionContext.h b/lldb/include/l

[Lldb-commits] [lldb] [lldb] Make StackID call Fix{Code, Data} pointers (PR #152796)

2025-08-11 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -71,7 +72,7 @@ StackFrame::StackFrame(const ThreadSP &thread_sp, user_id_t frame_idx, // recursive functions properly aren't confused with one another on a history // stack. if (IsHistorical() && !m_cfa_is_valid) { -m_id.SetCFA(m_frame_index); +m_id.SetCFA(m_f

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (PR #152798)

2025-08-11 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -640,6 +640,9 @@ void IRMemoryMap::WritePointerToMemory(lldb::addr_t process_address, lldb::addr_t address, Status &error) { error.Clear(); + if (auto process_sp = GetProcessWP().lock()) +address = process_sp->FixAnyAddress(add

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (PR #152798)

2025-08-11 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -640,6 +640,9 @@ void IRMemoryMap::WritePointerToMemory(lldb::addr_t process_address, lldb::addr_t address, Status &error) { error.Clear(); + if (auto process_sp = GetProcessWP().lock()) +address = process_sp->FixAnyAddress(add

[Lldb-commits] [lldb] [lldb] Remove unnecessary calls to Fix{Code, Data}Address (PR #150537)

2025-08-08 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: > Your idea sounds fine, no idea if any of these are load bearing but test > suites are the only way to find out. If Mac is fine go ahead and land this, > the AArch64 Linux bot has top byte ignore and pointer authentication > available. Somehow I missed this comment, oth

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (PR #152798)

2025-08-08 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan created https://github.com/llvm/llvm-project/pull/152798 In architectures where pointers may contain metadata, such as arm64e, the metadata may need to be cleaned prior to sending this pointer to be used in expression evaluation generated code. This patch is

[Lldb-commits] [lldb] [lldb] Make StackID call Fix{Code, Data} pointers (PR #152796)

2025-08-08 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan created https://github.com/llvm/llvm-project/pull/152796 In architectures where pointers may contain metadata, such as arm64e, it is important to ignore those bits when comparing two different StackIDs, as the metadata may not be the same even if the pointers

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-08 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -125,19 +127,48 @@ ExecutionContext::ExecutionContext(const ExecutionContextRef *exe_ctx_ref_ptr, } } -ExecutionContext::ExecutionContext(const ExecutionContextRef *exe_ctx_ref_ptr, - std::unique_lock &lock) -: m_target_sp(), m_proc

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-08 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -125,19 +127,48 @@ ExecutionContext::ExecutionContext(const ExecutionContextRef *exe_ctx_ref_ptr, } } -ExecutionContext::ExecutionContext(const ExecutionContextRef *exe_ctx_ref_ptr, - std::unique_lock &lock) -: m_target_sp(), m_proc

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-08 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: Ok, renamed the class and moved logging to the call sites (did this in two commits, because I had forgotten about one of the files...) https://github.com/llvm/llvm-project/pull/152020 ___ lldb-commits mailing list lldb-commits@li

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-08 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -566,6 +559,53 @@ class ExecutionContext { lldb::StackFrameSP m_frame_sp; ///< The stack frame in thread. }; +/// A wrapper class representing an execution context with non-null Target +/// and Process pointers, a locked API mutex and a locked ProcessRunLock. +/// The loc

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-08 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -566,6 +559,53 @@ class ExecutionContext { lldb::StackFrameSP m_frame_sp; ///< The stack frame in thread. }; +/// A wrapper class representing an execution context with non-null Target +/// and Process pointers, a locked API mutex and a locked ProcessRunLock. +/// The loc

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-08 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: @jimingham @JDevlieghere With the latest commit, I created the new factory method and employed it throughout. It might be better to just check the last commit's diff. The main change is in the `ExecutionContext` files, but all SBMethods have diffs. Since I had to updat

[Lldb-commits] [lldb] [NFC][lldb] Speed up lookup of shared modules (PR #152054)

2025-08-07 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -755,11 +755,237 @@ size_t ModuleList::GetIndexForModule(const Module *module) const { } namespace { +/// A wrapper around ModuleList for shared modules. Provides fast lookups for +/// file-based ModuleSpec queries. +class SharedModuleList { +public: + /// Finds all the m

[Lldb-commits] [lldb] [NFC][lldb] Speed up lookup of shared modules (PR #152054)

2025-08-07 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan deleted https://github.com/llvm/llvm-project/pull/152054 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [NFC][lldb] Speed up lookup of shared modules (PR #152054)

2025-08-07 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -755,11 +755,237 @@ size_t ModuleList::GetIndexForModule(const Module *module) const { } namespace { +/// A wrapper around ModuleList for shared modules. Provides fast lookups for +/// file-based ModuleSpec queries. +class SharedModuleList { +public: + /// Finds all the m

[Lldb-commits] [lldb] [NFC][lldb] Speed up lookup of shared modules (PR #152054)

2025-08-06 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -755,11 +755,237 @@ size_t ModuleList::GetIndexForModule(const Module *module) const { } namespace { +/// A wrapper around ModuleList for shared modules. Provides fast lookups for +/// file-based ModuleSpec queries. +class SharedModuleList { +public: + /// Finds all the m

[Lldb-commits] [lldb] [NFC][lldb] Speed up lookup of shared modules (PR #152054)

2025-08-06 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -755,11 +755,237 @@ size_t ModuleList::GetIndexForModule(const Module *module) const { } namespace { +/// A wrapper around ModuleList for shared modules. Provides fast lookups for +/// file-based ModuleSpec queries. +class SharedModuleList { +public: + /// Finds all the m

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-06 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan edited https://github.com/llvm/llvm-project/pull/152020 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-06 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -125,19 +126,43 @@ ExecutionContext::ExecutionContext(const ExecutionContextRef *exe_ctx_ref_ptr, } } -ExecutionContext::ExecutionContext(const ExecutionContextRef *exe_ctx_ref_ptr, - std::unique_lock &lock) +ExecutionContext::Execution

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-06 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan edited https://github.com/llvm/llvm-project/pull/152020 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-06 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -125,19 +126,43 @@ ExecutionContext::ExecutionContext(const ExecutionContextRef *exe_ctx_ref_ptr, } } -ExecutionContext::ExecutionContext(const ExecutionContextRef *exe_ctx_ref_ptr, - std::unique_lock &lock) +ExecutionContext::Execution

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-06 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -125,19 +126,43 @@ ExecutionContext::ExecutionContext(const ExecutionContextRef *exe_ctx_ref_ptr, } } -ExecutionContext::ExecutionContext(const ExecutionContextRef *exe_ctx_ref_ptr, - std::unique_lock &lock) +ExecutionContext::Execution

[Lldb-commits] [lldb] [NFC][lldb] Speed up lookup of shared modules (PR #152054)

2025-08-06 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -755,11 +755,237 @@ size_t ModuleList::GetIndexForModule(const Module *module) const { } namespace { +/// A wrapper around ModuleList for shared modules. Provides fast lookups for +/// file-based ModuleSpec queries. +class SharedModuleList { +public: + /// Finds all the m

[Lldb-commits] [lldb] [NFC][lldb] Speed up lookup of shared modules (PR #152054)

2025-08-06 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -755,11 +755,237 @@ size_t ModuleList::GetIndexForModule(const Module *module) const { } namespace { +/// A wrapper around ModuleList for shared modules. Provides fast lookups for +/// file-based ModuleSpec queries. +class SharedModuleList { +public: + /// Finds all the m

[Lldb-commits] [lldb] [NFC][lldb] Speed up lookup of shared modules (PR #152054)

2025-08-06 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -755,11 +755,237 @@ size_t ModuleList::GetIndexForModule(const Module *module) const { } namespace { +/// A wrapper around ModuleList for shared modules. Provides fast lookups for +/// file-based ModuleSpec queries. +class SharedModuleList { +public: + /// Finds all the m

[Lldb-commits] [lldb] [NFC][lldb] Speed up lookup of shared modules (PR #152054)

2025-08-06 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -755,11 +755,237 @@ size_t ModuleList::GetIndexForModule(const Module *module) const { } namespace { +/// A wrapper around ModuleList for shared modules. Provides fast lookups for +/// file-based ModuleSpec queries. +class SharedModuleList { +public: + /// Finds all the m

[Lldb-commits] [lldb] [NFC][lldb] Speed up lookup of shared modules (PR #152054)

2025-08-06 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -755,11 +755,237 @@ size_t ModuleList::GetIndexForModule(const Module *module) const { } namespace { +/// A wrapper around ModuleList for shared modules. Provides fast lookups for +/// file-based ModuleSpec queries. +class SharedModuleList { +public: + /// Finds all the m

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-05 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan updated https://github.com/llvm/llvm-project/pull/152020 >From 9be92f8ead1294cc1931fe68c13dbaa8c5945423 Mon Sep 17 00:00:00 2001 From: Felipe de Azevedo Piovezan Date: Mon, 4 Aug 2025 08:32:20 -0700 Subject: [PATCH 1/3] [lldb] Guard SBFrame/SBThread methods aga

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-05 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -981,7 +1018,10 @@ SBError SBThread::UnwindInnermostExpression() { SBError sb_error; std::unique_lock lock; - ExecutionContext exe_ctx(m_opaque_sp.get(), lock); + Process::StopLocker stop_locker; + ExecutionContext exe_ctx(m_opaque_sp.get(), lock, stop_locker); + if

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-05 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -125,17 +125,21 @@ ExecutionContext::ExecutionContext(const ExecutionContextRef *exe_ctx_ref_ptr, } } -ExecutionContext::ExecutionContext(const ExecutionContextRef *exe_ctx_ref_ptr, - std::unique_lock &lock) +ExecutionContext::Execution

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-05 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -782,27 +809,26 @@ SBValueList SBFrame::GetVariables(const lldb::SBVariablesOptions &options) { SBValueList value_list; std::unique_lock lock; - ExecutionContext exe_ctx(m_opaque_sp.get(), lock); + Process::StopLocker stop_locker; felipepiovezan wrot

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-05 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -139,19 +140,19 @@ SBModule SBFrame::GetModule() const { SBModule sb_module; ModuleSP module_sp; std::unique_lock lock; - ExecutionContext exe_ctx(m_opaque_sp.get(), lock); + Process::StopLocker stop_locker; + ExecutionContext exe_ctx(m_opaque_sp.get(), lock, stop_l

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-05 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -125,17 +125,21 @@ ExecutionContext::ExecutionContext(const ExecutionContextRef *exe_ctx_ref_ptr, } } -ExecutionContext::ExecutionContext(const ExecutionContextRef *exe_ctx_ref_ptr, - std::unique_lock &lock) +ExecutionContext::Execution

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-05 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: I think I've addressed the vast majority of comments here. @jimingham I may have added "error messages" at a finer granularity than what you were expecting in the constructor. Were you thinking of limiting it to _only_ when we had a process and it was not stopped? If so,

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-05 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan updated https://github.com/llvm/llvm-project/pull/152020 >From 9be92f8ead1294cc1931fe68c13dbaa8c5945423 Mon Sep 17 00:00:00 2001 From: Felipe de Azevedo Piovezan Date: Mon, 4 Aug 2025 08:32:20 -0700 Subject: [PATCH 1/2] [lldb] Guard SBFrame/SBThread methods aga

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-04 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: This linux test failed, but I'm not yet sure if it is related, as it doesn't fail locally for me: ``` 2025-08-04T21:05:44.7103932Z File "/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/test/API/python_api/default-constructor/TestDefaultConstructorForAPIObje

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-04 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan updated https://github.com/llvm/llvm-project/pull/152020 >From 9be92f8ead1294cc1931fe68c13dbaa8c5945423 Mon Sep 17 00:00:00 2001 From: Felipe de Azevedo Piovezan Date: Mon, 4 Aug 2025 08:32:20 -0700 Subject: [PATCH] [lldb] Guard SBFrame/SBThread methods against

[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

2025-08-04 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan created https://github.com/llvm/llvm-project/pull/152020 Prior to this patch, SBFrame/SBThread methods exhibit racy behavior if called while the process is running, because they do not lock the `Process::RetRunLock` mutex. If they did, they would fail, correct

[Lldb-commits] [lldb] [lldb][NFC] Move SBThread::ResumeNewPlan out of the header (PR #151988)

2025-08-04 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan closed https://github.com/llvm/llvm-project/pull/151988 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][nfc] Use delegating ctor for ExecutionContext (PR #151987)

2025-08-04 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan closed https://github.com/llvm/llvm-project/pull/151987 ___ 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 SBThread::ResumeNewPlan out of the header (PR #151988)

2025-08-04 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan created https://github.com/llvm/llvm-project/pull/151988 This *private* method is only defined as a member class of SBThread so that it may be declared a `friend` of SBError and access a private constructor of SBError that takes a `Status`, which is an `lldb_p

[Lldb-commits] [lldb] [lldb][nfc] Use delegating ctor for ExecutionContext (PR #151987)

2025-08-04 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan created https://github.com/llvm/llvm-project/pull/151987 The ctor that takes a reference to ExecutionContextRef can be implemented in terms of the ctor that takes a pointer to that object, removing code duplication. >From c831152b699e1c4e4f6331a1feff356d7627c

[Lldb-commits] [lldb] [lldb] Fix incorrect conversion from boolean in RegisterContextThreadMemory (PR #151767)

2025-08-01 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan created https://github.com/llvm/llvm-project/pull/151767 The method ConvertRegisterKindToRegisterNumber should return INVALID_REGNUM, and not "false" upon failure: false would mean 0 which is usually the number for generic PC. Likewise, NumSupportedHardwareB

[Lldb-commits] [lldb] [lldb] Clear Frames when changing `disable-language-runtime-unwindplans` (PR #151208)

2025-07-31 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan closed https://github.com/llvm/llvm-project/pull/151208 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DWARFIndex][NFC] Change GetFunctions return type to IterationAction (PR #151489)

2025-07-31 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan approved this pull request. This LGTM! When I was working on the accelerator tables in the past, this API really bothered me, so I'll be happy to see it changed! https://github.com/llvm/llvm-project/pull/151489 ___ ll

[Lldb-commits] [lldb] [lldb] Clear Frames when changing `disable-language-runtime-unwindplans` (PR #151208)

2025-07-30 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: > 1. Do we need to unset the Currently Selected Frame, we've almost surely > invalidated it, and even if it does happen to accidentally still exist, it > might mean something different. This almost seems like something > ClearStackFrames should do. Based on the implemen

[Lldb-commits] [lldb] [lldb][nfc] Improve duplicated code in unexecuted breakpoint detection (PR #128724)

2025-06-23 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan closed https://github.com/llvm/llvm-project/pull/128724 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Prevent using an implicit `step-in`. (PR #143644)

2025-06-11 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -581,19 +581,19 @@ llvm::json::Value CreateStackFrame(lldb::SBFrame &frame, EmplaceSafeString(object, "name", frame_name); - auto target = frame.GetThread().GetProcess().GetTarget(); - auto source = CreateSource(frame.GetPCAddress(), target); + lldb::SBTarget target =

[Lldb-commits] [lldb] [lldb][nfc] Factor out code checking if Variable is in scope (PR #143572)

2025-06-11 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan closed https://github.com/llvm/llvm-project/pull/143572 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Prevent using an implicit `step-in`. (PR #143644)

2025-06-11 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -581,19 +581,19 @@ llvm::json::Value CreateStackFrame(lldb::SBFrame &frame, EmplaceSafeString(object, "name", frame_name); - auto target = frame.GetThread().GetProcess().GetTarget(); - auto source = CreateSource(frame.GetPCAddress(), target); felipepio

[Lldb-commits] [lldb] [lldb-dap] Prevent using an implicit `step-in`. (PR #143644)

2025-06-11 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -581,19 +581,19 @@ llvm::json::Value CreateStackFrame(lldb::SBFrame &frame, EmplaceSafeString(object, "name", frame_name); - auto target = frame.GetThread().GetProcess().GetTarget(); - auto source = CreateSource(frame.GetPCAddress(), target); + lldb::SBTarget target =

[Lldb-commits] [lldb] [lldb][nfc] Factor out code checking if Variable is in scope (PR #143572)

2025-06-10 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan updated https://github.com/llvm/llvm-project/pull/143572 >From 9821fd7c4530819f131271f4325123a400ecded4 Mon Sep 17 00:00:00 2001 From: Felipe de Azevedo Piovezan Date: Tue, 10 Jun 2025 10:26:52 -0700 Subject: [PATCH 1/3] [lldb][nfc] Factor out code checking if

[Lldb-commits] [lldb] [lldb][nfc] Factor out code checking if Variable is in scope (PR #143572)

2025-06-10 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -321,6 +302,27 @@ bool Variable::IsInScope(StackFrame *frame) { return false; } +bool Variable::IsInScope(Block &block, Address addr) { felipepiovezan wrote: That's an interesting, given the current usage it makes sense to switch this to const reference

[Lldb-commits] [lldb] [lldb][nfc] Factor out code checking if Variable is in scope (PR #143572)

2025-06-10 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -321,6 +302,27 @@ bool Variable::IsInScope(StackFrame *frame) { return false; } +bool Variable::IsInScope(Block &block, Address addr) { felipepiovezan wrote: Mmmm it is a weak pointer + integer. How cheap is it to copy a weak pointer? https://github.com

[Lldb-commits] [lldb] [lldb][nfc] Factor out code checking if Variable is in scope (PR #143572)

2025-06-10 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -321,6 +302,27 @@ bool Variable::IsInScope(StackFrame *frame) { return false; } +bool Variable::IsInScope(Block &block, Address addr) { felipepiovezan wrote: >Like >[std::shared_ptr](https://en.cppreference.com/w/cpp/memory/shared_ptr.html), a >typical

[Lldb-commits] [lldb] [lldb][nfc] Factor out code checking if Variable is in scope (PR #143572)

2025-06-10 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -321,6 +302,27 @@ bool Variable::IsInScope(StackFrame *frame) { return false; } +bool Variable::IsInScope(Block &block, Address addr) { felipepiovezan wrote: That one is just a pointer + integer, my understanding is that it is supposed to be passed by v

[Lldb-commits] [lldb] [lldb][nfc] Factor out code checking if Variable is in scope (PR #143572)

2025-06-10 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan updated https://github.com/llvm/llvm-project/pull/143572 >From 9821fd7c4530819f131271f4325123a400ecded4 Mon Sep 17 00:00:00 2001 From: Felipe de Azevedo Piovezan Date: Tue, 10 Jun 2025 10:26:52 -0700 Subject: [PATCH 1/2] [lldb][nfc] Factor out code checking if

[Lldb-commits] [lldb] [lldb][nfc] Factor out code checking if Variable is in scope (PR #143572)

2025-06-10 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -321,6 +302,27 @@ bool Variable::IsInScope(StackFrame *frame) { return false; } +bool Variable::IsInScope(Block &block, Address addr) { felipepiovezan wrote: Just an oopsie on my part! https://github.com/llvm/llvm-project/pull/143572 ___

[Lldb-commits] [lldb] [lldb][nfc] Factor out code checking if Variable is in scope (PR #143572)

2025-06-10 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan created https://github.com/llvm/llvm-project/pull/143572 This is useful for checking whether a variable is in scope inside a specific block. >From 9821fd7c4530819f131271f4325123a400ecded4 Mon Sep 17 00:00:00 2001 From: Felipe de Azevedo Piovezan Date: Tue, 10

[Lldb-commits] [lldb] [lldb][nfc] Fix missing move operations and constness of methods (PR #142052)

2025-05-30 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan closed https://github.com/llvm/llvm-project/pull/142052 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][ELF Core] Support all the Generic (Negative) SI Codes. (PR #140150)

2025-05-27 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: There's a very good chance this is breaking a lot of tests on mac: https://green.lab.llvm.org/job/as-lldb-cmake/26580/console Could you have a look? The only other commit there is a table gen warning fix https://github.com/llvm/llvm-project/pull/140150 ___

[Lldb-commits] [lldb] Support stepping through Darwin "branch islands" (PR #139301)

2025-05-13 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/139301 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Allow arrays to be dereferenced in C/C++. (PR #135843)

2025-05-12 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: hi @kuilpd , I think this may have broken the mac incremental bots: https://green.lab.llvm.org//job/as-lldb-cmake/25656/ ``` [2025-05-12T12:08:03.542Z] runCmd: frame variable -d run-target *cfDictionaryRef [2025-05-12T12:08:03.542Z] [2025-05-12T12:08:03.542Z] runCmd fail

[Lldb-commits] [lldb] Support stepping through Darwin "branch islands" (PR #139301)

2025-05-09 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/139301 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Adding a modules explorer to lldb-dap ext. (PR #138977)

2025-05-08 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: It may be a coincidence, but a DAP test failed in green dragon right after this patch was applied: https://ci.swift.org/view/all/job/llvm.org/job/as-lldb-cmake/25465/console TestDAP_repl_mode_detection.py DAP tasks have been flaky though, so maybe unrelated, I don't full

[Lldb-commits] [lldb] Branch island debug (PR #139166)

2025-05-08 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan approved this pull request. Fingers crossed this will give us enough info! https://github.com/llvm/llvm-project/pull/139166 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[Lldb-commits] [lldb] [lldb] Expose QueueThreadPlanForStepSingleInstruction function to SBThreadPlan (PR #137904)

2025-05-08 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: Ah there were _two_ tests here. I've disabled the other one too. https://github.com/llvm/llvm-project/pull/137904 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commi

[Lldb-commits] [lldb] [lldb] Expose QueueThreadPlanForStepSingleInstruction function to SBThreadPlan (PR #137904)

2025-05-08 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: 28156539a9df 20250508 fpiove.. [lldb] Disable test using GetControlFlowKind on arm (HEAD, llvm/main) https://github.com/llvm/llvm-project/pull/137904 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm

[Lldb-commits] [lldb] [lldb] Expose QueueThreadPlanForStepSingleInstruction function to SBThreadPlan (PR #137904)

2025-05-08 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: @eronnen my fix does not seem to have worked https://github.com/llvm/llvm-project/pull/137904 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 2815653 - [lldb] Disable test using GetControlFlowKind on arm

2025-05-08 Thread Felipe de Azevedo Piovezan via lldb-commits
Author: Felipe de Azevedo Piovezan Date: 2025-05-08T13:14:40-07:00 New Revision: 28156539a9df3fa0d9db47c405c0006fcee9f77f URL: https://github.com/llvm/llvm-project/commit/28156539a9df3fa0d9db47c405c0006fcee9f77f DIFF: https://github.com/llvm/llvm-project/commit/28156539a9df3fa0d9db47c405c0006fc

[Lldb-commits] [lldb] [lldb] Expose QueueThreadPlanForStepSingleInstruction function to SBThreadPlan (PR #137904)

2025-05-08 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -44,6 +44,48 @@ def step_out_with_scripted_plan(self, name): stop_desc = thread.GetStopDescription(1000) self.assertIn("Stepping out from", stop_desc, "Got right description") +def run_until_branch_instruction(self): +self.build() +(targe

[Lldb-commits] [lldb] [lldb] Expose QueueThreadPlanForStepSingleInstruction function to SBThreadPlan (PR #137904)

2025-05-08 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: To fix the bots, I've disabled your new test in all non x86 archs, feel free to update if you want to do something else https://github.com/llvm/llvm-project/pull/137904 ___ lldb-commits mailing list lldb-commits@lists.llvm.org ht

[Lldb-commits] [lldb] cb0b961 - [lldb] Disable test using GetControlFlowKind on arm

2025-05-08 Thread Felipe de Azevedo Piovezan via lldb-commits
Author: Felipe de Azevedo Piovezan Date: 2025-05-08T08:11:17-07:00 New Revision: cb0b9614f8ca7ffcd5f091b1c9990adfd6cb7e33 URL: https://github.com/llvm/llvm-project/commit/cb0b9614f8ca7ffcd5f091b1c9990adfd6cb7e33 DIFF: https://github.com/llvm/llvm-project/commit/cb0b9614f8ca7ffcd5f091b1c9990adfd

[Lldb-commits] [lldb] bbafa52 - [lldb] Fix asan failure in MinidumpFileBuilder

2025-05-08 Thread Felipe de Azevedo Piovezan via lldb-commits
Author: Felipe de Azevedo Piovezan Date: 2025-05-08T07:27:09-07:00 New Revision: bbafa5214e8d5d5daf7cf428780500b13a7d6cbb URL: https://github.com/llvm/llvm-project/commit/bbafa5214e8d5d5daf7cf428780500b13a7d6cbb DIFF: https://github.com/llvm/llvm-project/commit/bbafa5214e8d5d5daf7cf428780500b13

[Lldb-commits] [lldb] [lldb] Expose QueueThreadPlanForStepSingleInstruction function to SBThreadPlan (PR #137904)

2025-05-08 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: @eronnen this is breaking the incremental green dragon bots. Could you revert while you look at this please? https://ci.swift.org/view/all/job/llvm.org/job/as-lldb-cmake/25425/changes#41321416815d74a4a7fd15c78fcfa5af457625bb ``` [2025-05-08T12:15:32.021Z] ==

[Lldb-commits] [lldb] [lldb] Fix dynamic type resolutions for core files (PR #138698)

2025-05-08 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: Pushed your suggestion > Lol, I think its this: > > https://github.com/llvm/llvm-project/blob/6babd63a4bbc094bee4ef8e75f95dccd32325c15/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp#L718-L721 > > I'm done for this week, but could someone try if changing

[Lldb-commits] [lldb] [lldb] Fix dynamic type resolutions for core files (PR #138698)

2025-05-07 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: Btw I think this is causing an asan failure: https://green.lab.llvm.org/job/lldb-cmake-sanitized/1671/ ``` 2025-05-07T19:03:57.557Z] ==73219==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x0001070cf5b8 at pc 0x0001056051c0 bp 0x00016b0a3730 sp 0x00016b0a2ee0

[Lldb-commits] [lldb] a123891 - Revert "Branch island with numbers (#138781)"

2025-05-06 Thread Felipe de Azevedo Piovezan via lldb-commits
Author: Felipe de Azevedo Piovezan Date: 2025-05-06T18:20:25-07:00 New Revision: a1238911f43c1d46cc7d4e72e2a16c3c9a157d9a URL: https://github.com/llvm/llvm-project/commit/a1238911f43c1d46cc7d4e72e2a16c3c9a157d9a DIFF: https://github.com/llvm/llvm-project/commit/a1238911f43c1d46cc7d4e72e2a16c3c9

[Lldb-commits] [lldb] 2cae14f - Revert "[lldb] Change synthetic symbol names to have file address (#137512)"

2025-05-01 Thread Felipe de Azevedo Piovezan via lldb-commits
Author: Felipe de Azevedo Piovezan Date: 2025-05-01T18:27:34-07:00 New Revision: 2cae14fdc62a07252ad1c2c2b11678c4539416a6 URL: https://github.com/llvm/llvm-project/commit/2cae14fdc62a07252ad1c2c2b11678c4539416a6 DIFF: https://github.com/llvm/llvm-project/commit/2cae14fdc62a07252ad1c2c2b11678c45

[Lldb-commits] [lldb] [lldb] Change synthetic symbol names to have file address (PR #137512)

2025-05-01 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: I'm going to revert this for now, as I see your commit access is still pending (hopefully soon!) https://github.com/llvm/llvm-project/pull/137512 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cg

[Lldb-commits] [lldb] [lldb] Change synthetic symbol names to have file address (PR #137512)

2025-05-01 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: @eronnen I believe this is breaking the macOS bots, on the test TestFoundationDisassembly.py ``` 17:54:59 FAIL: test_foundation_disasm (TestFoundationDisassembly.FoundationDisassembleTestCase) 17:54:59 Do 'disassemble -n func' on each and every 'Code' symbol entry f

[Lldb-commits] [lldb] f784fa7 - [lldb] Disable TestExitDuringExpression on asan

2025-04-29 Thread Felipe de Azevedo Piovezan via lldb-commits
Author: Felipe de Azevedo Piovezan Date: 2025-04-29T12:38:51-07:00 New Revision: f784fa727543463b86511f7e5797174422cbeeaf URL: https://github.com/llvm/llvm-project/commit/f784fa727543463b86511f7e5797174422cbeeaf DIFF: https://github.com/llvm/llvm-project/commit/f784fa727543463b86511f7e579717442

[Lldb-commits] [lldb] [lldb][AIX] get host info for AIX (PR #134354)

2025-04-29 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: Could you please disable/revert if the fix is not easy? https://github.com/llvm/llvm-project/pull/134354 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][AIX] get host info for AIX (PR #134354)

2025-04-29 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: Hi, this test is _still_ failing on the macOS bots: https://ci.swift.org/view/all/job/llvm.org/job/lldb-cmake/11728/execution/node/111/log/ ``` /Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake/lldb-build/tools/lldb/unittests/Host/./HostTests --gtest_filter=HostTest.G

[Lldb-commits] [lldb] 55b4e5e - [lldb] Disable TestDAP_attach

2025-04-29 Thread Felipe de Azevedo Piovezan via lldb-commits
Author: Felipe de Azevedo Piovezan Date: 2025-04-29T07:18:22-07:00 New Revision: 55b4e5e5154550ba981af08ca9bd1e3da00e6fea URL: https://github.com/llvm/llvm-project/commit/55b4e5e5154550ba981af08ca9bd1e3da00e6fea DIFF: https://github.com/llvm/llvm-project/commit/55b4e5e5154550ba981af08ca9bd1e3da

[Lldb-commits] [lldb] [lldb] Provide an unconditional @skip annotation for API tests (PR #137712)

2025-04-28 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan approved this pull request. Nice! https://github.com/llvm/llvm-project/pull/137712 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] b73169a - [lldb] Disable TestDAP_attachByPortNum

2025-04-28 Thread Felipe de Azevedo Piovezan via lldb-commits
Author: Felipe de Azevedo Piovezan Date: 2025-04-28T14:08:14-07:00 New Revision: b73169ad3edc56fe2b4f5bd3d5259310168da50c URL: https://github.com/llvm/llvm-project/commit/b73169ad3edc56fe2b4f5bd3d5259310168da50c DIFF: https://github.com/llvm/llvm-project/commit/b73169ad3edc56fe2b4f5bd3d52593101

[Lldb-commits] [lldb] [lldb][nfc] Split the constructor of ThreadPlanStepOut (PR #136160)

2025-04-18 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan closed https://github.com/llvm/llvm-project/pull/136160 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Consider "hidden" frames in ThreadPlanShouldStopHere (PR #131800)

2025-04-18 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: Closing in favor of the stack of patches here: [[lldb][nfc] Factor out code from ThreadPlanStepOut ctor #136159](https://github.com/llvm/llvm-project/pull/136159) [[lldb][nfc] Split the constructor of ThreadPlanStepOut #136160](https://github.com/llvm/llvm-project/pull/13

[Lldb-commits] [lldb] [lldb] Create ThreadPlanStepOut ctor that never skips frames (PR #136163)

2025-04-17 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan closed https://github.com/llvm/llvm-project/pull/136163 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][nfc] Remove unused parameters in ThreadPlanStepOut ctor (PR #136161)

2025-04-17 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan closed https://github.com/llvm/llvm-project/pull/136161 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Create ThreadPlanStepOut ctor that never skips frames (PR #136163)

2025-04-17 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: Addressed review comments, rebased on top of main https://github.com/llvm/llvm-project/pull/136163 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Create ThreadPlanStepOut ctor that never skips frames (PR #136163)

2025-04-17 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan edited https://github.com/llvm/llvm-project/pull/136163 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

  1   2   3   4   5   6   7   >