From b1e678d920e4468cfd69a40560ee24834f6bdce4 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Fri, 2 Dec 2022 12:10:10 +0000 Subject: gdb: convert 'set debug symbol-lookup' to new debug printing scheme Convert the implementation of 'set debug symbol-lookup' to the new debug printing scheme. In a few places I've updated the debug output to remove places where the printed debug message included the function name, the new debug scheme already adds that, but I haven't done all the possible updates. --- gdb/symtab.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gdb/symtab.h') diff --git a/gdb/symtab.h b/gdb/symtab.h index 4f3e84b..6eca61a 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -2625,6 +2625,18 @@ extern unsigned int symtab_create_debug; extern unsigned int symbol_lookup_debug; +/* Print a "symbol-lookup" debug statement if symbol_lookup_debug is >= 1. */ + +#define symbol_lookup_debug_printf(fmt, ...) \ + debug_prefixed_printf_cond (symbol_lookup_debug >= 1, "symbol-lookup", fmt, \ + ##__VA_ARGS__) + +/* Print a "symbol-lookup" debug statement if symbol_lookup_debug is >= 2. */ + +#define symbol_lookup_debug_printf_v(fmt, ...) \ + debug_prefixed_printf_cond (symbol_lookup_debug >= 2, "symbol-lookup", fmt, \ + ##__VA_ARGS__) + extern bool basenames_may_differ; bool compare_filenames_for_search (const char *filename, -- cgit v1.1