aboutsummaryrefslogtreecommitdiff
path: root/gdb/ChangeLog
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2017-11-24 10:40:13 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2017-11-24 10:40:15 -0500
commit21fe1c752e254167d953fa8c846280f63a3a5290 (patch)
tree034d38fd6ff84feda067824bc3cf8f71342357c7 /gdb/ChangeLog
parent089354bb0613ca1559813f0a79fbe73655113785 (diff)
downloadgdb-21fe1c752e254167d953fa8c846280f63a3a5290.zip
gdb-21fe1c752e254167d953fa8c846280f63a3a5290.tar.gz
gdb-21fe1c752e254167d953fa8c846280f63a3a5290.tar.bz2
remote: C++ify thread_item and threads_listing_context
This patch C++ifies the thread_item and threads_listing_context structures in remote.c. thread_item::{extra,name} are changed to std::string. As a result, there's a bit of awkwardness in remote_update_thread_list, where we have to xstrdup those strings when filling the private_thread_info structure. This is removed in the following patch, where private_thread_info is also C++ified and its corresponding fields made std::string too. The xstrdup then becomes an std::move. Other than that there's nothing really special, it's a usual day-to-day VEC -> vector and char* -> std::string change. It allows removing a cleanup in remote_update_thread_list. Note that an overload of hex2bin that returns a gdb::byte_vector is added, with corresponding selftests. gdb/ChangeLog: * remote.c (struct thread_item): Add constructor, disable copy construction and copy assignment, define default move construction and move assignment. <extra, name>: Change type to std::string. <core>: Initialize. <thread_handle>: Make non-pointer. (thread_item_t): Remove typedef. (DEF_VEC_O(thread_item_t)): Remove. (threads_listing_context) <contains_thread>: New method. <remove_thread>: New method. <items>: Change type to std::vector. (clear_threads_listing_context): Remove. (threads_listing_context_remove): Remove. (remote_newthread_step): Use thread_item constructor, adjust to change to std::vector. (start_thread): Use thread_item constructor, adjust to change to std::vector. (end_thread): Adjust to change to std::vector and std::string. (remote_get_threads_with_qthreadinfo): Use thread_item constructor, adjust to std::vector. (remote_update_thread_list): Adjust to change to std::vector and std::string, use threads_listing_context methods. (remove_child_of_pending_fork): Adjust. (remove_new_fork_children): Adjust. * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c. (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o. * unittests/rsp-low-selftests.c: New file. * common/rsp-low.h: Include common/byte-vector.h. (hex2bin): New overload. * common/rsp-low.c (hex2bin): New overload.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r--gdb/ChangeLog33
1 files changed, 33 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b0356db..7165ec3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,36 @@
+2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * remote.c (struct thread_item): Add constructor, disable copy
+ construction and copy assignment, define default move
+ construction and move assignment.
+ <extra, name>: Change type to std::string.
+ <core>: Initialize.
+ <thread_handle>: Make non-pointer.
+ (thread_item_t): Remove typedef.
+ (DEF_VEC_O(thread_item_t)): Remove.
+ (threads_listing_context) <contains_thread>: New method.
+ <remove_thread>: New method.
+ <items>: Change type to std::vector.
+ (clear_threads_listing_context): Remove.
+ (threads_listing_context_remove): Remove.
+ (remote_newthread_step): Use thread_item constructor, adjust to
+ change to std::vector.
+ (start_thread): Use thread_item constructor, adjust to change to
+ std::vector.
+ (end_thread): Adjust to change to std::vector and std::string.
+ (remote_get_threads_with_qthreadinfo): Use thread_item
+ constructor, adjust to std::vector.
+ (remote_update_thread_list): Adjust to change to std::vector and
+ std::string, use threads_listing_context methods.
+ (remove_child_of_pending_fork): Adjust.
+ (remove_new_fork_children): Adjust.
+ * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
+ (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
+ * unittests/rsp-low-selftests.c: New file.
+ * common/rsp-low.h: Include common/byte-vector.h.
+ (hex2bin): New overload.
+ * common/rsp-low.c (hex2bin): New overload.
+
2017-11-24 Simon Marchi <simon.marchi@ericsson.com>
* inferior.h (private_inferior): Define structure type, add