Use std::string for ui_out_hdr's text fields
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 1 Dec 2016 20:59:01 +0000 (15:59 -0500)
committerSimon Marchi <simon.marchi@ericsson.com>
Thu, 1 Dec 2016 20:59:03 +0000 (15:59 -0500)
commitc5209615263fd0444da28cdfb6661ad287909a70
tree953526cb2bd235560908c252c52b3e776bf4cddf
parent78afa7f8599e46eb94a93510b383dfb35e549f7e
Use std::string for ui_out_hdr's text fields

This patch makes ui_out_hdr use std::string for its text fields.  It
makes freeing automatic when the object is deleted.

gdb/ChangeLog:

* mi/mi-out.c (mi_table_header): Change char * args to
std::string.
* cli-out.c (cli_table_header): Likewise.
* ui-out.h (table_header_ftype): Likewise.
(ui_out_table_header): Constify colhdr argument.
(ui_out_query_field): Constify col_name argument.
* ui-out.c (ui_out_hdr) <col_name, colhdr>: Change type to
std::string.
(uo_table_header): Change char * args to std::string.
(ui_out_table_header): Likewise.
(get_next_header): Constify colhdr argument and adapt.
(clear_header_list): Don't free col_name/colhdr fields.
(append_header_to_list): Change char * args to std::string and
adapt.
(verify_field): Constify variable.
(ui_out_query_field): Constify col_name argument and adapt.
* breakpoint.c (wrap_indent_at_field): Constify variable.
gdb/ChangeLog
gdb/breakpoint.c
gdb/cli-out.c
gdb/mi/mi-out.c
gdb/ui-out.c
gdb/ui-out.h