gdb: add AUTO_LOAD_SCOPED_DEBUG_ENTER_EXIT
Checks
Commit Message
Add the AUTO_LOAD_SCOPED_DEBUG_ENTER_EXIT macro, and make use of it in
one place.
---
gdb/auto-load.c | 5 +++++
gdb/auto-load.h | 5 +++++
2 files changed, 10 insertions(+)
base-commit: 9d3cf9efd51ebae3f45bb49e3544cb7eeb63a138
Comments
>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
Andrew> Add the AUTO_LOAD_SCOPED_DEBUG_ENTER_EXIT macro, and make use of it in
Andrew> one place.
Thanks.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
Tom Tromey <tom@tromey.com> writes:
>>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
>
> Andrew> Add the AUTO_LOAD_SCOPED_DEBUG_ENTER_EXIT macro, and make use of it in
> Andrew> one place.
>
> Thanks.
> Approved-By: Tom Tromey <tom@tromey.com>
Pushed.
Thanks,
Andrew
@@ -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));
@@ -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;