Adjust bpcount and use typedefs instead of structs in bps ##debug

This commit is contained in:
pancake 2023-04-12 00:32:22 +00:00
parent 9a43f62e53
commit 29fad286b2
7 changed files with 21 additions and 21 deletions

View File

@ -1,9 +1,9 @@
/* radare - LGPL - Copyright 2009-2017 - pancake */
/* radare - LGPL - Copyright 2009-2023 - pancake */
#include <r_bp.h>
#include <r_lib.h>
static struct r_bp_arch_t r_bp_plugin_arm_bps[] = {
static RBreakpointArch r_bp_plugin_arm_bps[] = {
{ 64, 4, 0, (const ut8*)"\x00\x00\x20\xd4" }, // le - arm64 brk0
{ 64, 4, 1, (const ut8*)"\xd4\x20\x00\x00" }, // be - arm64
//{ 64, 1, 0, (const ut8*)"\xfe\xde\xff\xe7" }, // le - arm64 // hacky fix
@ -30,10 +30,10 @@ static struct r_bp_arch_t r_bp_plugin_arm_bps[] = {
{ 0, 0, 0, NULL }
};
struct r_bp_plugin_t r_bp_plugin_arm = {
RBreakpointPlugin r_bp_plugin_arm = {
.name = "arm",
.arch = "arm",
.nbps = 9,
.nbps = 10,
.bps = r_bp_plugin_arm_bps,
};

View File

@ -1,15 +1,15 @@
/* radare - LGPL - Copyright 2011 pancake<nopcode.org> */
/* radare - LGPL - Copyright 2011-2023 - pancake */
#include <r_bp.h>
#include <r_lib.h>
static struct r_bp_arch_t r_bp_plugin_bf_bps[] = {
static RBreakpointArch r_bp_plugin_bf_bps[] = {
{ 0, 1, 0, (const ut8*)"\xff" },
{ 0, 1, 0, (const ut8*)"\x00" },
{ 0, 0, 0, NULL },
};
struct r_bp_plugin_t r_bp_plugin_bf = {
RBreakpointPlugin r_bp_plugin_bf = {
.name = "bf",
.arch = "bf",
.nbps = 2,

View File

@ -1,9 +1,9 @@
/* radare2 - LGPL - Copyright 2010-2015 - pancake */
/* radare2 - LGPL - Copyright 2010-2023 - pancake */
#include <r_bp.h>
#include <r_lib.h>
static struct r_bp_arch_t r_bp_plugin_mips_bps[] = {
static RBreakpointArch r_bp_plugin_mips_bps[] = {
{ 32, 4, 0, (const ut8*)"\x0d\x00\x00\x00" },
{ 32, 4, 1, (const ut8*)"\x00\x00\x00\x0d" },
{ 64, 4, 0, (const ut8*)"\x0d\x00\x00\x00" },
@ -11,10 +11,10 @@ static struct r_bp_arch_t r_bp_plugin_mips_bps[] = {
{ 0, 0, 0, NULL }
};
struct r_bp_plugin_t r_bp_plugin_mips = {
RBreakpointPlugin r_bp_plugin_mips = {
.name = "mips",
.arch = "mips",
.nbps = 10,
.nbps = 4,
.bps = r_bp_plugin_mips_bps,
};

View File

@ -1,16 +1,16 @@
/* radare - LGPL - Copyright 2010 pancake<nopcode.org> */
/* radare - LGPL - Copyright 2010-2023 - pancake */
#include <r_bp.h>
#include <r_lib.h>
static struct r_bp_arch_t r_bp_plugin_ppc_bps[] = {
static RBreakpointArch r_bp_plugin_ppc_bps[] = {
/* XXX: FIX those are not really breakpoint opcodes at all */
{ 32, 4, 0, (const ut8*)"\x00\x00\x00\x0d" }, // little endian
{ 32, 4, 1, (const ut8*)"\x0d\x00\x00\x00" }, // big endian
{ 0, 0, 0, NULL }
};
struct r_bp_plugin_t r_bp_plugin_ppc = {
RBreakpointPlugin r_bp_plugin_ppc = {
.name = "ppc",
.arch = "ppc",
.nbps = 2,

View File

@ -3,13 +3,13 @@
#include <r_bp.h>
#include <r_lib.h>
static struct r_bp_arch_t r_bp_plugin_riscv_bps[] = {
static RBreakpointArch r_bp_plugin_riscv_bps[] = {
{ 32, 2, 0, (const ut8*)"\x02\x90" },
{ 64, 4, 0, (const ut8*)"\x02\x90\x02\x90" },
{ 0, 0, 0, NULL }
};
struct r_bp_plugin_t r_bp_plugin_riscv = {
RBreakpointPlugin r_bp_plugin_riscv = {
.name = "riscv",
.arch = "riscv",
.nbps = 2,

View File

@ -3,13 +3,13 @@
#include <r_bp.h>
#include <r_lib.h>
static struct r_bp_arch_t r_bp_plugin_sh_bps[] = {
static RBreakpointArch r_bp_plugin_sh_bps[] = {
{ 32, 2, 0, (const ut8*)"\x20\xc3" }, //Little endian bp
{ 32, 2, 1, (const ut8*)"\xc3\x20" }, //Big endian bp
{ 0, 0, 0, NULL },
};
struct r_bp_plugin_t r_bp_plugin_sh = {
RBreakpointPlugin r_bp_plugin_sh = {
.name = "sh",
.arch = "sh",
.nbps = 2,

View File

@ -1,15 +1,15 @@
/* radare - LGPL - Copyright 2009-2015 - pancake */
/* radare - LGPL - Copyright 2009-2023 - pancake */
#include <r_bp.h>
#include <r_lib.h>
static struct r_bp_arch_t r_bp_plugin_x86_bps[] = {
static RBreakpointArch r_bp_plugin_x86_bps[] = {
{ 0, 1, 0, (const ut8*)"\xcc" }, // valid for 16, 32, 64
{ 0, 2, 0, (const ut8*)"\xcd\x03" },
{ 0, 0, 0, NULL },
};
struct r_bp_plugin_t r_bp_plugin_x86 = {
RBreakpointPlugin r_bp_plugin_x86 = {
.name = "x86",
.arch = "x86",
.nbps = 2,