aboutsummaryrefslogtreecommitdiff
path: root/gdb/inferior.h
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/inferior.h
parent11bd012ed256688f43d71dcc531c2f105a9c55dd (diff)
downloadgdb-4e93ea6e67fd7260ef842b9eeb20f071648c056e.zip
gdb-4e93ea6e67fd7260ef842b9eeb20f071648c056e.tar.gz
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/inferior.h')
-rw-r--r--gdb/inferior.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 5cd36f4..e9210b1 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -434,13 +434,15 @@ public:
void add_continuation (std::function<void ()> &&cont);
void do_all_continuations ();
- /* Set/get file name for default use for standard in/out in the
- inferior. On Unix systems, we try to make TERMINAL_NAME the
- inferior's controlling terminal. If TERMINAL_NAME is nullptr or
- the empty string, then the inferior inherits GDB's terminal (or
- GDBserver's if spawning a remote process). */
- void set_tty (const char *terminal_name);
- const char *tty ();
+ /* Set/get file name for default use for standard in/out in the inferior.
+
+ On Unix systems, we try to make TERMINAL_NAME the inferior's controlling
+ terminal.
+
+ If TERMINAL_NAME is the empty string, then the inferior inherits GDB's
+ terminal (or GDBserver's if spawning a remote process). */
+ void set_tty (std::string terminal_name);
+ const std::string &tty ();
/* Set the argument string to use when running this inferior.
@@ -587,7 +589,7 @@ private:
target_stack m_target_stack;
/* The name of terminal device to use for I/O. */
- gdb::unique_xmalloc_ptr<char> m_terminal;
+ std::string m_terminal;
/* The list of continuations. */
std::list<std::function<void ()>> m_continuations;