[all-commits] [llvm/llvm-project] 27033c: Fix line table lookups in line tables with multipl...

Greg Clayton via All-commits all-commits at lists.llvm.org
Mon Nov 6 10:10:14 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 27033cc66500b7578b2cbf297b7881eef0cafdac
      https://github.com/llvm/llvm-project/commit/27033cc66500b7578b2cbf297b7881eef0cafdac
  Author: Greg Clayton <gclayton at fb.com>
  Date:   2023-11-06 (Mon, 06 Nov 2023)

  Changed paths:
    M llvm/lib/DebugInfo/GSYM/LineTable.cpp
    M llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp

  Log Message:
  -----------
  Fix line table lookups in line tables with multiple lines with the sa… (#70879)

Fix line table lookups in line tables with multiple lines with the same
address.

Compilers emit line tables that have multiple line table entries with
the same address. When doing lookups, we always need to use the last
line entry if a lookup address matches the address of one or more line
entries. This is because the size of an address range for a line uses
the next line entry to figure out how big the current line entry is. If
the next line entry has the same address, that means the current line
entry has a size of zero, so no bytes correspond to the line entry.

This patch ensures that lookups will always pick the last matching line
entry when the lookup address matches more than one line entry.




More information about the All-commits mailing list