[binutils-gdb] gdb: add AUTO_LOAD_SCOPED_DEBUG_ENTER_EXIT
Andrew Burgess via Gdb-cvs <[email protected]>
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cc4600477f621c764011b8e2f5bf1a2ebcffb61a commit cc4600477f621c764011b8e2f5bf1a2ebcffb61a Author: Andrew Burgess <[email protected]> Date: Tue Apr 7 14:34:04 2026 +0100 gdb: add AUTO_LOAD_SCOPED_DEBUG_ENTER_EXIT Add the AUTO_LOAD_SCOPED_DEBUG_ENTER_EXIT macro, and make use of it in one place. Approved-By: Tom Tromey <[email protected]> Diff: --- gdb/auto-load.c | 5 +++++ gdb/auto-load.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/gdb/auto-load.c b/gdb/auto-load.c index bf9e6734ca9..55204ba4a1f 100644 --- a/gdb/auto-load.c +++ b/gdb/auto-load.c @@ -878,6 +878,11 @@ void auto_load_objfile_script (struct objfile *objfile, const struct extension_language_defn *language) { + AUTO_LOAD_SCOPED_DEBUG_ENTER_EXIT; + auto_load_debug_printf ("objfile: %s, language: %s", + objfile_name (objfile), + ext_lang_capitalized_name (language)); + gdb::unique_xmalloc_ptr<char> realname = gdb_realpath (objfile_name (objfile)); diff --git a/gdb/auto-load.h b/gdb/auto-load.h index d03c8493df0..d0da69373c3 100644 --- a/gdb/auto-load.h +++ b/gdb/auto-load.h @@ -40,6 +40,11 @@ extern bool debug_auto_load; #define auto_load_debug_printf(fmt, ...) \ debug_prefixed_printf_cond (debug_auto_load, "auto-load", fmt, ##__VA_ARGS__) +/* Print "auto-load" enter/exit debug statements. */ + +#define AUTO_LOAD_SCOPED_DEBUG_ENTER_EXIT \ + scoped_debug_enter_exit (debug_auto_load, "auto-load") + extern bool global_auto_load; extern bool auto_load_local_gdbinit;