summaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/GSYM/MergedFunctionsInfo.cpp
AgeCommit message (Collapse)Author
2025-01-06[GSYM] Add support for querying merged functions in llvm-gsymutil (#120991)alx32
Adds the ability to lookup and display all merged functions for an address in llvm-gsymutil. Now, when `--merged-functions` is used in combination with `--address/--addresses-from-stdin`, lookup results will contain information about merged functions, if available. To support printing merged function information when using the `--verbose` option, the `LookupResult` data structure also had to be extended with pointers to the raw function data and raw merged function data. This is because merged functions share the same address range, so it's not easy to look up the raw merged function data for a particular `LookupResult` that is based on a merged function.
2024-08-08Fix a typecheck_arithmetic_incomplete_or_sizeless_type error in ↵Haojian Wu
GSYM/MergedFunctionsInfo.h
2024-08-07[gSYM] Add support merged functions in gSYM format (#101604)alx32
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)