public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [commit] auto-load.c (load_auto_scripts_for_objfile): Add some comments
@ 2013-12-05  6:13 Doug Evans
  0 siblings, 0 replies; only message in thread
From: Doug Evans @ 2013-12-05  6:13 UTC (permalink / raw)
  To: gdb-patches

Hi.

I have these comments in a sandbox I'm working in and wanted to push
them first.

Committed.

2013-12-05  Doug Evans  <xdje42@gmail.com>

	* auto-load.c (load_auto_scripts_for_objfile): Add some comments.

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);
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-12-05  6:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-05  6:13 [commit] auto-load.c (load_auto_scripts_for_objfile): Add some comments Doug Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).