binutils-gdb/gdb/unittests
Simon Marchi 5d9310c4b8 Get rid of VEC(static_tracepoint_marker_p)
This patch replaces VEC(static_tracepoint_marker_p) with std::vector,
and does some c++ification around that.  I thought a new overload of
hex2str was useful, so I added it as well as corresponding unit tests.
I also added an overload of ui_out::field_string that takes an
std::string directly.

gdb/ChangeLog:

	* tracepoint.h (struct static_tracepoint_marker): Initialize
	fields, define default constructor, move constructor and move
	assignment, disable the rest.
	<str_id, extra>: Make std::string.
	(release_static_tracepoint_marker): Remove.
	(free_current_marker): Remove.
	* tracepoint.c (free_current_marker): Remove.
	(parse_static_tracepoint_marker_definition): Adjust to
	std::string, use new hex2str overload.
	(release_static_tracepoint_marker): Remove.
	(print_one_static_tracepoint_marker): Get marker by reference
	and adjust to std::string.
	(info_static_tracepoint_markers_command): Adjust to std::vector
	changes
	* target.h (static_tracepoint_marker_p): Remove typedef.
	(DEF_VEC_P(static_tracepoint_marker_p)): Remove.
	(struct target_ops) <to_static_tracepoint_marker_at>: Return
	bool.
	<to_static_tracepoint_markers_by_strid>: Return std::vector.
	* target-debug.h
	(target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
	(target_debug_print_std_vector_static_tracepoint_marker): New.
	(target_debug_print_struct_static_tracepoint_marker_p): Rename
	to...
	(target_debug_print_static_tracepoint_marker_p): ... this.
	* target-delegates.c: Re-generate.
	* breakpoint.h (struct tracepoint) <static_trace_marker_id>:
	Make std::string.
	* breakpoint.c (init_breakpoint_sal): Adjust to std::string.
	(decode_static_tracepoint_spec): Adjust to std::vector.
	(tracepoint_print_one_detail): Adjust to std::string.
	(strace_marker_decode_location): Adjust to std::string.
	(update_static_tracepoint): Adjust to std::string, remove call
	to release_static_tracepoint_marker.
	* linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
	Adjust to std::vector.
	* remote.c (remote_static_tracepoint_marker_at): Return bool.
	(remote_static_tracepoint_markers_by_strid): Adjust to
	std::vector.
	* common/rsp-low.h (hex2str): New overload with explicit count
	of bytes.
	* common/rsp-low.c (hex2str): New overload with explicit count
	of bytes.
	* unittests/rsp-low-selftests.c (test_hex2str): New function.
	(_initialize_rsp_low_selftests): Add test_hex2str test.
	* unittests/tracepoint-selftests.c
	(test_parse_static_tracepoint_marker_definition): Adjust to
	std::string.
2018-03-22 00:27:19 -04:00
..
optional Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
array-view-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
common-utils-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
environ-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
function-view-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
lookup_name_info-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
memory-map-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
memrange-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
observable-selftests.c Convert observers to C++ 2018-03-19 09:37:49 -06:00
offset-type-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
optional-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
ptid-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
rsp-low-selftests.c Get rid of VEC(static_tracepoint_marker_p) 2018-03-22 00:27:19 -04:00
scoped_fd-selftests.c common: add scoped_fd 2018-02-09 14:03:18 +01:00
scoped_mmap-selftests.c common: add scoped_mmap 2018-02-09 14:03:19 +01:00
scoped_restore-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tracepoint-selftests.c Get rid of VEC(static_tracepoint_marker_p) 2018-03-22 00:27:19 -04:00
unpack-selftests.c Sign-extend non-bit-fields in unpack_bits_as_long 2018-02-26 09:21:08 -07:00
utils-selftests.c Add selftest for substitute_path_component 2018-03-15 22:04:42 -04:00
xml-utils-selftests.c Add xml_escape_text_append and use it 2018-03-08 18:04:46 -05:00