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.
This commit is contained in:
Jan Kratochvil
2012-04-17 15:56:21 +00:00
parent bccbefd2aa
commit 4dc84fd109
9 changed files with 179 additions and 16 deletions

View File

@@ -870,7 +870,9 @@ try_thread_db_load_from_pdir_1 (struct objfile *obj)
gdb_assert (cp != NULL);
strcpy (cp + 1, LIBTHREAD_DB_SO);
if (!file_is_auto_load_safe (path))
if (!file_is_auto_load_safe (path, _("auto-load: Loading libthread-db "
"library \"%s\" from $pdir.\n"),
path))
result = 0;
else
result = try_thread_db_load (path);
@@ -940,7 +942,10 @@ try_thread_db_load_from_dir (const char *dir, size_t dir_len)
path[dir_len] = '/';
strcpy (path + dir_len + 1, LIBTHREAD_DB_SO);
if (!file_is_auto_load_safe (path))
if (!file_is_auto_load_safe (path, _("auto-load: Loading libthread-db "
"library \"%s\" from explicit "
"directory.\n"),
path))
result = 0;
else
result = try_thread_db_load (path);