diff options
author | Marco Barisione <mbarisione@undo.io> | 2021-05-19 13:58:40 +0100 |
---|---|---|
committer | Marco Barisione <mbarisione@undo.io> | 2021-05-19 13:58:40 +0100 |
commit | 4915bfdcfb271cab6ca7534916c42e98cf22f953 (patch) | |
tree | b84c65da6b8f840d5f6c75711a9df36cc23d9496 /gdb/cli | |
parent | d9211df246b74aa4f1ba86f04933eca86862a352 (diff) | |
download | gdb-4915bfdcfb271cab6ca7534916c42e98cf22f953.zip gdb-4915bfdcfb271cab6ca7534916c42e98cf22f953.tar.gz gdb-4915bfdcfb271cab6ca7534916c42e98cf22f953.tar.bz2 |
gdb: Add an overloaded ui_out::text accepting a const std::string &
gdb/ChangeLog:
* ui-out.h (class ui_out): Add ui_out::text accepting a constant
reference to a std::string. Fix all callers using
std::string::c_str.
* ui-out.c (ui_out::text): Ditto.
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-setshow.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index 82008ca..f6a594d 100644 --- a/gdb/cli/cli-setshow.c +++ b/gdb/cli/cli-setshow.c @@ -760,7 +760,7 @@ cmd_show_list (struct cmd_list_element *list, int from_tty) std::string prefixname = list->prefix->prefixname (); prefixname = (!list->prefix->is_prefix () ? "" : strstr (prefixname.c_str (), "show ") + 5); - uiout->text (prefixname.c_str ()); + uiout->text (prefixname); } uiout->field_string ("name", list->name); uiout->text (": "); |