GDB (xrefs)
Loading...
Searching...
No Matches
auto-load.h
Go to the documentation of this file.
1/* GDB routines for supporting auto-loaded scripts.
2
3 Copyright (C) 2012-2023 Free Software Foundation, Inc.
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
23struct objfile;
24struct program_space;
27
28namespace gdb {
29namespace observers {
30struct token;
31} /* namespace observers */
32} /* namespace gdb */
33
34/* Value of the 'set debug auto-load' configuration variable. */
35
36extern bool debug_auto_load;
37
38/* Print an "auto-load" debug statement. */
39
40#define auto_load_debug_printf(fmt, ...) \
41 debug_prefixed_printf_cond (debug_auto_load, "auto-load", fmt, ##__VA_ARGS__)
42
43extern bool global_auto_load;
44
45extern bool auto_load_local_gdbinit;
48
49/* Token used for the auto_load_new_objfile observer, so other observers can
50 specify it as a dependency. */
51extern gdb::observers::token auto_load_new_objfile_observer_token;
52
53extern struct auto_load_pspace_info *
55extern void auto_load_objfile_script (struct objfile *objfile,
56 const struct extension_language_defn *);
59extern void auto_load_info_scripts (program_space *pspace, const char *pattern,
60 int from_tty,
62
63extern struct cmd_list_element **auto_load_set_cmdlist_get (void);
64extern struct cmd_list_element **auto_load_show_cmdlist_get (void);
65extern struct cmd_list_element **auto_load_info_cmdlist_get (void);
66
67/* Return true if FILENAME is located in one of the directories of
68 AUTO_LOAD_SAFE_PATH. Otherwise call warning and return false. FILENAME does
69 not have to be an absolute path.
70
71 Existence of FILENAME is not checked. Function will still give a warning
72 even if the caller would quietly skip non-existing file in unsafe
73 directory. */
74
75extern bool file_is_auto_load_safe (const char *filename);
76
77/* Return true if auto-loading gdb scripts is enabled. */
78
80 (const struct extension_language_defn *extlang);
81
82#endif /* AUTO_LOAD_H */
struct auto_load_pspace_info * get_auto_load_pspace_data_for_loading(struct program_space *pspace)
Definition auto-load.c:607
bool file_is_auto_load_safe(const char *filename)
Definition auto-load.c:439
bool auto_load_gdb_scripts_enabled(const struct extension_language_defn *extlang)
Definition auto-load.c:103
struct cmd_list_element ** auto_load_info_cmdlist_get(void)
Definition auto-load.c:1492
void load_auto_scripts_for_objfile(struct objfile *objfile)
Definition auto-load.c:1148
bool auto_load_local_gdbinit_loaded
Definition auto-load.c:127
void auto_load_info_scripts(program_space *pspace, const char *pattern, int from_tty, const extension_language_defn *)
Definition auto-load.c:1247
char auto_load_info_scripts_pattern_nl[]
Definition auto-load.c:1230
bool debug_auto_load
Definition auto-load.c:69
bool auto_load_local_gdbinit
Definition auto-load.c:121
bool global_auto_load
Definition auto-load.c:118
struct cmd_list_element ** auto_load_set_cmdlist_get(void)
Definition auto-load.c:1433
char * auto_load_local_gdbinit_pathname
Definition auto-load.c:124
struct cmd_list_element ** auto_load_show_cmdlist_get(void)
Definition auto-load.c:1450
gdb::observers::token auto_load_new_objfile_observer_token
Definition auto-load.c:1508
void auto_load_objfile_script(struct objfile *objfile, const struct extension_language_defn *)
Definition auto-load.c:821
int token
Definition m2-exp.c:2422