diff options
author | Chris Lattner <sabre@nondot.org> | 2002-12-03 06:09:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-12-03 06:09:26 +0000 |
commit | ffe6eac6a21e9f8a40a3b33faecd20fd289e933a (patch) | |
tree | c0ae05400cf2c662ea476cd1c747e6f348936f9e /tools | |
parent | b1ed0fc6308885c5887ed0474e8a4fbf63a39b45 (diff) | |
download | external_llvm-ffe6eac6a21e9f8a40a3b33faecd20fd289e933a.zip external_llvm-ffe6eac6a21e9f8a40a3b33faecd20fd289e933a.tar.gz external_llvm-ffe6eac6a21e9f8a40a3b33faecd20fd289e933a.tar.bz2 |
Implement trivially simple debugger for MachineCodeEmitter interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4880 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/jello/jello.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/jello/jello.cpp b/tools/jello/jello.cpp index aaf115a..879076f 100644 --- a/tools/jello/jello.cpp +++ b/tools/jello/jello.cpp @@ -18,10 +18,23 @@ #include "llvm/CodeGen/MachineCodeEmitter.h" - +#include "llvm/CodeGen/MachineFunction.h" struct JelloMachineCodeEmitter : public MachineCodeEmitter { + void startFunction(MachineFunction &F) { + std::cout << "\n**** Writing machine code for function: " + << F.getFunction()->getName() << "\n"; + } + void startBasicBlock(MachineBasicBlock &BB) { + std::cout << "\n--- Basic Block: " << BB.getBasicBlock()->getName() << "\n"; + } + void emitByte(unsigned char B) { + std::cout << "0x" << std::hex << (unsigned int)B << std::dec << " "; + } + void emitPCRelativeDisp(Value *V) { + std::cout << "<" << V->getName() << ": 0x00 0x00 0x00 0x00> "; + } }; |