003 File Manager
Current Path:
/usr/src/contrib/llvm-project/lld/lib/ReaderWriter/MachO
usr
/
src
/
contrib
/
llvm-project
/
lld
/
lib
/
ReaderWriter
/
MachO
/
📁
..
📄
ArchHandler.cpp
(4.36 KB)
📄
ArchHandler.h
(12.86 KB)
📄
ArchHandler_arm.cpp
(54.53 KB)
📄
ArchHandler_arm64.cpp
(33.86 KB)
📄
ArchHandler_x86.cpp
(24.04 KB)
📄
ArchHandler_x86_64.cpp
(33.45 KB)
📄
Atoms.h
(5.45 KB)
📄
CompactUnwindPass.cpp
(21.9 KB)
📄
DebugInfo.h
(2.52 KB)
📄
ExecutableAtoms.h
(4.69 KB)
📄
File.h
(17.28 KB)
📄
FlatNamespaceFile.h
(1.87 KB)
📄
GOTPass.cpp
(6.58 KB)
📄
LayoutPass.cpp
(18.19 KB)
📄
LayoutPass.h
(4.19 KB)
📄
MachOLinkingContext.cpp
(33.61 KB)
📄
MachONormalizedFile.h
(11.47 KB)
📄
MachONormalizedFileBinaryReader.cpp
(22.82 KB)
📄
MachONormalizedFileBinaryUtils.h
(6.93 KB)
📄
MachONormalizedFileBinaryWriter.cpp
(56.33 KB)
📄
MachONormalizedFileFromAtoms.cpp
(61.05 KB)
📄
MachONormalizedFileToAtoms.cpp
(65.46 KB)
📄
MachONormalizedFileYAML.cpp
(31.45 KB)
📄
MachOPasses.h
(1.11 KB)
📄
ObjCPass.cpp
(3.54 KB)
📄
SectCreateFile.h
(3.01 KB)
📄
ShimPass.cpp
(4.59 KB)
📄
StubsPass.cpp
(12.03 KB)
📄
TLVPass.cpp
(4.02 KB)
📄
WriterMachO.cpp
(2.33 KB)
Editing: DebugInfo.h
//===- lib/ReaderWriter/MachO/File.h ----------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLD_READER_WRITER_MACHO_DEBUGINFO_H #define LLD_READER_WRITER_MACHO_DEBUGINFO_H #include "lld/Core/Atom.h" #include <vector> #include "llvm/Support/Allocator.h" #include "llvm/Support/Format.h" #include "llvm/Support/raw_ostream.h" namespace lld { namespace mach_o { class DebugInfo { public: enum class Kind { Dwarf, Stabs }; Kind kind() const { return _kind; } void setAllocator(std::unique_ptr<llvm::BumpPtrAllocator> allocator) { _allocator = std::move(allocator); } protected: DebugInfo(Kind kind) : _kind(kind) {} private: std::unique_ptr<llvm::BumpPtrAllocator> _allocator; Kind _kind; }; struct TranslationUnitSource { StringRef name; StringRef path; }; class DwarfDebugInfo : public DebugInfo { public: DwarfDebugInfo(TranslationUnitSource tu) : DebugInfo(Kind::Dwarf), _tu(std::move(tu)) {} static inline bool classof(const DebugInfo *di) { return di->kind() == Kind::Dwarf; } const TranslationUnitSource &translationUnitSource() const { return _tu; } private: TranslationUnitSource _tu; }; struct Stab { Stab(const Atom* atom, uint8_t type, uint8_t other, uint16_t desc, uint32_t value, StringRef str) : atom(atom), type(type), other(other), desc(desc), value(value), str(str) {} const class Atom* atom; uint8_t type; uint8_t other; uint16_t desc; uint32_t value; StringRef str; }; inline raw_ostream& operator<<(raw_ostream &os, Stab &s) { os << "Stab -- atom: " << llvm::format("%p", s.atom) << ", type: " << (uint32_t)s.type << ", other: " << (uint32_t)s.other << ", desc: " << s.desc << ", value: " << s.value << ", str: '" << s.str << "'"; return os; } class StabsDebugInfo : public DebugInfo { public: typedef std::vector<Stab> StabsList; StabsDebugInfo(StabsList stabs) : DebugInfo(Kind::Stabs), _stabs(std::move(stabs)) {} static inline bool classof(const DebugInfo *di) { return di->kind() == Kind::Stabs; } const StabsList& stabs() const { return _stabs; } public: StabsList _stabs; }; } // end namespace mach_o } // end namespace lld #endif // LLD_READER_WRITER_MACHO_DEBUGINFO_H
Upload File
Create Folder