1 /* radare - LGPL - Copyright 2009-2017 - pancake */ 2 3 #include <r_bp.h> 4 #include <r_lib.h> 5 6 static struct r_bp_arch_t r_bp_plugin_arm_bps[] = { 7 { 64, 4, 0, (const ut8*)"\x00\x00\x20\xd4" }, // le - arm64 brk0 8 { 64, 4, 1, (const ut8*)"\xd4\x20\x00\x00" }, // be - arm64 9 //{ 64, 1, 0, (const ut8*)"\xfe\xde\xff\xe7" }, // le - arm64 // hacky fix 10 11 {32, 4, 0, (const ut8*)"\xf0\x01\xf0\xe7" }, // eabi-le - undefined instruction - for all kernels 12 {32, 4, 1, (const ut8*)"\xe7\xf0\x01\xf0" }, // eabi-be 13 14 // { 32, 1, 0, (const ut8*)"\xff\xff\xff\xff" }, // le - linux only? (undefined instruction) 15 // { 32, 1, 1, (const ut8*)"\xff\xff\xff\xff" }, // be - linux only? (undefined instruction) 16 // { 32, 4, 0, (const ut8*)"\x01\x00\x9f\xef" }, // le - linux only? (undefined instruction) 17 // { 32, 4, 1, (const ut8*)"\xef\x9f\x00\x01" }, // be 18 #if 0 19 { 4, 0, (const ut8*)"\xfe\xde\xff\xe7" }, // arm-le - from a gdb patch 20 { 4, 1, (const ut8*)"\xe7\xff\xde\xfe" }, // arm-be 21 { 4, 0, (const ut8*)"\xf0\x01\xf0\xe7" }, // eabi-le - undefined instruction - for all kernels 22 { 4, 1, (const ut8*)"\xe7\xf0\x01\xf0" }, // eabi-be 23 #endif 24 { 16, 2, 0, (const ut8*)"\x01\xbe" }, // thumb-le 25 { 16, 2, 1, (const ut8*)"\xbe\x01" }, // thumb-be 26 { 16, 2, 0, (const ut8*)"\xfe\xdf" }, // arm-thumb-le 27 { 16, 2, 1, (const ut8*)"\xdf\xfe" }, // arm-thumb-be 28 { 16, 4, 0, (const ut8*)"\xff\xff\xff\xff" }, // arm-thumb-le 29 { 16, 4, 1, (const ut8*)"\xff\xff\xff\xff" }, // arm-thumb-be 30 { 0, 0, 0, NULL } 31 }; 32 33 struct r_bp_plugin_t r_bp_plugin_arm = { 34 .name = "arm", 35 .arch = "arm", 36 .nbps = 9, 37 .bps = r_bp_plugin_arm_bps, 38 }; 39 40 #ifndef R2_PLUGIN_INCORE 41 R_API RLibStruct radare_plugin = { 42 .type = R_LIB_TYPE_BP, 43 .data = &r_bp_plugin_arm, 44 .version = R2_VERSION 45 }; 46 #endif 47