aboutsummaryrefslogtreecommitdiff
path: root/gdb/ChangeLog
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2016-12-01 15:58:40 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2016-12-01 15:58:40 -0500
commit78afa7f8599e46eb94a93510b383dfb35e549f7e (patch)
tree61e6920e2e5b4b1263b8800f7161f3085dbd7344 /gdb/ChangeLog
parent0f1254327820d7b3f67f873aa40e76679f067288 (diff)
downloadgdb-78afa7f8599e46eb94a93510b383dfb35e549f7e.zip
gdb-78afa7f8599e46eb94a93510b383dfb35e549f7e.tar.gz
gdb-78afa7f8599e46eb94a93510b383dfb35e549f7e.tar.bz2
Replace hand-made linked list of ui_out_hdr by vector and iterator
Instead of keeping pointers to first, last and current ui_out_hdr in ui_out_table, we can use an std::vector and an iterator. Direct random access of to vector helps make get_next_header a bit nicer by avoiding iterating on all the headers. append_header_to_list is also a bit simpler. Also, using unique_ptr inside the vector allows expressing the ownership of the ui_out_hdr objects by the ui_out_table object, and it simplifies the destruction. gdb/ChangeLog: * ui-out.c (struct ui_out_hdr) <next>: Remove. (struct ui_out_table) <header_first, header_last, header_next>: Remove. <headers, headers_iterator>: New fields. (ui_out_table_body): Update for the new data structure. (ui_out_begin): Likewise. (clear_header_list): Likewise. (append_header_to_list): Likewise. (get_next_header): Likewise. (ui_out_query_field): Likewise. (ui_out_new): Likewise.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r--gdb/ChangeLog13
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6d535c5..bb7cf1e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,16 @@
+2016-12-01 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * ui-out.c (struct ui_out_hdr) <next>: Remove.
+ (struct ui_out_table) <header_first, header_last, header_next>: Remove.
+ <headers, headers_iterator>: New fields.
+ (ui_out_table_body): Update for the new data structure.
+ (ui_out_begin): Likewise.
+ (clear_header_list): Likewise.
+ (append_header_to_list): Likewise.
+ (get_next_header): Likewise.
+ (ui_out_query_field): Likewise.
+ (ui_out_new): Likewise.
+
2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
* ui-out.c (struct ui_out_table) <id>: Change type to