bfd_section_* macros
[deliverable/binutils-gdb.git] / gdb / auto-load.c
index 115d5c10e821eb6b33521b7b365c9eb4cf03a2af..136d53ffe137c4d7ba6f45bcbdffe44e365348c9 100644 (file)
@@ -61,7 +61,7 @@ static void maybe_print_script_not_found_warning
    const char *section_name, unsigned offset);
 
 /* Value of the 'set debug auto-load' configuration variable.  */
-static int debug_auto_load = 0;
+static bool debug_auto_load = false;
 
 /* "show" command for the debug_auto_load configuration variable.  */
 
@@ -79,7 +79,7 @@ show_debug_auto_load (struct ui_file *file, int from_tty,
    set auto-load gdb-scripts on|off
    This is true if we should auto-load associated scripts when an objfile
    is opened, false otherwise.  */
-static int auto_load_gdb_scripts = 1;
+static bool auto_load_gdb_scripts = true;
 
 /* "show" command for the auto_load_gdb_scripts configuration variable.  */
 
@@ -110,16 +110,16 @@ auto_load_gdb_scripts_enabled (const struct extension_language_defn *extlang)
    This flag exists to facilitate deferring auto-loading during start-up
    until after ./.gdbinit has been read; it may augment the search directories
    used to find the scripts.  */
-int global_auto_load = 1;
+bool global_auto_load = true;
 
 /* Auto-load .gdbinit file from the current directory?  */
-int auto_load_local_gdbinit = 1;
+bool auto_load_local_gdbinit = true;
 
 /* Absolute pathname to the current directory .gdbinit, if it exists.  */
 char *auto_load_local_gdbinit_pathname = NULL;
 
-/* Boolean value if AUTO_LOAD_LOCAL_GDBINIT_PATHNAME has been loaded.  */
-int auto_load_local_gdbinit_loaded = 0;
+/* if AUTO_LOAD_LOCAL_GDBINIT_PATHNAME has been loaded.  */
+bool auto_load_local_gdbinit_loaded = false;
 
 /* "show" command for the auto_load_local_gdbinit configuration variable.  */
 
@@ -1116,7 +1116,7 @@ auto_load_section_scripts (struct objfile *objfile, const char *section_name)
 
   scripts_sect = bfd_get_section_by_name (abfd, section_name);
   if (scripts_sect == NULL
-      || (bfd_get_section_flags (abfd, scripts_sect) & SEC_HAS_CONTENTS) == 0)
+      || (bfd_section_flags (scripts_sect) & SEC_HAS_CONTENTS) == 0)
     return;
 
   if (!bfd_get_full_section_contents (abfd, scripts_sect, &data))
@@ -1128,7 +1128,7 @@ auto_load_section_scripts (struct objfile *objfile, const char *section_name)
 
       char *p = (char *) data;
       source_section_scripts (objfile, section_name, p,
-                             p + bfd_get_section_size (scripts_sect));
+                             p + bfd_section_size (scripts_sect));
     }
 }
 
This page took 0.025556 seconds and 4 git commands to generate.