aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-06-28 16:32:00 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2021-07-23 15:38:54 -0400
commit4e93ea6e67fd7260ef842b9eeb20f071648c056e (patch)
treec7644fe22a2d10f95ee5abb9d461be96d34cc23a /gdb/infcmd.c
parent11bd012ed256688f43d71dcc531c2f105a9c55dd (diff)
downloadfsf-binutils-gdb-4e93ea6e67fd7260ef842b9eeb20f071648c056e.zip
fsf-binutils-gdb-4e93ea6e67fd7260ef842b9eeb20f071648c056e.tar.gz
fsf-binutils-gdb-4e93ea6e67fd7260ef842b9eeb20f071648c056e.tar.bz2
gdb: make inferior::m_terminal an std::string
Same idea as the previous patch, but for m_terminal. Change-Id: If9367d5db8c976a4336680adca4ea5bc31ab64d2
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index c027176..c183b60 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -115,13 +115,11 @@ show_inferior_tty_command (struct ui_file *file, int from_tty,
{
/* Note that we ignore the passed-in value in favor of computing it
directly. */
- const char *inferior_tty = current_inferior ()->tty ();
+ const std::string &inferior_tty = current_inferior ()->tty ();
- if (inferior_tty == nullptr)
- inferior_tty = "";
fprintf_filtered (gdb_stdout,
_("Terminal for future runs of program being debugged "
- "is \"%s\".\n"), inferior_tty);
+ "is \"%s\".\n"), inferior_tty.c_str ());
}
void