forked from Imagelibrary/binutils-gdb
gdb: convert auto-load to new-style debug macros
Function file_is_auto_load_safe was taking a format string and varargs just to output a debug print. This is probably because that function is used in linux-thread-db.c and main.c, but debug_auto_load is static in auto-load.c. I simplified that, making debug_auto_load visible outside of auto-load.c, and making the callers of file_is_auto_load_safe output the debug print themselves. This file uses _() for internationalization of the debug messages. This is not necessary, as these are mostly messages for GDB developers, and it's not used in other files anyway. So I removed them. The rest is pretty much standard. gdb/ChangeLog: * auto-load.h (debug_auto_load): Move here. (auto_load_debug_printf): New. * auto-load.c: Use auto_load_debug_printf. (debug_auto_load): Move to header. * linux-thread-db.c (try_thread_db_load): Use auto_load_debug_printf. * main.c (captured_main_1): Likewise. Change-Id: I468dc2a1d24b7dbf171f55181a11abbfafe70ba1
This commit is contained in:
@@ -976,10 +976,11 @@ try_thread_db_load (const char *library, bool check_auto_load_safe)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!file_is_auto_load_safe (library, _("auto-load: Loading libthread-db "
|
||||
"library \"%s\" from explicit "
|
||||
"directory.\n"),
|
||||
library))
|
||||
auto_load_debug_printf
|
||||
("Loading libthread-db library \"%s\" from explicit directory.",
|
||||
library);
|
||||
|
||||
if (!file_is_auto_load_safe (library))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user