[Lldb-commits] [lldb] [lldb][nfc] Rename WritePointerToMemory argument's name (PR #157566)

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

[Lldb-commits] [lldb] [lldb] Track CFA pointer metadata in StackID (PR #157498)

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

[Lldb-commits] [lldb] [lldb] Track CFA pointer metadata in StackID (PR #157498)

2025-09-08 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan created https://github.com/llvm/llvm-project/pull/157498 In this commit: 9c8e71644227 [lldb] Make StackID call Fix{Code,Data} pointers (#152796) We made StackID keep track of the CFA without any pointer metadata in it. This is necessary when comparing two Sta

[Lldb-commits] [lldb] [lldb][NFC] Fix style issues with StackID.h (PR #157483)

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

[Lldb-commits] [lldb] [lldb][NFC] Fix style issues with StackID.h (PR #157483)

2025-09-08 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan updated https://github.com/llvm/llvm-project/pull/157483 >From 668e90948beabe437ea283b84ae0ffc9ea7c4a78 Mon Sep 17 00:00:00 2001 From: Felipe de Azevedo Piovezan Date: Mon, 8 Sep 2025 07:43:38 -0700 Subject: [PATCH 1/2] [lldb][NFC] Fix style issues with StackID

[Lldb-commits] [lldb] [lldb][NFC] Fix style issues with StackID.h (PR #157483)

2025-09-08 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan created https://github.com/llvm/llvm-project/pull/157483 Some comments were "suffixed" to member variable declarations; these are moved to before the variable. Some constructors and operators were just defaulted and not necessary. Some comments dividing the c

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

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

[Lldb-commits] [lldb] [lldb][Expression] Reject languages not supported by TypeSystems for expression evaluation (PR #156648)

2025-09-03 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan approved this pull request. I was initially hesitant to make this a hard error, but the fact that we already have a list of supported languages and that C is not in there makes me more confident in erroring here. Would be curious to hear other's thoughts. http

[Lldb-commits] [lldb] [lldb][ExpressionParser][NFC] Clean up expression language picking logic (PR #156642)

2025-09-03 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan approved this pull request. I think this is fine, but that FIXME is curious. We don't support running in non-C++ modes, so switching on `frame_lang` would only get us a more precise C++ standard version, but do we use that? https://github.com/llvm/llvm-project

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-09-03 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan updated https://github.com/llvm/llvm-project/pull/153585 >From ce9c2cc6748c22ce4b0f5178b8f5e877d430 Mon Sep 17 00:00:00 2001 From: Felipe de Azevedo Piovezan Date: Wed, 13 Aug 2025 18:38:23 -0700 Subject: [PATCH 1/8] [lldb] Call FixUpPointer in WritePointer

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-09-03 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: I've simplified the test as suggested. Also going to take your offer of testing/porting this on Linux :) It should hopefully be a simple platform check inside python followed by a json update like what we do for the triple/uuid. https://github.com/llvm/llvm-project/pull/1

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-09-03 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan updated https://github.com/llvm/llvm-project/pull/153585 >From ce9c2cc6748c22ce4b0f5178b8f5e877d430 Mon Sep 17 00:00:00 2001 From: Felipe de Azevedo Piovezan Date: Wed, 13 Aug 2025 18:38:23 -0700 Subject: [PATCH 1/7] [lldb] Call FixUpPointer in WritePointer

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-09-03 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -0,0 +1,19 @@ +#include +#include +#include + +int myglobal = 41; + +uint64_t get_high_bits(void *ptr) { + uint64_t mask = ~((1ULL << 48) - 1); + uint64_t ptrtoint = (uint64_t)ptr; + uint64_t high_bits = ptrtoint & mask; felipepiovezan wrote: my bad, I m

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-09-03 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -0,0 +1,19 @@ +#include +#include +#include + +int myglobal = 41; felipepiovezan wrote: It is used by the python expression evaluation, but given your other comments I'll remove it https://github.com/llvm/llvm-project/pull/153585 _

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-09-03 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan updated https://github.com/llvm/llvm-project/pull/153585 >From ce9c2cc6748c22ce4b0f5178b8f5e877d430 Mon Sep 17 00:00:00 2001 From: Felipe de Azevedo Piovezan Date: Wed, 13 Aug 2025 18:38:23 -0700 Subject: [PATCH 1/5] [lldb] Call FixUpPointer in WritePointer

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-09-03 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: Your guess is right. Enabling `log enable lldb expr`, we can see the IR generated for `expr get_high_bits(&myglobal_json)` ``` @"_ZGVZ12$__lldb_exprPvE19$__lldb_expr_result" = internal global i8 0, align 1 ; Function Attrs: convergent noinline nounwind optnone define void

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-09-03 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: Sorry for the delay, long weekend here in the US. Ok, I think I finally got it working, mostly? I was facing two issues: 1) `v` gets confused by what we were doing, but `expr` doesn't; 2) Older versions of LLDB would fail to find the symbol -- even with expr -- after `tar

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-09-03 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -0,0 +1,21 @@ +{ +"triple": "replace me", +"uuid": "replace me", +"type": "executable", +"sections": [ +{ +"name": "__DATA", +"type": "data", felipepiovezan wrote: I think I need to make this test run only on

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-09-02 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan updated https://github.com/llvm/llvm-project/pull/153585 >From ce9c2cc6748c22ce4b0f5178b8f5e877d430 Mon Sep 17 00:00:00 2001 From: Felipe de Azevedo Piovezan Date: Wed, 13 Aug 2025 18:38:23 -0700 Subject: [PATCH 1/5] [lldb] Call FixUpPointer in WritePointer

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-09-02 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: Added a test! https://github.com/llvm/llvm-project/pull/153585 ___ 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 (try 2) (PR #153585)

2025-09-02 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan updated https://github.com/llvm/llvm-project/pull/153585 >From ce9c2cc6748c22ce4b0f5178b8f5e877d430 Mon Sep 17 00:00:00 2001 From: Felipe de Azevedo Piovezan Date: Wed, 13 Aug 2025 18:38:23 -0700 Subject: [PATCH 1/5] [lldb] Call FixUpPointer in WritePointer

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-09-02 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: > Also is there a store reference to memory and if so does it do its own thing > or call store pointer? could you elaborate? Not sure what you meant by "store reference to memory". https://github.com/llvm/llvm-project/pull/153585 __

[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [flang] [libc] [libcxx] [lldb] [llvm] [mlir] [openmp] Fix typos and spelling errors across codebase (PR #156270)

2025-09-02 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan commented: the LLDB changes are ok, but I also support the need to split this; this is touching some test files (and test names), and I dread to think if the cross-project revert someone would need to do if we accidentally break a test. https://github.com/llv

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-08-29 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: This seems promising! > (lldb) target symbol add ~/symbol.json How did you get this to work? As soon as I do this, I lose all the other symbols in my original program, including the function I want to call (`return_ptr` in your example). https://github.com/llvm/llvm-pro

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-08-28 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: @DavidSpickett in a different comment, you mentioned that > the AArch64 Linux bot has top byte ignore and pointer authentication > available. Do you know how to write a test targeting that architecture specifically? One of the main challenges I have right now is that thi

[Lldb-commits] [lldb] [lldb][debugserver] Upstream to debugserver changes (PR #155733)

2025-08-28 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan approved this pull request. Nice find! Left one question about an unused variable, otherwise LGTM! https://github.com/llvm/llvm-project/pull/155733 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://list

[Lldb-commits] [lldb] [lldb][debugserver] Upstream to debugserver changes (PR #155733)

2025-08-28 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -244,6 +266,7 @@ kern_return_t DNBArchMachARM64::GetGPRState(bool force) { uint64_t log_sp = m_state.context.gpr.__sp; uint64_t log_pc = m_state.context.gpr.__pc; #endif +uint64_t *x = &m_state.context.gpr.__x[0]; felipepiovezan wrote: is this u

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-08-16 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: I'm out next week, but I'll have a look at that idea when I'm back! https://github.com/llvm/llvm-project/pull/153585 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-co

[Lldb-commits] [lldb] [lldb][nfc] Update docstring of StackFrame "get variable" methods. (PR #153728)

2025-08-15 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan closed https://github.com/llvm/llvm-project/pull/153728 ___ 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 redundant target/process checks in SBFrame (PR #153258)

2025-08-14 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: @bulbazord what do you think? https://github.com/llvm/llvm-project/pull/153258 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][nfc] Update docstring of StackFrame "get variable" methods. (PR #153728)

2025-08-14 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan created https://github.com/llvm/llvm-project/pull/153728 This commits makes the docs more precise, clarifying how scopes affect the result of a method, as well as documenting a parameter of a different method. >From 4aa57dc057c8f2b8a1d6cff17537281a3a4b900a Mon

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-08-14 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -640,6 +640,13 @@ void IRMemoryMap::WritePointerToMemory(lldb::addr_t process_address, lldb::addr_t address, Status &error) { error.Clear(); + /// Only ask the Process to fix the address if this address belongs to the + /// proces

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-08-14 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan edited https://github.com/llvm/llvm-project/pull/153585 ___ 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 (try 2) (PR #153585)

2025-08-14 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: Address review comments https://github.com/llvm/llvm-project/pull/153585 ___ 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 (try 2) (PR #153585)

2025-08-14 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan updated https://github.com/llvm/llvm-project/pull/153585 >From ce9c2cc6748c22ce4b0f5178b8f5e877d430 Mon Sep 17 00:00:00 2001 From: Felipe de Azevedo Piovezan Date: Wed, 13 Aug 2025 18:38:23 -0700 Subject: [PATCH 1/3] [lldb] Call FixUpPointer in WritePointer

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-08-14 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -640,6 +640,13 @@ void IRMemoryMap::WritePointerToMemory(lldb::addr_t process_address, lldb::addr_t address, Status &error) { felipepiovezan wrote: I'll do this after this PR is merged, otherwise I'll have to rebase and

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-08-14 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan edited https://github.com/llvm/llvm-project/pull/153585 ___ 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 (try 2) (PR #153585)

2025-08-14 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -640,6 +640,13 @@ void IRMemoryMap::WritePointerToMemory(lldb::addr_t process_address, lldb::addr_t address, Status &error) { error.Clear(); + /// Only ask the Process to fix the address if this address belongs to the + /// proces

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-08-14 Thread Felipe de Azevedo Piovezan via lldb-commits
@@ -640,6 +640,13 @@ void IRMemoryMap::WritePointerToMemory(lldb::addr_t process_address, lldb::addr_t address, Status &error) { error.Clear(); + /// Only ask the Process to fix the address if this address belongs to the + /// proces

[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (try 2) (PR #153585)

2025-08-14 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: Thanks @jasonmolenda for suggesting a solution to the issues https://github.com/llvm/llvm-project/pull/153585 ___ 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 (try 2) (PR #153585)

2025-08-14 Thread Felipe de Azevedo Piovezan via lldb-commits
https://github.com/felipepiovezan created https://github.com/llvm/llvm-project/pull/153585 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] 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

  1   2   3   4   5   6   7   >