From 4dc84fd1097fab1fb14a6c77a6b77003296d27eb Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Tue, 17 Apr 2012 15:56:21 +0000 Subject: gdb/ New option "set debug auto-load". * NEWS: New commands "set debug auto-load" and "show debug auto-load". * auto-load.c (debug_auto_load, show_debug_auto_load: New. (auto_load_safe_path_vec_update) (filename_is_in_auto_load_safe_path_vec): Call fprintf_unfiltered if DEBUG_AUTO_LOAD. (file_is_auto_load_safe): New parameters debug_fmt and .... Call fprintf_unfiltered if DEBUG_AUTO_LOAD. (source_gdb_script_for_objfile): Extend the file_is_auto_load_safe caller by explanatory string. (_initialize_auto_load): Register "set debug auto-load". * auto-load.h (file_is_auto_load_safe): New parameters debug_fmt and .... * linux-thread-db.c (try_thread_db_load_from_pdir_1) (try_thread_db_load_from_dir): Extend the file_is_auto_load_safe caller by explanatory string. * main.c (captured_main): Likewise. * python/py-auto-load.c (gdbpy_load_auto_script_for_objfile) (source_section_scripts): Likewise. gdb/doc/ New option "set debug auto-load". * gdb.texinfo (Auto-loading): New menu item for auto-load verbose mode. (auto-load verbose mode): New node. --- gdb/python/py-auto-load.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'gdb/python') diff --git a/gdb/python/py-auto-load.c b/gdb/python/py-auto-load.c index c54194d..8512129 100644 --- a/gdb/python/py-auto-load.c +++ b/gdb/python/py-auto-load.c @@ -75,7 +75,10 @@ gdbpy_load_auto_script_for_objfile (struct objfile *objfile, FILE *file, int is_safe; struct auto_load_pspace_info *pspace_info; - is_safe = file_is_auto_load_safe (filename); + is_safe = file_is_auto_load_safe (filename, + _("auto-load: Loading Python script \"%s\" " + "by extension for objfile \"%s\".\n"), + filename, objfile->name); /* Add this script to the hash table too so "info auto-load python-scripts" can print it. */ @@ -153,7 +156,12 @@ source_section_scripts (struct objfile *objfile, const char *source_name, make_cleanup_fclose (stream); make_cleanup (xfree, full_path); - if (!file_is_auto_load_safe (full_path)) + if (!file_is_auto_load_safe (full_path, + _("auto-load: Loading Python script " + "\"%s\" from section \"%s\" of " + "objfile \"%s\".\n"), + full_path, GDBPY_AUTO_SECTION_NAME, + objfile->name)) opened = 0; } else -- cgit v1.1