[PATCH] D74883: Add a llvm-gsymutil tool that can convert object files to GSYM and perform lookups.
Greg Clayton via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 19 17:38:09 PST 2020
clayborg created this revision.
clayborg added reviewers: labath, aadsm, serhiy.redko, jankratochvil, xiaobai, wallace, aprantl, JDevlieghere.
Herald added subscribers: hiraditya, mgorny.
Herald added a reviewer: jdoerfert.
Herald added a project: LLVM.
This patch creates the llvm-gsymutil binary that can convert object files to GSYM using the --convert <path> option. It can also dump and lookup addresses within GSYM files that have been saved to disk.
To dump a file:
llvm-gsymutil /path/to/a.gsym
To perform address lookups, like with atos, on GSYM files:
llvm-gsymutil --address 0x1000 --address 0x1100 /path/to/a.gsym
To convert a mach-o or ELF file, including any DWARF debug info contained within the object files:
llvm-gsymutil --convert /path/to/a.out --out-file /path/to/a.out.gsym
Conversion highlights:
- convert DWARF debug info in mach-o or ELF files to GSYM
- convert symbols in symbol table to GSYM and don't convert symbols that overlap with DWARF debug info
- extract UUID from object files
- extract .text (read + execute) section address ranges and filter out any DWARF or symbols that don't fall in those ranges.
- if .text sections are extracted, and if the last gsym::FunctionInfo object has no size, cap the size to the end of the section the function was contained in
Dumping GSYM files will dump all sections of the GSYM file in textual format.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74883
Files:
llvm/include/llvm/DebugInfo/GSYM/GsymCreator.h
llvm/include/llvm/DebugInfo/GSYM/GsymReader.h
llvm/include/llvm/DebugInfo/GSYM/ObjectFileTransformer.h
llvm/include/llvm/DebugInfo/GSYM/Range.h
llvm/include/llvm/Support/DataExtractor.h
llvm/lib/DebugInfo/GSYM/CMakeLists.txt
llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp
llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
llvm/lib/DebugInfo/GSYM/GsymReader.cpp
llvm/lib/DebugInfo/GSYM/LookupResult.cpp
llvm/lib/DebugInfo/GSYM/ObjectFileTransformer.cpp
llvm/lib/DebugInfo/GSYM/Range.cpp
llvm/lib/Support/DataExtractor.cpp
llvm/test/tools/llvm-gsymutil/cmdline.test
llvm/test/tools/llvm-gsymutil/elf-dwarf.yaml
llvm/test/tools/llvm-gsymutil/fat-macho-dwarf.yaml
llvm/test/tools/llvm-gsymutil/mach-dwarf.yaml
llvm/tools/llvm-gsym/CMakeLists.txt
llvm/tools/llvm-gsym/llvm-gsymutil.cpp
llvm/unittests/Support/DataExtractorTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74883.245562.patch
Type: text/x-patch
Size: 144411 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200220/f7372f43/attachment-0001.bin>
More information about the llvm-commits
mailing list