1 | //===- tools/dsymutil/dsymutil.h - dsymutil high-level functionality ------===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | // |
9 | /// \file |
10 | /// |
11 | /// This file contains the class declaration for the code that parses STABS |
12 | /// debug maps that are embedded in the binaries symbol tables. |
13 | // |
14 | //===----------------------------------------------------------------------===// |
15 | |
16 | #ifndef LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H |
17 | #define LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H |
18 | |
19 | #include "BinaryHolder.h" |
20 | #include "DebugMap.h" |
21 | #include "LinkUtils.h" |
22 | #include "llvm/ADT/ArrayRef.h" |
23 | #include "llvm/ADT/StringRef.h" |
24 | #include "llvm/Support/Compiler.h" |
25 | #include "llvm/Support/ErrorOr.h" |
26 | #include <memory> |
27 | #include <string> |
28 | #include <vector> |
29 | |
30 | namespace llvm { |
31 | namespace dsymutil { |
32 | |
33 | /// Extract the DebugMaps from the given file. |
34 | /// The file has to be a MachO object file. Multiple debug maps can be |
35 | /// returned when the file is universal (aka fat) binary. |
36 | ErrorOr<std::vector<std::unique_ptr<DebugMap>>> |
37 | parseDebugMap(BinaryHolder &BinHolder, StringRef InputFile, |
38 | ArrayRef<std::string> Archs, |
39 | ArrayRef<std::string> DSYMSearchPaths, StringRef PrependPath, |
40 | StringRef VariantSuffix, bool Verbose, bool InputIsYAML); |
41 | |
42 | /// Dump the symbol table. |
43 | bool dumpStab(BinaryHolder &BinHolder, StringRef InputFile, |
44 | ArrayRef<std::string> Archs, |
45 | ArrayRef<std::string> DSYMSearchPaths, StringRef PrependPath = "" , |
46 | StringRef VariantSuffix = "" ); |
47 | |
48 | } // end namespace dsymutil |
49 | } // end namespace llvm |
50 | |
51 | #endif // LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H |
52 | |