[all-commits] [llvm/llvm-project] cb5dc1: [gSYM] Add support merged functions in gSYM format...

alx32 via All-commits all-commits at lists.llvm.org
Wed Aug 7 14:34:41 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cb5dc1faa8b3702e0d03426ee5dfc5e1b903ec47
      https://github.com/llvm/llvm-project/commit/cb5dc1faa8b3702e0d03426ee5dfc5e1b903ec47
  Author: alx32 <103613512+alx32 at users.noreply.github.com>
  Date:   2024-08-07 (Wed, 07 Aug 2024)

  Changed paths:
    M llvm/include/llvm/DebugInfo/GSYM/FunctionInfo.h
    M llvm/include/llvm/DebugInfo/GSYM/GsymCreator.h
    M llvm/include/llvm/DebugInfo/GSYM/GsymReader.h
    A llvm/include/llvm/DebugInfo/GSYM/MergedFunctionsInfo.h
    M llvm/lib/DebugInfo/GSYM/CMakeLists.txt
    M llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp
    M llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
    M llvm/lib/DebugInfo/GSYM/GsymReader.cpp
    A llvm/lib/DebugInfo/GSYM/MergedFunctionsInfo.cpp
    A llvm/test/tools/llvm-gsymutil/ARM_AArch64/macho-merged-funcs-dwarf.yaml
    M llvm/tools/llvm-gsymutil/Opts.td
    M llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp

  Log Message:
  -----------
  [gSYM] Add support merged functions in gSYM format (#101604)

This patch introduces support for storing debug info for merged
functions in the GSYM debug info. It allows GSYM to represent multiple
functions that share the same address range, which occur when multiple
functions are merged during linker ICF.

The core of this functionality is the new `MergedFunctionsInfo` class,
which is integrated into the existing `FunctionInfo` structure. During
GSYM creation, functions with identical address ranges are now grouped
together, with one function serving as the "master" and the others
becoming "merged" functions. This organization is preserved in the GSYM
format and can be read back and displayed when dumping GSYM information.

Old readers will only see the master function, and ther "merged"
functions will not be processed.

Note: This patch just adds the functionality to the gSYM format -
additional changes to the gsym format and algorithmic changes to logic
existing tooling are needed to take advantage of this data.

Exact output of `llvm-gsymutil --verify --verbose` for the included
test:
[gist](https://gist.github.com/alx32/b9c104d7f87c0b3e7b4171399fc2dca3)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list