2014-05-24 20:50:23 +08:00
|
|
|
//===- AArch64ExternalSymbolizer.h - Symbolizer for AArch64 -----*- C++ -*-===//
|
2014-04-12 04:07:58 +08:00
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// 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
|
2014-04-12 04:07:58 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2014-05-24 20:50:23 +08:00
|
|
|
// Symbolize AArch64 assembly code during disassembly using callbacks.
|
2014-04-12 04:07:58 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-14 00:26:38 +08:00
|
|
|
#ifndef LLVM_LIB_TARGET_AARCH64_DISASSEMBLER_AARCH64EXTERNALSYMBOLIZER_H
|
|
|
|
#define LLVM_LIB_TARGET_AARCH64_DISASSEMBLER_AARCH64EXTERNALSYMBOLIZER_H
|
2014-04-12 04:07:58 +08:00
|
|
|
|
2016-01-27 00:44:37 +08:00
|
|
|
#include "llvm/MC/MCDisassembler/MCExternalSymbolizer.h"
|
2014-04-12 04:07:58 +08:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2014-05-24 20:50:23 +08:00
|
|
|
class AArch64ExternalSymbolizer : public MCExternalSymbolizer {
|
2014-04-12 04:07:58 +08:00
|
|
|
public:
|
2014-05-24 20:50:23 +08:00
|
|
|
AArch64ExternalSymbolizer(MCContext &Ctx,
|
|
|
|
std::unique_ptr<MCRelocationInfo> RelInfo,
|
|
|
|
LLVMOpInfoCallback GetOpInfo,
|
|
|
|
LLVMSymbolLookupCallback SymbolLookUp,
|
|
|
|
void *DisInfo)
|
|
|
|
: MCExternalSymbolizer(Ctx, std::move(RelInfo), GetOpInfo, SymbolLookUp,
|
|
|
|
DisInfo) {}
|
2014-04-12 04:07:58 +08:00
|
|
|
|
|
|
|
bool tryAddingSymbolicOperand(MCInst &MI, raw_ostream &CommentStream,
|
|
|
|
int64_t Value, uint64_t Address, bool IsBranch,
|
|
|
|
uint64_t Offset, uint64_t InstSize) override;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace llvm
|
|
|
|
|
|
|
|
#endif
|