[all-commits] [llvm/llvm-project] 6e56c4: Decr pc when looking for DWARF loc list entry mid-...

Jason Molenda via All-commits all-commits at lists.llvm.org
Fri Apr 29 14:39:16 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6e56c4961a106b8fde69ffcf9f803fe0890722fa
      https://github.com/llvm/llvm-project/commit/6e56c4961a106b8fde69ffcf9f803fe0890722fa
  Author: Jason Molenda <jason at molenda.com>
  Date:   2022-04-29 (Fri, 29 Apr 2022)

  Changed paths:
    M lldb/source/Expression/DWARFExpression.cpp
    A lldb/test/API/functionalities/location-list-lookup/Makefile
    A lldb/test/API/functionalities/location-list-lookup/TestLocationListLookup.py
    A lldb/test/API/functionalities/location-list-lookup/main.c

  Log Message:
  -----------
  Decr pc when looking for DWARF loc list entry mid-stack

When looking for a variable location in a DWARF location list,
we search the list of ranges to find one that includes the pc.
With a function mid-stack, the "pc" is the return pc instead of
the call instruction, and in optimized code this can be another
function or a different basic block (with different variable
locations).  Back up the "pc" value mid-stack to find the correct
location list entry.

Differential Revision: https://reviews.llvm.org/D124597
rdar://63903416




More information about the All-commits mailing list