aboutsummaryrefslogtreecommitdiff
path: root/gdbserver/server.cc
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-06-25 18:07:54 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2021-07-23 15:38:54 -0400
commit11bd012ed256688f43d71dcc531c2f105a9c55dd (patch)
treeeeff398be94163b59fc0f261615449bd9dbeaeb1 /gdbserver/server.cc
parentfd2dec2a45a73154d9824071ebb8664a39a69174 (diff)
downloadfsf-binutils-gdb-11bd012ed256688f43d71dcc531c2f105a9c55dd.zip
fsf-binutils-gdb-11bd012ed256688f43d71dcc531c2f105a9c55dd.tar.gz
fsf-binutils-gdb-11bd012ed256688f43d71dcc531c2f105a9c55dd.tar.bz2
gdb: make inferior::m_cwd an std::string
Same idea as the previous patch, but for m_cwd. To keep things consistent across the board, change get_inferior_cwd as well, which is shared with GDBserver. So update the related GDBserver code too. Change-Id: Ia2c047fda738d45f3d18bc999eb67ceb8400ce4e
Diffstat (limited to 'gdbserver/server.cc')
-rw-r--r--gdbserver/server.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdbserver/server.cc b/gdbserver/server.cc
index 32dcc05..193c3d9 100644
--- a/gdbserver/server.cc
+++ b/gdbserver/server.cc
@@ -949,17 +949,17 @@ handle_general_set (char *own_buf)
{
std::string path = hex2str (p);
- set_inferior_cwd (path.c_str ());
-
if (remote_debug)
debug_printf (_("[Set the inferior's current directory to %s]\n"),
path.c_str ());
+
+ set_inferior_cwd (std::move (path));
}
else
{
/* An empty argument means that we should clear out any
previously set cwd for the inferior. */
- set_inferior_cwd (NULL);
+ set_inferior_cwd ("");
if (remote_debug)
debug_printf (_("\