This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Use std::vector in uploaded_tp


*** TEST RESULTS FOR COMMIT a18ba4e4c9d64eeb2ea65e5315fbd8b4261a1756 ***

Author: Simon Marchi <simon.marchi@polymtl.ca>
Branch: master
Commit: a18ba4e4c9d64eeb2ea65e5315fbd8b4261a1756

Use std::vector in uploaded_tp

This patch changes the VEC(char_ptr) fields in uploaded_tp to use
std::vector<char *>.  At first, I wanted to creep in more changes, like
using std::string, but it was making the patch too big and less focused,
so I decided to keep it to just that.

It also looks like the strings in those vectors are never free'd.  If
so, we can fix that in another patch.

gdb/ChangeLog:

	* tracepoint.h (struct uploaded_tp): Initialize fields.
	<actions, step_actions, cmd_strings>: Change type to
	std::vector<char *>.
	* tracepoint.c (get_uploaded_tp): Allocate with new.
	(free_uploaded_tps): Free with delete.
	(parse_tracepoint_definition): Adjust to std::vector change.
	* breakpoint.c (read_uploaded_action): Likewise.
	(create_tracepoint_from_upload): Likewise.
	* ctf.c (ctf_write_uploaded_tp): Likewise.
	(SET_ARRAY_FIELD): Likewise.
	* tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]