mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-23 13:21:43 +08:00
gdb: un-share set_inferior_cwd declaration
The declaration of set_inferior_cwd is currently shared between gdb and gdbserver, in gdbsupport/common-inferior.h. It doesn't need to be, as set_inferior_cwd is not called from common code. Only get_inferior_cwd needs to. The motivation for this is that a future patch will change the prototype of set_inferior_cwd in gdb, and I don't want to change it for gdbserver unnecessarily. I see this as a good cleanup in any case, to reduce to just the essential what is shared between GDB and GDBserver. Change-Id: I3127d27d078f0503ebf5ccc6fddf14f212426a73
This commit is contained in:
parent
e116324103
commit
5b8bf2e75e
@ -184,9 +184,10 @@ show_args_command (struct ui_file *file, int from_tty,
|
||||
deprecated_show_value_hack (file, from_tty, c, get_inferior_args ());
|
||||
}
|
||||
|
||||
/* See gdbsupport/common-inferior.h. */
|
||||
/* Set the inferior current working directory. If CWD is NULL, unset
|
||||
the directory. */
|
||||
|
||||
void
|
||||
static void
|
||||
set_inferior_cwd (const char *cwd)
|
||||
{
|
||||
struct inferior *inf = current_inferior ();
|
||||
|
@ -241,7 +241,7 @@ get_inferior_cwd ()
|
||||
return current_inferior_cwd;
|
||||
}
|
||||
|
||||
/* See gdbsupport/common-inferior.h. */
|
||||
/* See inferiors.h. */
|
||||
|
||||
void
|
||||
set_inferior_cwd (const char *cwd)
|
||||
|
@ -154,4 +154,8 @@ void *thread_target_data (struct thread_info *);
|
||||
struct regcache *thread_regcache_data (struct thread_info *);
|
||||
void set_thread_regcache_data (struct thread_info *, struct regcache *);
|
||||
|
||||
/* Set the inferior current working directory. If CWD is NULL, unset
|
||||
the directory. */
|
||||
void set_inferior_cwd (const char *cwd);
|
||||
|
||||
#endif /* GDBSERVER_INFERIORS_H */
|
||||
|
@ -36,10 +36,6 @@ extern const char *get_exec_file (int err);
|
||||
been set, then return NULL. */
|
||||
extern const char *get_inferior_cwd ();
|
||||
|
||||
/* Set the inferior current working directory. If CWD is NULL, unset
|
||||
the directory. */
|
||||
extern void set_inferior_cwd (const char *cwd);
|
||||
|
||||
/* Whether to start up the debuggee under a shell.
|
||||
|
||||
If startup-with-shell is set, GDB's "run" will attempt to start up
|
||||
|
Loading…
Reference in New Issue
Block a user