Commit | Line | Data |
---|---|---|
e2207b9a JK |
1 | /* GDB routines for supporting auto-loaded scripts. |
2 | ||
3666a048 | 3 | Copyright (C) 2012-2021 Free Software Foundation, Inc. |
e2207b9a JK |
4 | |
5 | This file is part of GDB. | |
6 | ||
7 | This program is free software; you can redistribute it and/or modify | |
8 | it under the terms of the GNU General Public License as published by | |
9 | the Free Software Foundation; either version 3 of the License, or | |
10 | (at your option) any later version. | |
11 | ||
12 | This program is distributed in the hope that it will be useful, | |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
19 | ||
20 | #ifndef AUTO_LOAD_H | |
21 | #define AUTO_LOAD_H 1 | |
22 | ||
6dddc817 | 23 | struct objfile; |
e2207b9a | 24 | struct program_space; |
6dddc817 DE |
25 | struct auto_load_pspace_info; |
26 | struct extension_language_defn; | |
bf88dd68 | 27 | |
a59902a7 SM |
28 | /* Value of the 'set debug auto-load' configuration variable. */ |
29 | ||
30 | extern bool debug_auto_load; | |
31 | ||
32 | /* Print an "auto-load" debug statement. */ | |
33 | ||
34 | #define auto_load_debug_printf(fmt, ...) \ | |
35 | debug_prefixed_printf_cond (debug_auto_load, "auto-load", fmt, ##__VA_ARGS__) | |
36 | ||
491144b5 | 37 | extern bool global_auto_load; |
bf88dd68 | 38 | |
491144b5 | 39 | extern bool auto_load_local_gdbinit; |
bf88dd68 | 40 | extern char *auto_load_local_gdbinit_pathname; |
491144b5 | 41 | extern bool auto_load_local_gdbinit_loaded; |
e2207b9a JK |
42 | |
43 | extern struct auto_load_pspace_info * | |
44 | get_auto_load_pspace_data_for_loading (struct program_space *pspace); | |
6dddc817 DE |
45 | extern void auto_load_objfile_script (struct objfile *objfile, |
46 | const struct extension_language_defn *); | |
bf88dd68 | 47 | extern void load_auto_scripts_for_objfile (struct objfile *objfile); |
bf88dd68 | 48 | extern char auto_load_info_scripts_pattern_nl[]; |
1d12d88f | 49 | extern void auto_load_info_scripts (const char *pattern, int from_tty, |
6dddc817 | 50 | const struct extension_language_defn *); |
bf88dd68 JK |
51 | |
52 | extern struct cmd_list_element **auto_load_set_cmdlist_get (void); | |
53 | extern struct cmd_list_element **auto_load_show_cmdlist_get (void); | |
54 | extern struct cmd_list_element **auto_load_info_cmdlist_get (void); | |
e2207b9a | 55 | |
5e12f48f SM |
56 | /* Return true if FILENAME is located in one of the directories of |
57 | AUTO_LOAD_SAFE_PATH. Otherwise call warning and return false. FILENAME does | |
58 | not have to be an absolute path. | |
59 | ||
60 | Existence of FILENAME is not checked. Function will still give a warning | |
61 | even if the caller would quietly skip non-existing file in unsafe | |
62 | directory. */ | |
63 | ||
a59902a7 | 64 | extern bool file_is_auto_load_safe (const char *filename); |
bccbefd2 | 65 | |
db972fce SM |
66 | /* Return true if auto-loading gdb scripts is enabled. */ |
67 | ||
68 | extern bool auto_load_gdb_scripts_enabled | |
6dddc817 DE |
69 | (const struct extension_language_defn *extlang); |
70 | ||
e2207b9a | 71 | #endif /* AUTO_LOAD_H */ |