aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
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/mi
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/mi')
0 files changed, 0 insertions, 0 deletions