Skip to content

Commit 55afe17

Browse files
MewtRtrufae
authored andcommitted
Use RPluginMeta in bp plugins
1 parent cc32b30 commit 55afe17

File tree

11 files changed

+60
-16
lines changed

11 files changed

+60
-16
lines changed

libr/bp/bp_plugin.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ R_API int r_bp_plugin_del(RBreakpoint *bp, const char *name) {
77
RBreakpointPlugin *h;
88
if (name && *name) {
99
r_list_foreach (bp->plugins, iter, h) {
10-
if (!strcmp (h->name, name)) {
10+
if (!strcmp (h->meta.name, name)) {
1111
if (bp->cur == h) {
1212
bp->cur = NULL;
1313
}
@@ -29,7 +29,7 @@ R_API int r_bp_plugin_add(RBreakpoint *bp, RBreakpointPlugin *foo) {
2929
}
3030
/* avoid dupped plugins */
3131
r_list_foreach (bp->bps, iter, h) {
32-
if (!strcmp (h->name, foo->name)) {
32+
if (!strcmp (h->meta.name, foo->meta.name)) {
3333
return false;
3434
}
3535
}
@@ -48,7 +48,7 @@ R_API int r_bp_use(RBreakpoint *bp, const char *name, int bits) {
4848
bp->bits = bits;
4949
RBreakpointPlugin *h;
5050
r_list_foreach (bp->plugins, iter, h) {
51-
if (!strcmp (h->name, name)) {
51+
if (!strcmp (h->meta.name, name)) {
5252
bp->cur = h;
5353
return true;
5454
}
@@ -62,7 +62,7 @@ R_API void r_bp_plugin_list(RBreakpoint *bp) {
6262
RBreakpointPlugin *b;
6363
r_list_foreach (bp->plugins, iter, b) {
6464
bp->cb_printf ("bp %c %s\n",
65-
(bp->cur && !strcmp (bp->cur->name, b->name))? '*': '-',
66-
b->name);
65+
(bp->cur && !strcmp (bp->cur->meta.name, b->meta.name))? '*': '-',
66+
b->meta.name);
6767
}
6868
}

libr/bp/p/bp_arm.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ static RBreakpointArch r_bp_plugin_arm_bps[] = {
3131
};
3232

3333
RBreakpointPlugin r_bp_plugin_arm = {
34-
.name = "arm",
34+
.meta = {
35+
.name = "arm",
36+
.desc = "",
37+
.author = "pancake",
38+
.license = "LGPL-3.0-only",
39+
},
3540
.arch = "arm",
3641
.nbps = 10,
3742
.bps = r_bp_plugin_arm_bps,

libr/bp/p/bp_bf.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ static RBreakpointArch r_bp_plugin_bf_bps[] = {
1010
};
1111

1212
RBreakpointPlugin r_bp_plugin_bf = {
13-
.name = "bf",
13+
.meta = {
14+
.name = "bf",
15+
.desc = "",
16+
.author = "pancake",
17+
.license = "LGPL-3.0-only",
18+
},
1419
.arch = "bf",
1520
.nbps = 2,
1621
.bps = r_bp_plugin_bf_bps,

libr/bp/p/bp_mips.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ static RBreakpointArch r_bp_plugin_mips_bps[] = {
1212
};
1313

1414
RBreakpointPlugin r_bp_plugin_mips = {
15-
.name = "mips",
15+
.meta = {
16+
.name = "mips",
17+
.desc = "",
18+
.author = "pancake",
19+
.license = "LGPL-3.0-only",
20+
},
1621
.arch = "mips",
1722
.nbps = 4,
1823
.bps = r_bp_plugin_mips_bps,

libr/bp/p/bp_null.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ static RBreakpointArch r_bp_plugin_null_bps[] = {
88
};
99

1010
RBreakpointPlugin r_bp_plugin_null = {
11-
.name = "null",
11+
.meta = {
12+
.name = "null",
13+
.desc = "",
14+
.author = "pancake",
15+
.license = "LGPL-3.0-only",
16+
},
1217
.arch = "null",
1318
.nbps = 0,
1419
.bps = r_bp_plugin_null_bps,

libr/bp/p/bp_ppc.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ static RBreakpointArch r_bp_plugin_ppc_bps[] = {
1111
};
1212

1313
RBreakpointPlugin r_bp_plugin_ppc = {
14-
.name = "ppc",
14+
.meta = {
15+
.name = "ppc",
16+
.desc = "",
17+
.author = "pancake",
18+
.license = "LGPL-3.0-only",
19+
},
1520
.arch = "ppc",
1621
.nbps = 2,
1722
.bps = r_bp_plugin_ppc_bps,

libr/bp/p/bp_riscv.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ static RBreakpointArch r_bp_plugin_riscv_bps[] = {
1010
};
1111

1212
RBreakpointPlugin r_bp_plugin_riscv = {
13-
.name = "riscv",
13+
.meta = {
14+
.name = "riscv",
15+
.desc = "",
16+
.author = "pancake",
17+
.license = "LGPL-3.0-only",
18+
},
1419
.arch = "riscv",
1520
.nbps = 2,
1621
.bps = r_bp_plugin_riscv_bps,

libr/bp/p/bp_s390x.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ static RBreakpointArch r_bp_plugin_s390x_bps[] = {
1111
};
1212

1313
RBreakpointPlugin r_bp_plugin_s390x = {
14-
.name = "s390",
14+
.meta = {
15+
.name = "s390",
16+
.desc = "",
17+
.author = "pancake",
18+
.license = "LGPL-3.0-only",
19+
},
1520
.arch = "s390",
1621
.nbps = 3,
1722
.bps = r_bp_plugin_s390x_bps,

libr/bp/p/bp_sh.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ static RBreakpointArch r_bp_plugin_sh_bps[] = {
1010
};
1111

1212
RBreakpointPlugin r_bp_plugin_sh = {
13-
.name = "sh",
13+
.meta = {
14+
.name = "sh",
15+
.desc = "",
16+
.author = "pancake",
17+
.license = "LGPL-3.0-only",
18+
},
1419
.arch = "sh",
1520
.nbps = 2,
1621
.bps = r_bp_plugin_sh_bps,

libr/bp/p/bp_x86.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ static RBreakpointArch r_bp_plugin_x86_bps[] = {
1010
};
1111

1212
RBreakpointPlugin r_bp_plugin_x86 = {
13-
.name = "x86",
13+
.meta = {
14+
.name = "x86",
15+
.desc = "",
16+
.author = "pancake",
17+
.license = "LGPL-3.0-only",
18+
},
1419
.arch = "x86",
1520
.nbps = 2,
1621
.bps = r_bp_plugin_x86_bps,

0 commit comments

Comments
 (0)