public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] C++ify osdata
@ 2017-11-22 23:03 sergiodj+buildbot
  2017-11-22 23:03 ` Failures on Fedora-s390x-m64, branch master sergiodj+buildbot
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: sergiodj+buildbot @ 2017-11-22 23:03 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 479f8de1b3b7e69ca8d557bbe9d843c7d1bc89c5 ***

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

C++ify osdata

This patch c++ifies the osdata structure: osdata_column, osdata_item and
osdata.  char* are replaced with std::string and VEC are replaced with
std::vector.  This allows to get rid of a great deal of cleanup and
free'ing code.

I replaced the splay tree in list_available_thread_groups with an
std::map.  Unless there's a good advantage to keep using a splay tree,
I think using the standard type should make things simpler to
understand.

gdb/ChangeLog:

	* osdata.h: Include vector isntead of vec.h.
	(osdata_column_s): Remove typedef.
	(struct osdata_column): Add constructor.
	<name, value>: Change type to std::string.
	(DEF_VEC_O (osdata_column_s)): Remove.
	(osdata_item_s): Remove typedef.
	(struct osdata_item) <columns>: Change type to std::vector.
	(DEF_VEC_O (osdata_item_s)): Remove.
	(struct osdata): Add constructor.
	<type>: Change type to std::string.
	<items>: Change type to std::vector.
	(osdata_p): Remove typedef.
	(DEF_VEC_P (osdata_p)): Remove.
	(osdata_parse): Return a unique_ptr.
	(osdata_free): Remove.
	(make_cleanup_osdata_free): Remove.
	(get_osdata): Return a unique_ptr.
	(get_osdata_column): Return pointer to std::string, take a
	reference to osdata_item as parameter.
	* osdata.c (struct osdata_parsing_data) <osdata>: Change type to
	unique_ptr.
	<property_name>: Change type to std::string.
	(osdata_start_osdata): Allocate osdata with new and adjust.
	(osdata_start_item): Adjust.
	(osdata_start_column): Adjust.
	(osdata_end_column): Adjust.
	(clear_parsing_data): Remove.
	(osdata_parse): Return a unique_ptr and adjust, remove cleanup.
	(osdata_item_clear): Remove.
	(get_osdata): return a unique_ptr and adjust.
	(get_osdata_column): Return a pointer to std::string and adjust.
	(info_osdata): Adjust.
	* mi/mi-main.c: Include <map>.
	(free_vector_of_osdata_items): Remove.
	(list_available_thread_groups): Adjust, use std::map instead of
	splay tree.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-11-23 10:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-22 23:03 [binutils-gdb] C++ify osdata sergiodj+buildbot
2017-11-22 23:03 ` Failures on Fedora-s390x-m64, branch master sergiodj+buildbot
2017-11-23  1:08 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot
2017-11-23  1:09 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2017-11-23  1:11 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2017-11-23  5:03 ` Failures on Ubuntu-AArch64-m64, " sergiodj+buildbot
2017-11-23  8:58 ` Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, " sergiodj+buildbot
2017-11-23  9:37 ` Failures on Ubuntu-AArch32-native-gdbserver-m32, " sergiodj+buildbot
2017-11-23 10:09 ` Failures on Ubuntu-AArch32-m32, " sergiodj+buildbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).