mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
Get rid of VEC(probe_p)
Replace the remaining usages of VEC(probe_p) with std::vector. Regtested on the buildbot. gdb/ChangeLog: * probe.h: Don't include gdb_vecs.h. (DEF_VEC_P (probe_p)): Remove. (find_probes_in_objfile): Return an std::vector. * probe.c (find_probes_in_objfile): Likewise. * breakpoint.c (breakpoint_objfile_data) <longjmp_probes>: Change type to std::vector. <exception_probes>: Likewise. (free_breakpoint_probes): Don't manually free vectors. (create_longjmp_master_breakpoint): Adjust. (create_exception_master_breakpoint): Adjust. * solib-svr4.c (svr4_create_probe_breakpoints): Change parameter type, adjust. (svr4_create_solib_event_breakpoints): Adjust.
This commit is contained in:
@ -193,14 +193,14 @@ parse_probes (const struct event_location *location,
|
||||
|
||||
/* See definition in probe.h. */
|
||||
|
||||
VEC (probe_p) *
|
||||
std::vector<probe *>
|
||||
find_probes_in_objfile (struct objfile *objfile, const char *provider,
|
||||
const char *name)
|
||||
{
|
||||
VEC (probe_p) *result = NULL;
|
||||
std::vector<probe *> result;
|
||||
|
||||
if (!objfile->sf || !objfile->sf->sym_probe_fns)
|
||||
return NULL;
|
||||
return result;
|
||||
|
||||
const std::vector<probe *> &probes
|
||||
= objfile->sf->sym_probe_fns->sym_get_probes (objfile);
|
||||
@ -212,7 +212,7 @@ find_probes_in_objfile (struct objfile *objfile, const char *provider,
|
||||
if (strcmp (p->name, name) != 0)
|
||||
continue;
|
||||
|
||||
VEC_safe_push (probe_p, result, p);
|
||||
result.push_back (p);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user