forked from gdbinit/MachOView
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include its source code instead of the dynamic library. Fix Prefix.pch and move c++ includes to the files that use them to avoid problems with Capstone.
- Loading branch information
reverser
committed
Nov 20, 2014
1 parent
cae41e7
commit d356665
Showing
107 changed files
with
716,628 additions
and
1,011 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
//===- llvm/Support/LEB128.h - [SU]LEB128 utility functions -----*- C++ -*-===// | ||
// | ||
// The LLVM Compiler Infrastructure | ||
// | ||
// This file is distributed under the University of Illinois Open Source | ||
// License. See LICENSE.TXT for details. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This file declares some utility functions for encoding SLEB128 and | ||
// ULEB128 values. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
/* Capstone Disassembly Engine */ | ||
/* By Nguyen Anh Quynh <[email protected]>, 2013-2014 */ | ||
|
||
#ifndef CS_LLVM_SUPPORT_LEB128_H | ||
#define CS_LLVM_SUPPORT_LEB128_H | ||
|
||
#include <stdint.h> | ||
|
||
/// Utility function to decode a ULEB128 value. | ||
static inline uint64_t decodeULEB128(const uint8_t *p, unsigned *n) | ||
{ | ||
const uint8_t *orig_p = p; | ||
uint64_t Value = 0; | ||
unsigned Shift = 0; | ||
do { | ||
Value += (*p & 0x7f) << Shift; | ||
Shift += 7; | ||
} while (*p++ >= 128); | ||
if (n) | ||
*n = (unsigned)(p - orig_p); | ||
return Value; | ||
} | ||
|
||
#endif // LLVM_SYSTEM_LEB128_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* Capstone Disassembly Engine */ | ||
/* By Nguyen Anh Quynh <[email protected]>, 2013-2014 */ | ||
|
||
#ifndef CS_MCDISASSEMBLER_H | ||
#define CS_MCDISASSEMBLER_H | ||
|
||
typedef enum DecodeStatus { | ||
MCDisassembler_Fail = 0, | ||
MCDisassembler_SoftFail = 1, | ||
MCDisassembler_Success = 3, | ||
} DecodeStatus; | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//===-- llvm/MC/MCFixedLenDisassembler.h - Decoder driver -------*- C++ -*-===// | ||
// | ||
// The LLVM Compiler Infrastructure | ||
// | ||
// This file is distributed under the University of Illinois Open Source | ||
// License. See LICENSE.TXT for details. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// Fixed length disassembler decoder state machine driver. | ||
//===----------------------------------------------------------------------===// | ||
|
||
/* Capstone Disassembly Engine */ | ||
/* By Nguyen Anh Quynh <[email protected]>, 2013-2014 */ | ||
|
||
#ifndef CS_LLVM_MC_MCFIXEDLENDISASSEMBLER_H | ||
#define CS_LLVM_MC_MCFIXEDLENDISASSEMBLER_H | ||
|
||
// Disassembler state machine opcodes. | ||
enum DecoderOps { | ||
MCD_OPC_ExtractField = 1, // OPC_ExtractField(uint8_t Start, uint8_t Len) | ||
MCD_OPC_FilterValue, // OPC_FilterValue(uleb128 Val, uint16_t NumToSkip) | ||
MCD_OPC_CheckField, // OPC_CheckField(uint8_t Start, uint8_t Len, | ||
// uleb128 Val, uint16_t NumToSkip) | ||
MCD_OPC_CheckPredicate, // OPC_CheckPredicate(uleb128 PIdx, uint16_t NumToSkip) | ||
MCD_OPC_Decode, // OPC_Decode(uleb128 Opcode, uleb128 DIdx) | ||
MCD_OPC_SoftFail, // OPC_SoftFail(uleb128 PMask, uleb128 NMask) | ||
MCD_OPC_Fail // OPC_Fail() | ||
}; | ||
|
||
#endif |
Oops, something went wrong.