From 0782db848b52ecaf29e13d9f12a2c7cfabec2bdb Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Tue, 12 Sep 2017 14:15:23 +0200 Subject: probe: Replace VEC(probe_ops_cp) with std::vector This patch replaces the usage of VEC to store pointers to probe_ops with an std::vector. The sole usage of that vector type is one global variable that holds the ops for the various kinds of probes, so this is pretty straightforward (no allocation/deallocation issues). gdb/ChangeLog: * probe.h (probe_ops_cp): Remove typedef. (DEF_VEC_P (probe_ops_cp)): Remove. (all_probe_ops): Change type to std::vector. * probe.c (info_probes_for_ops): Adjust to vector change. (probe_linespec_to_ops): Likewise. (all_probe_ops): Change type to std::vector. (_initialize_probe): Adjust to vector change. * dtrace-probe.c (_initialize_dtrace_probe): Likewise. * elfread.c (elf_get_probes): Likewise. * stap-probe.c (_initialize_stap_probe): Likewise. --- gdb/dtrace-probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/dtrace-probe.c') diff --git a/gdb/dtrace-probe.c b/gdb/dtrace-probe.c index f9209ec..5a4daa3 100644 --- a/gdb/dtrace-probe.c +++ b/gdb/dtrace-probe.c @@ -912,7 +912,7 @@ info_probes_dtrace_command (char *arg, int from_tty) void _initialize_dtrace_probe (void) { - VEC_safe_push (probe_ops_cp, all_probe_ops, &dtrace_probe_ops); + all_probe_ops.push_back (&dtrace_probe_ops); add_cmd ("dtrace", class_info, info_probes_dtrace_command, _("\ -- cgit v1.1