aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-07-06 13:52:08 -0600
committerTom Tromey <tom@tromey.com>2019-08-15 12:29:28 -0600
commite2a678a557b52816a7aa45902a6519bc1cae918e (patch)
tree9bb51306a0e6502c4214bec8185ba6ed733ea247 /gdb/tui
parentf2dda4778417e2d58a5b0416ff9598f68470cbfa (diff)
downloadgdb-e2a678a557b52816a7aa45902a6519bc1cae918e.zip
gdb-e2a678a557b52816a7aa45902a6519bc1cae918e.tar.gz
gdb-e2a678a557b52816a7aa45902a6519bc1cae918e.tar.bz2
Avoid string_file in tui_make_status_line
tui_make_status_line uses string_file where a simple std::string constructor would do. This makes this change. gdb/ChangeLog 2019-08-15 Tom Tromey <tom@tromey.com> * tui/tui-stack.c (tui_make_status_line): Use string constructor.
Diffstat (limited to 'gdb/tui')
-rw-r--r--gdb/tui/tui-stack.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c
index c67ac1b..1d7491d 100644
--- a/gdb/tui/tui-stack.c
+++ b/gdb/tui/tui-stack.c
@@ -128,11 +128,9 @@ tui_make_status_line (struct tui_locator_window *loc)
line_width = MIN_LINE_WIDTH;
/* Translate PC address. */
- string_file pc_out;
-
- fputs_filtered (loc->gdbarch? paddress (loc->gdbarch, loc->addr) : "??",
- &pc_out);
-
+ std::string pc_out (loc->gdbarch
+ ? paddress (loc->gdbarch, loc->addr)
+ : "??");
const char *pc_buf = pc_out.c_str ();
int pc_width = pc_out.size ();