mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-04-24 14:53:34 +08:00
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:
parent
d537777dfe
commit
c50e54825b
@ -141,10 +141,6 @@ show_confirm (struct ui_file *file, int from_tty,
|
||||
value);
|
||||
}
|
||||
|
||||
/* Current working directory. */
|
||||
|
||||
char *current_directory;
|
||||
|
||||
/* The last command line executed on the console. Used for command
|
||||
repetitions when the user enters an empty line. */
|
||||
|
||||
|
@ -65,10 +65,6 @@
|
||||
break; \
|
||||
}
|
||||
|
||||
/* String containing the current directory (what getwd would return). */
|
||||
|
||||
char *current_directory;
|
||||
|
||||
/* The environment to pass to the inferior when creating it. */
|
||||
|
||||
static gdb_environ our_environ;
|
||||
|
@ -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
|
||||
|
@ -29,6 +29,10 @@
|
||||
|
||||
/* See gdbsupport/pathstuff.h. */
|
||||
|
||||
char *current_directory;
|
||||
|
||||
/* See gdbsupport/pathstuff.h. */
|
||||
|
||||
gdb::unique_xmalloc_ptr<char>
|
||||
gdb_realpath (const char *filename)
|
||||
{
|
||||
|
@ -136,4 +136,7 @@ extern const char *get_shell ();
|
||||
|
||||
extern gdb::char_vector make_temp_filename (const std::string &f);
|
||||
|
||||
/* String containing the current directory (what getwd would return). */
|
||||
extern char *current_directory;
|
||||
|
||||
#endif /* COMMON_PATHSTUFF_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user