ada-lang.c: Rename gnat_encoded_fixed_type_info
[binutils-gdb.git] / gdbsupport / common-inferior.h
blob4362934cefde8407bb42eb8569c7b7372fd1b0b0
1 /* Functions to deal with the inferior being executed on GDB or
2 GDBserver.
4 Copyright (C) 1986-2020 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 #ifndef COMMON_COMMON_INFERIOR_H
22 #define COMMON_COMMON_INFERIOR_H
24 #include "gdbsupport/array-view.h"
26 /* Return the exec wrapper to be used when starting the inferior, or NULL
27 otherwise. */
28 extern const char *get_exec_wrapper ();
30 /* Return the name of the executable file as a string.
31 ERR nonzero means get error if there is none specified;
32 otherwise return 0 in that case. */
33 extern const char *get_exec_file (int err);
35 /* Return the inferior's current working directory. If nothing has
36 been set, then return NULL. */
37 extern const char *get_inferior_cwd ();
39 /* Set the inferior current working directory. If CWD is NULL, unset
40 the directory. */
41 extern void set_inferior_cwd (const char *cwd);
43 /* Whether to start up the debuggee under a shell.
45 If startup-with-shell is set, GDB's "run" will attempt to start up
46 the debuggee under a shell. This also happens when using GDBserver
47 under extended remote mode.
49 This is in order for argument-expansion to occur. E.g.,
51 (gdb) run *
53 The "*" gets expanded by the shell into a list of files.
55 While this is a nice feature, it may be handy to bypass the shell
56 in some cases. To disable this feature, do "set startup-with-shell
57 false".
59 The catch-exec traps expected during start-up will be one more if
60 the target is started up with a shell. */
61 extern bool startup_with_shell;
63 /* Compute command-line string given argument vector. This does the
64 same shell processing as fork_inferior. */
65 extern std::string
66 construct_inferior_arguments (gdb::array_view<char * const>);
68 #endif /* COMMON_COMMON_INFERIOR_H */