mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
[StackMaps] Add a lightweight parser for stackmap version 1 sections.
The parser provides a convenient interface for reading llvm stackmap v1 sections in object files. This patch also includes a new option for llvm-readobj, '-stackmap', which uses the parser to pretty-print stackmap sections for debugging/testing purposes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240860 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -176,6 +176,12 @@ namespace opts {
|
||||
cl::opt<bool>
|
||||
COFFBaseRelocs("coff-basereloc",
|
||||
cl::desc("Display the PE/COFF .reloc section"));
|
||||
|
||||
// -stackmap
|
||||
cl::opt<bool>
|
||||
PrintStackMap("stackmap",
|
||||
cl::desc("Display contents of stackmap section"));
|
||||
|
||||
} // namespace opts
|
||||
|
||||
static int ReturnValue = EXIT_SUCCESS;
|
||||
@@ -316,6 +322,9 @@ static void dumpObject(const ObjectFile *Obj) {
|
||||
Dumper->printCOFFDirectives();
|
||||
if (opts::COFFBaseRelocs)
|
||||
Dumper->printCOFFBaseReloc();
|
||||
|
||||
if (opts::PrintStackMap)
|
||||
Dumper->printStackMap();
|
||||
}
|
||||
|
||||
/// @brief Dumps each object file in \a Arc;
|
||||
|
||||
Reference in New Issue
Block a user