[all-commits] [llvm/llvm-project] b6388e: Decr return pc mid-stack when picking UnwindPlan row

Jason Molenda via All-commits all-commits at lists.llvm.org
Thu May 5 14:18:36 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b6388e4a0050fa248f774f5dacfa3e566e8daef1
  Author: Jason Molenda <jason at molenda.com>
  Date:   2022-05-05 (Thu, 05 May 2022)

  Changed paths:
    M lldb/include/lldb/Target/RegisterContextUnwind.h
    M lldb/source/Target/RegisterContextUnwind.cpp

  Log Message:
  Decr return pc mid-stack when picking UnwindPlan row

When picking the UnwindPlan row to use to backtrace,
off of the zeroth frame, decrement the return pc so
we're in the address range of the call instruction.
If this is a noretrun function call, the instruction
at the "return address" is likely an entirely different
basic block with possibly very different unwind rules,
and this can cause the backtrace to be incorrect.

Differential Revision: https://reviews.llvm.org/D124957

More information about the All-commits mailing list