diff options
author | Pedro Alves <palves@redhat.com> | 2016-11-08 15:26:47 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-11-08 15:26:47 +0000 |
commit | 3cde5c42d1c1ddcf8bbde5c47233c644370c959c (patch) | |
tree | 887cf692d863e70717f3a3f957f99d82469ccee5 /gdb/breakpoint.h | |
parent | 833177a4a5c1a2a6cabe70bfe35ecf241b68d169 (diff) | |
download | gdb-3cde5c42d1c1ddcf8bbde5c47233c644370c959c.zip gdb-3cde5c42d1c1ddcf8bbde5c47233c644370c959c.tar.gz gdb-3cde5c42d1c1ddcf8bbde5c47233c644370c959c.tar.bz2 |
Eliminate agent_expr_p; VEC -> std::vector in struct bp_target_info
After the previous patch, we end up with these two types with quite
similar, and potentially confusing names:
typedef gdb::unique_ptr<agent_expr> agent_expr_up;
/* Pointer to an agent_expr structure. */
typedef struct agent_expr *agent_expr_p;
The latter is only necessary to put agent_expr pointers in VECs. So
just eliminate it and use std::vector instead.
gdb/ChangeLog:
2016-11-08 Pedro Alves <palves@redhat.com>
* ax.h (agent_expr_p): Delete.
(DEF_VEC_P (agent_expr_p)): Delete.
* breakpoint.c (build_target_condition_list)
(build_target_command_list): Adjust to use of std::vector.
(bp_location_dtor): Remove now unnecessary VEC_free calls.
* breakpoint.h: Include <vector>.
(struct bp_target_info) <conditions, tcommands>: Now
std::vector's.
* remote.c (remote_add_target_side_condition): bp_tgt->conditions
is now a std::vector; adjust.
(remote_add_target_side_commands, remote_insert_breakpoint):
bp_tgt->tcommands is now a std::vector; adjust.
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r-- | gdb/breakpoint.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index 8c2dfaf..99133a2 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -26,6 +26,7 @@ #include "command.h" #include "break-common.h" #include "probe.h" +#include <vector> struct value; struct block; @@ -264,13 +265,13 @@ struct bp_target_info packets. */ int kind; - /* Vector of conditions the target should evaluate if it supports target-side - breakpoint conditions. */ - VEC(agent_expr_p) *conditions; + /* Conditions the target should evaluate if it supports target-side + breakpoint conditions. These are non-owning pointers. */ + std::vector<agent_expr *> conditions; - /* Vector of commands the target should evaluate if it supports - target-side breakpoint commands. */ - VEC(agent_expr_p) *tcommands; + /* Commands the target should evaluate if it supports target-side + breakpoint commands. These are non-owning pointers. */ + std::vector<agent_expr *> tcommands; /* Flag that is true if the breakpoint should be left in place even when GDB is not connected. */ |