Skip to content

Conversation

@felipepiovezan
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Nov 17, 2025

@llvm/pr-subscribers-lldb

Author: Felipe de Azevedo Piovezan (felipepiovezan)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/168340.diff

1 Files Affected:

  • (modified) lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp (+4-2)
diff --git a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
index 790f230af74c9..8437a51471ca2 100644
--- a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
+++ b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
@@ -174,8 +174,10 @@ bool UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly(
 
     m_inst_emulator_up->SetInstruction(inst->GetOpcode(), inst->GetAddress(),
                                        nullptr);
+    const EmulateInstruction::InstructionCondition new_condition =
+        m_inst_emulator_up->GetInstructionCondition();
 
-    if (last_condition != m_inst_emulator_up->GetInstructionCondition()) {
+    if (last_condition != new_condition) {
       // If the last instruction was conditional with a different condition
       // than the current condition then restore the state.
       if (last_condition != EmulateInstruction::UnconditionalCondition) {
@@ -190,7 +192,7 @@ bool UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly(
       condition_block_start_state = it;
     }
 
-    last_condition = m_inst_emulator_up->GetInstructionCondition();
+    last_condition = new_condition;
 
     m_inst_emulator_up->EvaluateInstruction(
         eEmulateInstructionOptionIgnoreConditions);

Copy link
Collaborator

@DavidSpickett DavidSpickett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@felipepiovezan felipepiovezan merged commit 74c9168 into llvm:main Nov 17, 2025
12 checks passed
felipepiovezan added a commit to felipepiovezan/llvm-project that referenced this pull request Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants