26 #include "filenames.h"
36 #include "readline/tilde.h"
42 #include "gdb/section-scripts.h"
50 #define AUTO_SECTION_NAME ".debug_gdb_scripts"
55 const char *section_name,
unsigned offset);
60 const char *section_name,
unsigned offset);
72 "of 'set auto-load ...' is %s.\n"),
130 "directory is %s.\n"),
145 if (auto_load_dir[0] ==
'\0')
147 xfree (auto_load_dir);
159 "auto-loaded scripts is %s.\n"),
178 auto_load_expand_dir_vars (
const char *
string)
183 s = xstrdup (
string);
187 if (debug_auto_load && strcmp (s,
string) != 0)
189 _(
"auto-load: Expanded $-variables to \"%s\".\n"), s);
191 dir_vec = dirnames_to_char_ptr_vec (s);
207 _(
"auto-load: Updating directories of \"%s\".\n"),
208 auto_load_safe_path);
212 auto_load_safe_path_vec = auto_load_expand_dir_vars (auto_load_safe_path);
217 for (ix = 0; ix <
len; ix++)
220 char *expanded = tilde_expand (dir);
228 if (strcmp (expanded, dir) == 0)
230 _(
"auto-load: Using directory \"%s\".\n"),
234 _(
"auto-load: Resolved directory \"%s\" "
241 if (strcmp (real_path, expanded) == 0)
249 _(
"auto-load: And canonicalized as \"%s\".\n"),
269 if (auto_load_safe_path[0] ==
'\0')
271 xfree (auto_load_safe_path);
297 "auto-load files is %s.\n"),
309 if (args == NULL || *args == 0)
311 Directory argument required.\n\
312 Use 'set auto-load safe-path /' for disabling the auto-load safe-path security.\
316 xfree (auto_load_safe_path);
317 auto_load_safe_path = s;
330 if (args == NULL || *args == 0)
331 error (
_(
"Directory argument required."));
334 xfree (auto_load_dir);
344 size_t pattern_len = strlen (pattern);
345 size_t filename_len = strlen (filename);
349 "to pattern \"%s\"\n"),
355 while (pattern_len && IS_DIR_SEPARATOR (pattern[pattern_len - 1]))
357 pattern[pattern_len] =
'\0';
362 if (pattern_len == 0)
366 _(
"auto-load: Matched - empty pattern\n"));
374 while (filename_len && IS_DIR_SEPARATOR (filename[filename_len - 1]))
376 filename[filename_len] =
'\0';
377 if (filename_len == 0)
381 _(
"auto-load: Not matched - pattern \"%s\".\n"),
391 "\"%s\" to pattern \"%s\".\n"),
397 while (filename_len > 0 && !IS_DIR_SEPARATOR (filename[filename_len - 1]))
406 static ATTRIBUTE_PURE
int
409 char *filename_copy, *pattern_copy;
411 filename_copy = alloca (strlen (filename) + 1);
412 strcpy (filename_copy, filename);
413 pattern_copy = alloca (strlen (pattern) + 1);
414 strcpy (pattern_copy, pattern);
427 char **filename_realp)
439 if (*filename_realp == NULL)
442 if (debug_auto_load && strcmp (*filename_realp, filename) != 0)
444 _(
"auto-load: Resolved "
445 "file \"%s\" as \"%s\".\n"),
446 filename, *filename_realp);
449 if (strcmp (*filename_realp, filename) != 0)
460 "directory \"%s\".\n"),
479 char *filename_real = NULL;
481 static int advice_printed = 0;
487 va_start (debug_args, debug_fmt);
507 warning (
_(
"File \"%s\" auto-loading has been declined by your "
508 "`auto-load safe-path' set to \"%s\"."),
509 filename_real, auto_load_safe_path);
513 const char *homedir = getenv (
"HOME");
522 To enable execution of this file add\n\
523 \tadd-auto-load-safe-path %s\n\
524 line to your configuration file \"%s\".\n\
525 To completely disable this security protection add\n\
526 \tset auto-load safe-path /\n\
527 line to your configuration file \"%s\".\n\
528 For more information about this security protection see the\n\
529 \"Auto-loading safe path\" section in the GDB manual. E.g., run from the shell:\n\
530 \tinfo \"(gdb)Auto-loading safe path\"\n"),
531 filename_real, homeinit, homeinit);
600 info = program_space_data (pspace, auto_load_pspace_data);
604 set_program_space_data (pspace, auto_load_pspace_data, info);
617 return htab_hash_string (e->
name) ^ htab_hash_pointer (e->
language);
677 const char *
name,
const char *full_path,
686 slot = (
struct loaded_script **) htab_find_slot (htab, &entry, INSERT);
687 in_hash_table = *slot != NULL;
696 *slot =
xmalloc (
sizeof (**slot)
698 + (full_path != NULL ? (strlen (full_path) + 1) : 0));
699 p = ((
char*) *slot) +
sizeof (**slot);
702 if (full_path != NULL)
705 strcpy (p, full_path);
706 (*slot)->full_path = p;
709 (*slot)->full_path = NULL;
710 (*slot)->loaded = loaded;
711 (*slot)->language = language;
714 return in_hash_table;
733 slot = (
struct loaded_script **) htab_find_slot (htab, &entry, INSERT);
734 in_hash_table = *slot != NULL;
743 *slot =
xmalloc (
sizeof (**slot) + strlen (name) + 1);
744 p = ((
char*) *slot) +
sizeof (**slot);
747 (*slot)->full_path = NULL;
752 return in_hash_table;
763 info = program_space_data (pspace, auto_load_pspace_data);
783 char *filename, *debugfile;
789 len = strlen (realname);
790 filename =
xmalloc (len + strlen (suffix) + 1);
791 memcpy (filename, realname, len);
792 strcpy (filename + len, suffix);
797 debugfile = filename;
800 debugfile, input ?
_(
"exists") :
_(
"does not exist"));
811 vec = auto_load_expand_dir_vars (auto_load_dir);
816 "scripts-directory' path \"%s\".\n"),
821 debugfile =
xmalloc (strlen (dir) + strlen (filename) + 1);
822 strcpy (debugfile, dir);
825 strcat (debugfile, filename);
833 input ?
_(
"exists") :
_(
"does not exist"));
848 _(
"auto-load: Loading %s script \"%s\""
849 " by extension for objfile \"%s\".\n"),
874 sourcer (language, objfile, input, debugfile);
901 size_t len = strlen (realname);
902 const size_t lexe =
sizeof (
".exe") - 1;
904 if (len > lexe && strcasecmp (realname + len - lexe,
".exe") == 0)
907 realname[
len] =
'\0';
910 "retrying with \"%s\".\n"),
925 struct objfile *objfile,
927 const char *section_name,
unsigned int offset,
932 int opened, in_hash_table;
942 section_name, offset);
956 &stream, &full_path);
965 _(
"auto-load: Loading %s script "
966 "\"%s\" from section \"%s\" of "
967 "objfile \"%s\".\n"),
985 section_name, offset);
992 if (opened && !in_hash_table)
993 sourcer (language, objfile, stream, full_path);
1004 struct objfile *objfile,
1006 const char *section_name,
unsigned int offset,
1010 const char *newline, *script_text;
1012 int is_safe, in_hash_table;
1020 newline = strchr (script,
'\n');
1021 if (newline != NULL)
1026 buf = xstrndup (script, newline - script);
1028 for (p = buf; *p !=
'\0'; ++p)
1034 if (p != buf && *p ==
'\0')
1041 Missing/bad script name in entry at offset %u in section %s\n\
1047 script_text = newline + 1;
1051 if (executor == NULL)
1055 section_name, offset);
1070 _(
"auto-load: Loading %s script "
1071 "\"%s\" from section \"%s\" of "
1072 "objfile \"%s\".\n"),
1079 if (is_safe && !in_hash_table)
1080 executor (language, objfile, name, script_text);
1099 const char *start,
const char *end)
1106 for (p = start; p < end; ++p)
1110 unsigned int offset = p - start;
1115 case SECTION_SCRIPT_ID_PYTHON_FILE:
1116 case SECTION_SCRIPT_ID_PYTHON_TEXT:
1119 case SECTION_SCRIPT_ID_SCHEME_FILE:
1120 case SECTION_SCRIPT_ID_SCHEME_TEXT:
1124 warning (
_(
"Invalid entry in %s section"), section_name);
1131 while (p < end && *p !=
'\0')
1135 warning (
_(
"Non-nul-terminated entry in %s at offset %u"),
1136 section_name, offset);
1143 case SECTION_SCRIPT_ID_PYTHON_FILE:
1144 case SECTION_SCRIPT_ID_SCHEME_FILE:
1147 warning (
_(
"Empty entry in %s at offset %u"),
1148 section_name, offset);
1152 section_name, offset, entry);
1154 case SECTION_SCRIPT_ID_PYTHON_TEXT:
1155 case SECTION_SCRIPT_ID_SCHEME_TEXT:
1157 section_name, offset, entry);
1168 bfd *abfd = objfile->
obfd;
1169 asection *scripts_sect;
1170 bfd_byte *data = NULL;
1172 scripts_sect = bfd_get_section_by_name (abfd, section_name);
1173 if (scripts_sect == NULL)
1176 if (!bfd_get_full_section_contents (abfd, scripts_sect, &data))
1177 warning (
_(
"Couldn't read %s section of %s"),
1178 section_name, bfd_get_filename (abfd));
1182 char *p = (
char *) data;
1186 p + bfd_get_section_size (scripts_sect));
1200 if (!global_auto_load
1239 VEC (loaded_script_ptr) **scripts_p;
1253 if (script->
language == data->language && re_exec (script->
name))
1254 VEC_safe_push (loaded_script_ptr, *data->scripts_p, script);
1293 return FILENAME_CMP (a->
name, b->
name);
1309 loaded_script_ptr script;
1314 for (i = 0;
VEC_iterate (loaded_script_ptr, scripts, i, script); ++i)
1329 VEC (loaded_script_ptr) *script_files, *script_texts;
1336 if (pattern && *pattern)
1338 char *re_err =
re_comp (pattern);
1341 error (
_(
"Invalid regexp: %s"), re_err);
1352 script_files =
VEC_alloc (loaded_script_ptr, 10);
1353 script_texts =
VEC_alloc (loaded_script_ptr, 10);
1375 nr_scripts = (
VEC_length (loaded_script_ptr, script_files)
1376 +
VEC_length (loaded_script_ptr, script_texts));
1380 if (nr_scripts > 0 && pattern == auto_load_info_scripts_pattern_nl)
1385 "AutoLoadedScriptsTable");
1397 if (nr_scripts == 0)
1399 if (pattern && *pattern)
1420 if (auto_load_local_gdbinit_pathname == NULL)
1422 else if (auto_load_local_gdbinit_loaded)
1424 auto_load_local_gdbinit_pathname);
1427 auto_load_local_gdbinit_pathname);
1438 const char *section_name,
unsigned offset)
1443 Unsupported auto-load script at offset %u in section %s\n\
1445 Use `info auto-load %s-scripts [REGEXP]' to list them."),
1460 const char *section_name,
unsigned offset)
1465 Missing auto-load script at offset %u in section %s\n\
1467 Use `info auto-load %s-scripts [REGEXP]' to list them."),
1484 length = args ? strlen (args) : 0;
1486 while (length > 0 && (args[length - 1] ==
' ' || args[length - 1] ==
'\t'))
1489 if (length == 0 || (strncmp (args,
"off", length) != 0
1490 && strncmp (args,
"0", length) != 0
1491 && strncmp (args,
"no", length) != 0
1492 && strncmp (args,
"disable", length) != 0))
1493 error (
_(
"Valid is only global 'set auto-load no'; "
1494 "otherwise check the auto-load sub-commands."));
1513 Auto-loading specific settings.\n\
1514 Configure various auto-load-specific variables such as\n\
1515 automatic loading of Python scripts."),
1516 &retval,
"set auto-load ",
1540 Show auto-loading specific settings.\n\
1541 Show configuration of various auto-load-specific variables such as\n\
1542 automatic loading of Python scripts."),
1543 &retval,
"show auto-load ",
1557 struct cleanup *infolist_chain;
1572 cmd_func (list, auto_load_info_scripts_pattern_nl, from_tty);
1591 Print current status of auto-loaded files.\n\
1592 Print whether various files like Python scripts or .gdbinit files have been\n\
1593 found and/or loaded."),
1594 &retval,
"info auto-load ",
1606 char *scripts_directory_help, *gdb_name_help, *python_name_help;
1607 char *guile_name_help;
1610 auto_load_pspace_data
1611 = register_program_space_data_with_cleanup (NULL,
1617 &auto_load_gdb_scripts,
_(
"\
1618 Enable or disable auto-loading of canned sequences of commands scripts."),
_(
"\
1619 Show whether auto-loading of canned sequences of commands scripts is enabled."),
1621 If enabled, canned sequences of commands are loaded when the debugger reads\n\
1622 an executable or shared library.\n\
1623 This options has security implications for untrusted inferiors."),
1629 _(
"Print the list of automatically loaded sequences of commands.\n\
1630 Usage: info auto-load gdb-scripts [REGEXP]"),
1634 &auto_load_local_gdbinit,
_(
"\
1635 Enable or disable auto-loading of .gdbinit script in current directory."),
_(
"\
1636 Show whether auto-loading .gdbinit script in current directory is enabled."),
1638 If enabled, canned sequences of commands are loaded when debugger starts\n\
1639 from .gdbinit file in current directory. Such files are deprecated,\n\
1640 use a script associated with inferior executable file instead.\n\
1641 This options has security implications for untrusted inferiors."),
1647 _(
"Print whether current directory .gdbinit file has been loaded.\n\
1648 Usage: info auto-load local-gdbinit"),
1656 GDB scripts: OBJFILE%s\n"),
1658 python_name_help = NULL;
1663 Python scripts: OBJFILE%s\n"),
1666 guile_name_help = NULL;
1671 Guile scripts: OBJFILE%s\n"),
1674 scripts_directory_help
1676 Automatically loaded scripts are located in one of the directories listed\n\
1682 This option is ignored for the kinds of scripts \
1683 having 'set auto-load ... off'.\n\
1684 Directories listed here need to be present also \
1685 in the 'set auto-load safe-path'\n\
1688 python_name_help ? python_name_help :
"",
1689 guile_name_help ? guile_name_help :
"");
1692 &auto_load_dir,
_(
"\
1693 Set the list of directories from which to load auto-loaded scripts."),
_(
"\
1694 Show the list of directories from which to load auto-loaded scripts."),
1695 scripts_directory_help,
1699 xfree (scripts_directory_help);
1700 xfree (python_name_help);
1701 xfree (gdb_name_help);
1702 xfree (guile_name_help);
1707 &auto_load_safe_path,
_(
"\
1708 Set the list of files and directories that are safe for auto-loading."),
_(
"\
1709 Show the list of files and directories that are safe for auto-loading."),
_(
"\
1710 Various files loaded automatically for the 'set auto-load ...' options must\n\
1711 be located in one of the directories listed by this option. Warning will be\n\
1712 printed and file will not be used otherwise.\n\
1713 You can mix both directory and filename entries.\n\
1714 Setting this parameter to an empty list resets it to its default value.\n\
1715 Setting this parameter to '/' (without the quotes) allows any file\n\
1716 for the 'set auto-load ...' options. Each path entry can be also shell\n\
1717 wildcard pattern; '*' does not match directory separator.\n\
1718 This option is ignored for the kinds of files having 'set auto-load ... off'.\n\
1719 This options has security implications for untrusted inferiors."),
1728 _(
"Add entries to the list of directories from which it is safe "
1729 "to auto-load files.\n\
1730 See the commands 'set auto-load safe-path' and 'show auto-load safe-path' to\n\
1731 access the current full list setting."),
1737 _(
"Add entries to the list of directories from which to load "
1738 "auto-loaded scripts.\n\
1739 See the commands 'set auto-load scripts-directory' and\n\
1740 'show auto-load scripts-directory' to access the current full list setting."),
1745 &debug_auto_load,
_(
"\
1746 Set auto-load verifications debugging."),
_(
"\
1747 Show auto-load verifications debugging."),
_(
"\
1748 When non-zero, debugging output for files of 'set auto-load ...'\n\
int unsupported_script_warning_printed
static void print_scripts(VEC(loaded_script_ptr)*scripts)
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc, struct cmd_list_element **prefixlist, const char *prefixname, int allow_unknown, struct cmd_list_element **list)
int script_not_found_warning_printed
static void auto_load_safe_path_vec_update(void)
static void show_auto_load_local_gdbinit(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
struct cmd_list_element * next
char * gdb_realpath(const char *filename)
static void show_debug_auto_load(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void free_char_ptr_vec(VEC(char_ptr)*char_ptr_vec)
#define VEC_replace(T, V, I, O)
const struct extension_language_defn extension_language_gdb
static void execute_script_contents(struct auto_load_pspace_info *pspace_info, struct objfile *objfile, const struct extension_language_defn *language, const char *section_name, unsigned int offset, const char *script)
static void maybe_print_unsupported_script_warning(struct auto_load_pspace_info *, struct objfile *objfile, const struct extension_language_defn *language, const char *section_name, unsigned offset)
static int auto_load_objfile_script_1(struct objfile *objfile, const char *realname, const struct extension_language_defn *language)
__extension__ enum cmd_types type
void warning(const char *fmt,...)
const struct extension_language_defn * language
struct cleanup * make_cleanup_ui_out_table_begin_end(struct ui_out *ui_out, int nr_cols, int nr_rows, const char *tblid)
int auto_load_local_gdbinit_loaded
void objfile_script_executor_func(const struct extension_language_defn *, struct objfile *, const char *name, const char *script)
struct cmd_list_element ** auto_load_set_cmdlist_get(void)
#define AUTO_LOAD_SAFE_PATH
char auto_load_info_scripts_pattern_nl[]
#define DIRNAME_SEPARATOR
static void info_auto_load_gdb_scripts(char *pattern, int from_tty)
#define AUTO_SECTION_NAME
static ATTRIBUTE_PURE int filename_is_in_pattern(const char *filename, const char *pattern)
#define VEC_safe_push(T, V, O)
#define OBJF_NOT_FILENAME
struct cmd_list_element * cmdlist
FILE * gdb_fopen_cloexec(const char *filename, const char *opentype)
static void set_auto_load_dir(char *args, int from_tty, struct cmd_list_element *c)
char * auto_load_local_gdbinit_pathname
const char * ext_lang_name(const struct extension_language_defn *extlang)
void substitute_path_component(char **stringp, const char *from, const char *to)
static struct auto_load_pspace_info * get_auto_load_pspace_data(struct program_space *pspace)
char * debug_file_directory
static void show_auto_load_dir(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void ui_out_text(struct ui_out *uiout, const char *string)
void printf_filtered(const char *format,...)
void null_cleanup(void *arg)
void auto_load_objfile_script(struct objfile *objfile, const struct extension_language_defn *language)
void cmd_func(struct cmd_list_element *cmd, char *args, int from_tty)
static void auto_load_new_objfile(struct objfile *objfile)
struct cmd_list_element * infolist
void _initialize_auto_load(void)
struct cmd_list_element * setlist
#define VEC_iterate(T, V, I, P)
static int sort_scripts_by_name(const void *ap, const void *bp)
struct htab * loaded_script_files
int auto_load_local_gdbinit
static int debug_auto_load
void objfile_script_sourcer_func(const struct extension_language_defn *, struct objfile *, FILE *stream, const char *filename)
static void source_section_scripts(struct objfile *objfile, const char *section_name, const char *start, const char *end)
void load_auto_scripts_for_objfile(struct objfile *objfile)
struct cleanup * make_cleanup_ui_out_tuple_begin_end(struct ui_out *uiout, const char *id)
void fprintf_filtered(struct ui_file *stream, const char *format,...)
static int filename_is_in_pattern_1(char *filename, char *pattern)
void set_cmd_completer(struct cmd_list_element *cmd, completer_ftype *completer)
static void set_auto_load_cmd(char *args, int from_tty)
void fprintf_unfiltered(struct ui_file *stream, const char *format,...)
static int maybe_add_script_text(struct auto_load_pspace_info *pspace_info, int loaded, const char *name, const struct extension_language_defn *language)
void vfprintf_unfiltered(struct ui_file *stream, const char *format, va_list args)
struct cmd_list_element * showlist
void ui_out_message(struct ui_out *uiout, int verbosity, const char *format,...)
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc, struct cmd_list_element **list)
void free_current_contents(void *ptr)
static void source_script_file(struct auto_load_pspace_info *pspace_info, struct objfile *objfile, const struct extension_language_defn *language, const char *section_name, unsigned int offset, const char *file)
__extension__ enum var_types var_type
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
static void info_auto_load_cmd(char *args, int from_tty)
struct cleanup * make_cleanup_free_char_ptr_vec(VEC(char_ptr)*char_ptr_vec)
#define VEC_index(T, V, I)
static void auto_load_gdb_datadir_changed(void)
static char * auto_load_dir
static int collect_matching_scripts(void **slot, void *info)
char * xstrprintf(const char *format,...)
int file_is_auto_load_safe(const char *filename, const char *debug_fmt,...)
struct cmd_list_element * setdebuglist
const char * objfile_name(const struct objfile *objfile)
struct loaded_script * loaded_script_ptr
struct ui_file * gdb_stdlog
void cmd_show_list(struct cmd_list_element *list, int from_tty, const char *prefix)
static int maybe_add_script_file(struct auto_load_pspace_info *pspace_info, int loaded, const char *name, const char *full_path, const struct extension_language_defn *language)
const struct extension_language_defn * get_ext_lang_defn(enum extension_language lang)
static void show_auto_load_safe_path(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static const struct program_space_data * auto_load_pspace_data
struct auto_load_pspace_info * get_auto_load_pspace_data_for_loading(struct program_space *pspace)
static char * auto_load_safe_path
struct cleanup * make_cleanup_fclose(FILE *file)
static int eq_loaded_script_entry(const void *a, const void *b)
static void add_auto_load_dir(char *args, int from_tty)
static void init_loaded_scripts_info(struct auto_load_pspace_info *pspace_info)
int auto_load_gdb_scripts_enabled(const struct extension_language_defn *extlang)
const char * ext_lang_auto_load_suffix(const struct extension_language_defn *extlang)
void auto_load_info_scripts(char *pattern, int from_tty, const struct extension_language_defn *language)
void ui_out_table_header(struct ui_out *uiout, int width, enum ui_align alignment, const char *col_name, const char *colhdr)
#define VEC_address(T, V)
int gdb_filename_fnmatch(const char *pattern, const char *string, int flags)
static void add_auto_load_safe_path(char *args, int from_tty)
DEF_VEC_P(loaded_script_ptr)
EXTERN_C char * re_comp(const char *)
struct program_space * current_program_space
struct observer * observer_attach_new_objfile(observer_new_objfile_ftype *f)
static void info_auto_load_local_gdbinit(char *args, int from_tty)
int find_and_open_script(const char *script_file, int search_path, FILE **streamp, char **full_pathp)
void do_set_command(const char *arg, int from_tty, struct cmd_list_element *c)
void auto_load_ext_lang_scripts_for_objfile(struct objfile *objfile)
struct cmd_list_element ** prefixlist
struct cmd_list_element * showdebuglist
int ext_lang_auto_load_enabled(const struct extension_language_defn *extlang)
static int filename_is_in_auto_load_safe_path_vec(const char *filename, char **filename_realp)
void ui_out_field_string(struct ui_out *uiout, const char *fldname, const char *string)
struct htab * loaded_script_texts
static void show_auto_load_cmd(char *args, int from_tty)
objfile_script_executor_func * ext_lang_objfile_script_executor(const struct extension_language_defn *extlang)
void ui_out_table_body(struct ui_out *uiout)
static void clear_section_scripts(void)
static int auto_load_gdb_scripts
static void auto_load_section_scripts(struct objfile *objfile, const char *section_name)
objfile_script_sourcer_func * ext_lang_objfile_script_sourcer(const struct extension_language_defn *extlang)
static void set_auto_load_safe_path(char *args, int from_tty, struct cmd_list_element *c)
struct observer * observer_attach_gdb_datadir_changed(observer_gdb_datadir_changed_ftype *f)
struct ui_out * current_uiout
struct cmd_list_element ** auto_load_show_cmdlist_get(void)
static void auto_load_pspace_data_cleanup(struct program_space *pspace, void *arg)
int is_target_filename(const char *name)
static hashval_t hash_loaded_script_entry(const void *data)
static void print_script(struct loaded_script *script)
void error(const char *fmt,...)
void add_setshow_optional_filename_cmd(const char *name, enum command_class theclass, char **var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void do_cleanups(struct cleanup *old_chain)
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static void show_auto_load_gdb_scripts(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
struct cmd_list_element ** auto_load_info_cmdlist_get(void)
static void maybe_print_script_not_found_warning(struct auto_load_pspace_info *, struct objfile *objfile, const struct extension_language_defn *language, const char *section_name, unsigned offset)
const ULONGEST const LONGEST len