Make encode_actions_rsp use std::vector
Currently, encode_actions_rsp returns two malloc'ed arrays of malloc'ed strings (char *) by pointer. Change this to use std::vector<std::string>. This eliminates some cleanups in remote.c. Regtested on the buildbot. gdb/ChangeLog: * tracepoint.h (class collection_list) <stringify>: Return std::vector<std::string>. (encode_actions_rsp): Change parameters to std::vector<std::string> *. * tracepoint.c (collection_list::stringify): Return std::vector<std::string> and adjust accordingly. (encode_actions_rsp): Changee parameters to std::vector<std::string> and adjust accordingly. * remote.c (free_actions_list), free_actions_list_cleanup_wrapper): Remove. (remote_download_tracepoint): Adjust to std::vector.
This commit is contained in:
parent
dc8d2d90da
commit
b44ec61915
4 changed files with 65 additions and 94 deletions
|
@ -269,7 +269,7 @@ public:
|
|||
|
||||
void finish ();
|
||||
|
||||
char **stringify ();
|
||||
std::vector<std::string> stringify ();
|
||||
|
||||
const std::vector<std::string> &wholly_collected ()
|
||||
{ return m_wholly_collected; }
|
||||
|
@ -328,7 +328,8 @@ extern void encode_actions (struct bp_location *tloc,
|
|||
struct collection_list *stepping_list);
|
||||
|
||||
extern void encode_actions_rsp (struct bp_location *tloc,
|
||||
char ***tdp_actions, char ***stepping_actions);
|
||||
std::vector<std::string> *tdp_actions,
|
||||
std::vector<std::string> *stepping_actions);
|
||||
|
||||
extern void validate_actionline (const char *, struct breakpoint *);
|
||||
extern void validate_trace_state_variable_name (const char *name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue