aboutsummaryrefslogtreecommitdiff
path: root/gdb/auto-load.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/auto-load.c')
-rw-r--r--gdb/auto-load.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/gdb/auto-load.c b/gdb/auto-load.c
index afc98eb..d4307ea 100644
--- a/gdb/auto-load.c
+++ b/gdb/auto-load.c
@@ -783,7 +783,7 @@ auto_load_objfile_script_1 (struct objfile *objfile, const char *realname,
/* Add this script to the hash table too so
"info auto-load ${lang}-scripts" can print it. */
pspace_info
- = get_auto_load_pspace_data_for_loading (objfile->pspace);
+ = get_auto_load_pspace_data_for_loading (objfile->pspace ());
maybe_add_script_file (pspace_info, is_safe, debugfile, debugfile,
language);
@@ -1048,7 +1048,7 @@ source_section_scripts (struct objfile *objfile, const char *section_name,
const char *start, const char *end)
{
auto_load_pspace_info *pspace_info
- = get_auto_load_pspace_data_for_loading (objfile->pspace);
+ = get_auto_load_pspace_data_for_loading (objfile->pspace ());
for (const char *p = start; p < end; ++p)
{
@@ -1114,25 +1114,22 @@ auto_load_section_scripts (struct objfile *objfile, const char *section_name)
{
bfd *abfd = objfile->obfd.get ();
asection *scripts_sect;
- bfd_byte *data = NULL;
scripts_sect = bfd_get_section_by_name (abfd, section_name);
if (scripts_sect == NULL
|| (bfd_section_flags (scripts_sect) & SEC_HAS_CONTENTS) == 0)
return;
- if (!bfd_get_full_section_contents (abfd, scripts_sect, &data))
+ gdb::byte_vector data;
+ if (!gdb_bfd_get_full_section_contents (abfd, scripts_sect, &data))
warning (_("Couldn't read %s section of %ps"),
section_name,
styled_string (file_name_style.style (),
bfd_get_filename (abfd)));
else
{
- gdb::unique_xmalloc_ptr<bfd_byte> data_holder (data);
-
- char *p = (char *) data;
- source_section_scripts (objfile, section_name, p,
- p + bfd_section_size (scripts_sect));
+ const char *p = (const char *) data.data ();
+ source_section_scripts (objfile, section_name, p, p + data.size ());
}
}
@@ -1629,7 +1626,7 @@ This option has security implications for untrusted inferiors."),
See the commands 'set auto-load safe-path' and 'show auto-load safe-path' to\n\
access the current full list setting."),
&cmdlist);
- set_cmd_completer (cmd, filename_completer);
+ set_cmd_completer (cmd, deprecated_filename_completer);
cmd = add_cmd ("add-auto-load-scripts-directory", class_support,
add_auto_load_dir,
@@ -1638,7 +1635,7 @@ access the current full list setting."),
See the commands 'set auto-load scripts-directory' and\n\
'show auto-load scripts-directory' to access the current full list setting."),
&cmdlist);
- set_cmd_completer (cmd, filename_completer);
+ set_cmd_completer (cmd, deprecated_filename_completer);
add_setshow_boolean_cmd ("auto-load", class_maintenance,
&debug_auto_load, _("\