diff options
author | Doug Evans <xdje42@gmail.com> | 2013-12-04 22:08:38 -0800 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2013-12-04 22:08:38 -0800 |
commit | c47cf547421caf8a45511c57ad12ec358a405a37 (patch) | |
tree | b9b89d8dd8d99024629536d194064bda7a0ec8e2 /gdb/auto-load.c | |
parent | 170d82c9517d608476e206425253939af4719273 (diff) | |
download | gdb-c47cf547421caf8a45511c57ad12ec358a405a37.zip gdb-c47cf547421caf8a45511c57ad12ec358a405a37.tar.gz gdb-c47cf547421caf8a45511c57ad12ec358a405a37.tar.bz2 |
* auto-load.c (load_auto_scripts_for_objfile): Add some comments.
Diffstat (limited to 'gdb/auto-load.c')
-rw-r--r-- | gdb/auto-load.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/auto-load.c b/gdb/auto-load.c index 02b08be..e516c6a 100644 --- a/gdb/auto-load.c +++ b/gdb/auto-load.c @@ -1015,12 +1015,17 @@ auto_load_section_scripts (struct objfile *objfile, const char *section_name) void load_auto_scripts_for_objfile (struct objfile *objfile) { + /* Return immediately if auto-loading has been globally disabled. + This is to handle sequencing of operations during gdb startup. + Also return immediately if OBJFILE is not actually a file. */ if (!global_auto_load || (objfile->flags & OBJF_NOT_FILENAME) != 0) return; + /* Load any scripts for this objfile. e.g. foo-gdb.gdb, foo-gdb.py. */ auto_load_objfile_script (objfile, &script_language_gdb); auto_load_objfile_script (objfile, gdbpy_script_language_defn ()); + /* Load any scripts mentioned in AUTO_SECTION_NAME (.debug_gdb_scripts). */ auto_load_section_scripts (objfile, AUTO_SECTION_NAME); } |