Definition at line 9 of file TestXcore.java.
◆ hex() [1/2]
Definition at line 25 of file TestXcore.java.
26 return Integer.toString(
i, 16);
References i.
◆ hex() [2/2]
Definition at line 29 of file TestXcore.java.
30 return Long.toString(
i, 16);
References i.
◆ hexString2Byte()
static byte [] TestXcore.hexString2Byte |
( |
String |
s | ) |
|
|
inlinestaticpackage |
Definition at line 10 of file TestXcore.java.
13 byte[] data =
new byte[
len / 2];
14 for (
int i = 0;
i <
len;
i += 2) {
15 data[
i / 2] = (byte) ((Character.digit(
s.charAt(
i), 16) << 4)
16 + Character.digit(
s.charAt(
i+1), 16));
References i, len, and s.
Referenced by main().
◆ main()
static void TestXcore.main |
( |
String |
argv[] | ) |
|
|
inlinestatic |
Definition at line 61 of file TestXcore.java.
69 System.out.println(
new String(
new char[16]).
replace(
"\0",
"*"));
70 System.out.println(
"Platform: " +
test.comment);
72 System.out.println(
"Disasm:");
75 cs.setDetail(Capstone.CS_OPT_ON);
76 Capstone.CsInsn[] all_ins =
cs.disasm(
test.code, 0x1000);
78 for (
int j = 0; j < all_ins.length; j++) {
82 System.out.printf(
"0x%x:\n\n", (all_ins[all_ins.length-1].address + all_ins[all_ins.length-1].size));
static String stringToHex(byte[] code)
static void print_ins_detail(Capstone.CsInsn ins)
static final String XCORE_CODE
static byte[] hexString2Byte(String s)
int replace(char *string, const char *token, const char *fmt,...)
References test_arm.all_tests, cs, hexString2Byte(), i, print_ins_detail(), replace(), TestBasic.stringToHex(), and XCORE_CODE.
◆ print_ins_detail()
static void TestXcore.print_ins_detail |
( |
Capstone.CsInsn |
ins | ) |
|
|
inlinestatic |
Definition at line 33 of file TestXcore.java.
34 System.out.printf(
"0x%x:\t%s\t%s\n", ins.address, ins.mnemonic, ins.opStr);
39 System.out.printf(
"\top_count: %d\n",
operands.op.length);
43 System.out.printf(
"\t\toperands[%d].type: REG = %s\n",
c, ins.regName(
i.value.reg));
45 System.out.printf(
"\t\toperands[%d].type: IMM = 0x%x\n",
c,
i.value.imm);
47 System.out.printf(
"\t\toperands[%d].type: MEM\n",
c);
49 System.out.printf(
"\t\t\toperands[%d].mem.base: REG = %s\n",
c, ins.regName(
i.value.mem.base));
51 System.out.printf(
"\t\t\toperands[%d].mem.index: REG = %s\n",
c, ins.regName(
i.value.mem.index));
52 if (
i.value.mem.disp != 0)
53 System.out.printf(
"\t\t\toperands[%d].mem.disp: 0x%x\n",
c,
i.value.mem.disp);
54 if (
i.value.mem.direct != 1)
55 System.out.printf(
"\t\t\toperands[%d].mem.direct: -1\n",
c);
@ XCORE_OP_REG
= CS_OP_REG (Register operand).
@ XCORE_OP_IMM
= CS_OP_IMM (Immediate operand).
@ XCORE_OP_MEM
= CS_OP_MEM (Memory operand).
if(dbg->bits==RZ_SYS_BITS_64)
References c, i, if(), XCORE_OP_IMM, XCORE_OP_MEM, XCORE_OP_REG, and XCORE_REG_INVALID.
Referenced by main().
◆ cs
◆ XCORE_CODE
final String TestXcore.XCORE_CODE = "fe0ffe171317c6feec1797f8ec4f1ffdec3707f2455bf9fa02061b1009fdeca7" |
|
staticpackage |
The documentation for this class was generated from the following file: