summaryrefslogtreecommitdiff
path: root/gdbsupport
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 /gdbsupport
parentfd2dec2a45a73154d9824071ebb8664a39a69174 (diff)
downloadbinutils-gdb-11bd012ed256688f43d71dcc531c2f105a9c55dd.tar.gz
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 'gdbsupport')
-rw-r--r--gdbsupport/common-inferior.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdbsupport/common-inferior.h b/gdbsupport/common-inferior.h
index 5e1221277b8..92c880e1212 100644
--- a/gdbsupport/common-inferior.h
+++ b/gdbsupport/common-inferior.h
@@ -32,9 +32,10 @@ extern const char *get_exec_wrapper ();
otherwise return 0 in that case. */
extern const char *get_exec_file (int err);
-/* Return the inferior's current working directory. If nothing has
- been set, then return NULL. */
-extern const char *get_inferior_cwd ();
+/* Return the inferior's current working directory.
+
+ If it is not set, the string is empty. */
+extern const std::string &get_inferior_cwd ();
/* Whether to start up the debuggee under a shell.