Consolidate definition of current_directory

I noticed that both gdbserver and gdb define current_directory.
However, as it is referenced by gdbsupport, it seemed better to define
it there as well.  This patch also moves the declaration to
pathstuff.h.  Tested by rebuilding.
This commit is contained in:
Tom Tromey
2022-03-28 09:46:55 -06:00
parent d537777dfe
commit c50e54825b
5 changed files with 7 additions and 11 deletions

View File

@@ -213,9 +213,6 @@
/* Pull in gdb::unique_xmalloc_ptr. */
#include "gdbsupport/gdb_unique_ptr.h"
/* String containing the current directory (what getwd would return). */
extern char *current_directory;
/* sbrk on macOS is not useful for our purposes, since sbrk(0) always
returns the same value. brk/sbrk on macOS is just an emulation
that always returns a pointer to a 4MB section reserved for