From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QAvsNjpmrV9VUQAAWB0awg (envelope-from ) for ; Thu, 12 Nov 2020 11:43:38 -0500 Received: by simark.ca (Postfix, from userid 112) id D4C821F08B; Thu, 12 Nov 2020 11:43:38 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id E91FC1E58E for ; Thu, 12 Nov 2020 11:43:37 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 71192386F005; Thu, 12 Nov 2020 16:43:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 71192386F005 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1605199417; bh=0l5nx91F/eNeaim85zWg4P2dqDXP7x4U88wxFN72nQ4=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ue1xgkEBsLYV9cg3EvCuASTC1CzYsGyLg0VnW7B/c6aCjWqnv2gfYf9JFPJsV6Gcf X5XiR48hG7DdmwrtmhxlZhPsXdiww4UIgg/xVuUiYuhxNS9lS5X5deilvlhbiHAkMb oV4nodpbUOlrqOGgmjtEmULaLErkbMZ62XtDUGNk= Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id AF61B386F005 for ; Thu, 12 Nov 2020 16:43:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AF61B386F005 X-ASG-Debug-ID: 1605199412-0c856e6cd5996c0001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id v4uFlQiYxhbRyDzI (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 12 Nov 2020 11:43:32 -0500 (EST) X-Barracuda-Envelope-From: simon.marchi@polymtl.ca X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from simark.localdomain (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) by smtp.ebox.ca (Postfix) with ESMTP id 4E5D7441B21; Thu, 12 Nov 2020 11:43:32 -0500 (EST) X-Barracuda-RBL-IP: 173.246.6.90 X-Barracuda-Effective-Source-IP: 173-246-6-90.qc.cable.ebox.net[173.246.6.90] X-Barracuda-Apparent-Source-IP: 173.246.6.90 To: gdb-patches@sourceware.org Subject: [PATCH] gdb: convert "set debug dwarf-read" to new style Date: Thu, 12 Nov 2020 11:43:31 -0500 X-ASG-Orig-Subj: [PATCH] gdb: convert "set debug dwarf-read" to new style Message-Id: <20201112164331.1249288-1-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.29.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1605199412 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-Scan-Msg-Size: 18598 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.85824 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Add dwarf_read_debug_printf and dwarf_read_debug_printf_v macros and use them throughout dwarf2/read.c. The second one is used for "verbose" prints, when the value of "set debug dwarf-read" is >= 2. gdb/ChangeLog: * dwarf2/read.c (dwarf_read_debug_printf, dwarf_read_debug_printf_v): New macros, use throughout the file. Change-Id: I694da69da2e1f2caa4c27a421a975790636411e2 --- gdb/dwarf2/read.c | 266 ++++++++++++++++++++-------------------------- 1 file changed, 114 insertions(+), 152 deletions(-) diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index dbf0a3e25b93..ec936e4f6b4e 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -93,6 +93,26 @@ This is in contrast to the low level DIE reading of dwarf_die_debug. */ static unsigned int dwarf_read_debug = 0; +/* Print a "dwarf-read" debug statement if dwarf_read_debug is >= 1. */ + +#define dwarf_read_debug_printf(fmt, ...) \ + do \ + { \ + if (dwarf_read_debug >= 1) \ + debug_prefixed_printf ("dwarf-read", __func__, fmt, ##__VA_ARGS__); \ + } \ + while (0) + +/* Print a "dwarf-read" debug statement if dwarf_read_debug is >= 2. */ + +#define dwarf_read_debug_printf_v(fmt, ...) \ + do \ + { \ + if (dwarf_read_debug >= 2) \ + debug_prefixed_printf ("dwarf-read", __func__, fmt, ##__VA_ARGS__); \ + } \ + while (0) + /* When non-zero, dump DIEs after they are read in. */ static unsigned int dwarf_die_debug = 0; @@ -6376,10 +6396,9 @@ create_debug_type_hash_table (dwarf2_per_objfile *per_objfile, ? &dwo_file->sections.abbrev : &per_objfile->per_bfd->abbrev); - if (dwarf_read_debug) - fprintf_unfiltered (gdb_stdlog, "Reading %s for %s:\n", - section->get_name (), - abbrev_section->get_file_name ()); + dwarf_read_debug_printf ("Reading %s for %s:", + section->get_name (), + abbrev_section->get_file_name ()); section->read (objfile); info_ptr = section->buffer; @@ -6491,10 +6510,9 @@ create_debug_type_hash_table (dwarf2_per_objfile *per_objfile, } *slot = dwo_file ? (void *) dwo_tu : (void *) sig_type; - if (dwarf_read_debug > 1) - fprintf_unfiltered (gdb_stdlog, " offset %s, signature %s\n", - sect_offset_str (sect_off), - hex_string (header.signature)); + dwarf_read_debug_printf_v (" offset %s, signature %s", + sect_offset_str (sect_off), + hex_string (header.signature)); info_ptr += length; } @@ -7662,16 +7680,14 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader, and build a psymtab for each of them. */ dwarf2_build_include_psymtabs (cu, comp_unit_die, pst); - if (dwarf_read_debug) - fprintf_unfiltered (gdb_stdlog, - "Psymtab for %s unit @%s: %s - %s" - ", %d global, %d static syms\n", - per_cu->is_debug_types ? "type" : "comp", - sect_offset_str (per_cu->sect_off), - paddress (gdbarch, pst->text_low (objfile)), - paddress (gdbarch, pst->text_high (objfile)), - (int) pst->global_psymbols.size (), - (int) pst->static_psymbols.size ()); + dwarf_read_debug_printf ("Psymtab for %s unit @%s: %s - %s" + ", %d global, %d static syms", + per_cu->is_debug_types ? "type" : "comp", + sect_offset_str (per_cu->sect_off), + paddress (gdbarch, pst->text_low (objfile)), + paddress (gdbarch, pst->text_high (objfile)), + (int) pst->global_psymbols.size (), + (int) pst->static_psymbols.size ()); } /* Subroutine of dwarf2_build_psymtabs_hard to simplify it. @@ -7837,8 +7853,7 @@ build_type_psymtabs_1 (dwarf2_per_objfile *per_objfile) [IWBN if DWO skeletons had DW_AT_stmt_list] call FUNC */ - if (dwarf_read_debug) - fprintf_unfiltered (gdb_stdlog, "Building type unit groups ...\n"); + dwarf_read_debug_printf ("Building type unit groups ..."); /* Sort in a separate table to maintain the order of all_type_units for .gdb_index: TU indices directly index all_type_units. */ @@ -7883,19 +7898,19 @@ print_tu_stats (dwarf2_per_objfile *per_objfile) { struct tu_stats *tu_stats = &per_objfile->per_bfd->tu_stats; - fprintf_unfiltered (gdb_stdlog, "Type unit statistics:\n"); - fprintf_unfiltered (gdb_stdlog, " %zu TUs\n", - per_objfile->per_bfd->all_type_units.size ()); - fprintf_unfiltered (gdb_stdlog, " %d uniq abbrev tables\n", - tu_stats->nr_uniq_abbrev_tables); - fprintf_unfiltered (gdb_stdlog, " %d symtabs from stmt_list entries\n", - tu_stats->nr_symtabs); - fprintf_unfiltered (gdb_stdlog, " %d symtab sharers\n", - tu_stats->nr_symtab_sharers); - fprintf_unfiltered (gdb_stdlog, " %d type units without a stmt_list\n", - tu_stats->nr_stmt_less_type_units); - fprintf_unfiltered (gdb_stdlog, " %d all_type_units reallocs\n", - tu_stats->nr_all_type_units_reallocs); + dwarf_read_debug_printf ("Type unit statistics:"); + dwarf_read_debug_printf (" %zu TUs", + per_objfile->per_bfd->all_type_units.size ()); + dwarf_read_debug_printf (" %d uniq abbrev tables", + tu_stats->nr_uniq_abbrev_tables); + dwarf_read_debug_printf (" %d symtabs from stmt_list entries", + tu_stats->nr_symtabs); + dwarf_read_debug_printf (" %d symtab sharers", + tu_stats->nr_symtab_sharers); + dwarf_read_debug_printf (" %d type units without a stmt_list", + tu_stats->nr_stmt_less_type_units); + dwarf_read_debug_printf (" %d all_type_units reallocs", + tu_stats->nr_all_type_units_reallocs); } /* Traversal function for build_type_psymtabs. */ @@ -8040,11 +8055,8 @@ dwarf2_build_psymtabs_hard (dwarf2_per_objfile *per_objfile) { struct objfile *objfile = per_objfile->objfile; - if (dwarf_read_debug) - { - fprintf_unfiltered (gdb_stdlog, "Building psymtabs of objfile %s ...\n", - objfile_name (objfile)); - } + dwarf_read_debug_printf ("Building psymtabs of objfile %s ...", + objfile_name (objfile)); scoped_restore restore_reading_psyms = make_scoped_restore (&per_objfile->per_bfd->reading_partial_symbols, @@ -8087,7 +8099,7 @@ dwarf2_build_psymtabs_hard (dwarf2_per_objfile *per_objfile) build_type_psymtab_dependencies, per_objfile); } - if (dwarf_read_debug) + if (dwarf_read_debug > 0) print_tu_stats (per_objfile); set_partial_user (per_objfile); @@ -8098,9 +8110,8 @@ dwarf2_build_psymtabs_hard (dwarf2_per_objfile *per_objfile) /* At this point we want to keep the address map. */ save_psymtabs_addrmap.release (); - if (dwarf_read_debug) - fprintf_unfiltered (gdb_stdlog, "Done building psymtabs of %s\n", - objfile_name (objfile)); + dwarf_read_debug_printf ("Done building psymtabs of %s", + objfile_name (objfile)); } /* Load the partial DIEs for a secondary CU into memory. @@ -8137,10 +8148,9 @@ read_comp_units_from_section (dwarf2_per_objfile *per_objfile, const gdb_byte *info_ptr; struct objfile *objfile = per_objfile->objfile; - if (dwarf_read_debug) - fprintf_unfiltered (gdb_stdlog, "Reading %s for %s\n", - section->get_name (), - section->get_file_name ()); + dwarf_read_debug_printf ("Reading %s for %s", + section->get_name (), + section->get_file_name ()); section->read (objfile); @@ -9106,12 +9116,8 @@ maybe_queue_comp_unit (struct dwarf2_cu *dependent_cu, static void process_queue (dwarf2_per_objfile *per_objfile) { - if (dwarf_read_debug) - { - fprintf_unfiltered (gdb_stdlog, - "Expanding one or more symtabs of objfile %s ...\n", - objfile_name (per_objfile->objfile)); - } + dwarf_read_debug_printf ("Expanding one or more symtabs of objfile %s ...", + objfile_name (per_objfile->objfile)); /* The queue starts out with one item, but following a DIE reference may load a new CU, adding it to the end of the queue. */ @@ -9150,7 +9156,7 @@ process_queue (dwarf2_per_objfile *per_objfile) } if (dwarf_read_debug >= debug_print_threshold) - fprintf_unfiltered (gdb_stdlog, "Expanding symtab of %s\n", buf); + dwarf_read_debug_printf ("Expanding symtab of %s", buf); if (per_cu->is_debug_types) process_full_type_unit (cu, item.pretend_language); @@ -9158,7 +9164,7 @@ process_queue (dwarf2_per_objfile *per_objfile) process_full_comp_unit (cu, item.pretend_language); if (dwarf_read_debug >= debug_print_threshold) - fprintf_unfiltered (gdb_stdlog, "Done expanding %s\n", buf); + dwarf_read_debug_printf ("Done expanding %s", buf); } } @@ -9166,11 +9172,8 @@ process_queue (dwarf2_per_objfile *per_objfile) per_objfile->per_bfd->queue.pop (); } - if (dwarf_read_debug) - { - fprintf_unfiltered (gdb_stdlog, "Done expanding symtabs of %s.\n", - objfile_name (per_objfile->objfile)); - } + dwarf_read_debug_printf ("Done expanding symtabs of %s.", + objfile_name (per_objfile->objfile)); } /* Read in full symbols for PST, and anything it depends on. */ @@ -11469,10 +11472,9 @@ create_dwo_cu_reader (const struct die_reader_specs *reader, dwo_unit->sect_off = sect_off; dwo_unit->length = cu->per_cu->length; - if (dwarf_read_debug) - fprintf_unfiltered (gdb_stdlog, " offset %s, dwo_id %s\n", - sect_offset_str (sect_off), - hex_string (dwo_unit->signature)); + dwarf_read_debug_printf (" offset %s, dwo_id %s", + sect_offset_str (sect_off), + hex_string (dwo_unit->signature)); } /* Create the dwo_units for the CUs in a DWO_FILE. @@ -11493,12 +11495,9 @@ create_cus_hash_table (dwarf2_per_objfile *per_objfile, if (info_ptr == NULL) return; - if (dwarf_read_debug) - { - fprintf_unfiltered (gdb_stdlog, "Reading %s for %s:\n", - section.get_name (), - section.get_file_name ()); - } + dwarf_read_debug_printf ("Reading %s for %s:", + section.get_name (), + section.get_file_name ()); end_ptr = info_ptr + section.size; while (info_ptr < end_ptr) @@ -12030,13 +12029,9 @@ create_dwo_unit_in_dwp_v1 (dwarf2_per_objfile *per_objfile, gdb_assert (dwp_file->version == 1); - if (dwarf_read_debug) - { - fprintf_unfiltered (gdb_stdlog, "Reading %s %s/%s in DWP V1 file: %s\n", - kind, - pulongest (unit_index), hex_string (signature), - dwp_file->name); - } + dwarf_read_debug_printf ("Reading %s %s/%s in DWP V1 file: %s", + kind, pulongest (unit_index), hex_string (signature), + dwp_file->name); /* Fetch the sections of this DWO unit. Put a limit on the number of sections we look for so that bad data @@ -12115,11 +12110,9 @@ create_dwo_unit_in_dwp_v1 (dwarf2_per_objfile *per_objfile, /* Create one if necessary. */ if (*dwo_file_slot == NULL) { - if (dwarf_read_debug) - { - fprintf_unfiltered (gdb_stdlog, "Creating virtual DWO: %s\n", - virtual_dwo_name.c_str ()); - } + dwarf_read_debug_printf ("Creating virtual DWO: %s", + virtual_dwo_name.c_str ()); + dwo_file = new struct dwo_file; dwo_file->dwo_name = per_objfile->objfile->intern (virtual_dwo_name); dwo_file->comp_dir = comp_dir; @@ -12142,11 +12135,9 @@ create_dwo_unit_in_dwp_v1 (dwarf2_per_objfile *per_objfile, } else { - if (dwarf_read_debug) - { - fprintf_unfiltered (gdb_stdlog, "Using existing virtual DWO: %s\n", - virtual_dwo_name.c_str ()); - } + dwarf_read_debug_printf ("Using existing virtual DWO: %s", + virtual_dwo_name.c_str ()); + dwo_file = (struct dwo_file *) *dwo_file_slot; } @@ -12227,13 +12218,9 @@ create_dwo_unit_in_dwp_v2 (dwarf2_per_objfile *per_objfile, gdb_assert (dwp_file->version == 2); - if (dwarf_read_debug) - { - fprintf_unfiltered (gdb_stdlog, "Reading %s %s/%s in DWP V2 file: %s\n", - kind, - pulongest (unit_index), hex_string (signature), - dwp_file->name); - } + dwarf_read_debug_printf ("Reading %s %s/%s in DWP V2 file: %s", + kind, pulongest (unit_index), hex_string (signature), + dwp_file->name); /* Fetch the section offsets of this DWO unit. */ @@ -12308,11 +12295,9 @@ create_dwo_unit_in_dwp_v2 (dwarf2_per_objfile *per_objfile, /* Create one if necessary. */ if (*dwo_file_slot == NULL) { - if (dwarf_read_debug) - { - fprintf_unfiltered (gdb_stdlog, "Creating virtual DWO: %s\n", - virtual_dwo_name.c_str ()); - } + dwarf_read_debug_printf ("Creating virtual DWO: %s", + virtual_dwo_name.c_str ()); + dwo_file = new struct dwo_file; dwo_file->dwo_name = per_objfile->objfile->intern (virtual_dwo_name); dwo_file->comp_dir = comp_dir; @@ -12353,11 +12338,9 @@ create_dwo_unit_in_dwp_v2 (dwarf2_per_objfile *per_objfile, } else { - if (dwarf_read_debug) - { - fprintf_unfiltered (gdb_stdlog, "Using existing virtual DWO: %s\n", - virtual_dwo_name.c_str ()); - } + dwarf_read_debug_printf ("Using existing virtual DWO: %s", + virtual_dwo_name.c_str ()); + dwo_file = (struct dwo_file *) *dwo_file_slot; } @@ -12401,13 +12384,9 @@ create_dwo_unit_in_dwp_v5 (dwarf2_per_objfile *per_objfile, gdb_assert (dwp_file->version == 5); - if (dwarf_read_debug) - { - fprintf_unfiltered (gdb_stdlog, "Reading %s %s/%s in DWP V5 file: %s\n", - kind, - pulongest (unit_index), hex_string (signature), - dwp_file->name); - } + dwarf_read_debug_printf ("Reading %s %s/%s in DWP V5 file: %s", + kind, pulongest (unit_index), hex_string (signature), + dwp_file->name); /* Fetch the section offsets of this DWO unit. */ @@ -12488,11 +12467,9 @@ create_dwo_unit_in_dwp_v5 (dwarf2_per_objfile *per_objfile, /* Create one if necessary. */ if (*dwo_file_slot == NULL) { - if (dwarf_read_debug) - { - fprintf_unfiltered (gdb_stdlog, "Creating virtual DWO: %s\n", - virtual_dwo_name.c_str ()); - } + dwarf_read_debug_printf ("Creating virtual DWO: %s", + virtual_dwo_name.c_str ()); + dwo_file = new struct dwo_file; dwo_file->dwo_name = per_objfile->objfile->intern (virtual_dwo_name); dwo_file->comp_dir = comp_dir; @@ -12538,11 +12515,9 @@ create_dwo_unit_in_dwp_v5 (dwarf2_per_objfile *per_objfile, } else { - if (dwarf_read_debug) - { - fprintf_unfiltered (gdb_stdlog, "Using existing virtual DWO: %s\n", - virtual_dwo_name.c_str ()); - } + dwarf_read_debug_printf ("Using existing virtual DWO: %s", + virtual_dwo_name.c_str ()); + dwo_file = (struct dwo_file *) *dwo_file_slot; } @@ -12822,8 +12797,8 @@ open_and_init_dwo_file (dwarf2_cu *cu, const char *dwo_name, gdb_bfd_ref_ptr dbfd = open_dwo_file (per_objfile, dwo_name, comp_dir); if (dbfd == NULL) { - if (dwarf_read_debug) - fprintf_unfiltered (gdb_stdlog, "DWO file not found: %s\n", dwo_name); + dwarf_read_debug_printf ("DWO file not found: %s", dwo_name); + return NULL; } @@ -12851,8 +12826,7 @@ open_and_init_dwo_file (dwarf2_cu *cu, const char *dwo_name, rcuh_kind::TYPE); } - if (dwarf_read_debug) - fprintf_unfiltered (gdb_stdlog, "DWO file found: %s\n", dwo_name); + dwarf_read_debug_printf ("DWO file found: %s", dwo_name); return dwo_file.release (); } @@ -13114,8 +13088,8 @@ open_and_init_dwp_file (dwarf2_per_objfile *per_objfile) if (dbfd == NULL) { - if (dwarf_read_debug) - fprintf_unfiltered (gdb_stdlog, "DWP file not found: %s\n", dwp_name.c_str ()); + dwarf_read_debug_printf ("DWP file not found: %s", dwp_name.c_str ()); + return std::unique_ptr (); } @@ -13169,14 +13143,10 @@ open_and_init_dwp_file (dwarf2_per_objfile *per_objfile) dwp_file->loaded_cus = allocate_dwp_loaded_cutus_table (); dwp_file->loaded_tus = allocate_dwp_loaded_cutus_table (); - if (dwarf_read_debug) - { - fprintf_unfiltered (gdb_stdlog, "DWP file found: %s\n", dwp_file->name); - fprintf_unfiltered (gdb_stdlog, - " %s CUs, %s TUs\n", - pulongest (dwp_file->cus ? dwp_file->cus->nr_units : 0), - pulongest (dwp_file->tus ? dwp_file->tus->nr_units : 0)); - } + dwarf_read_debug_printf ("DWP file found: %s", dwp_file->name); + dwarf_read_debug_printf (" %s CUs, %s TUs", + pulongest (dwp_file->cus ? dwp_file->cus->nr_units : 0), + pulongest (dwp_file->tus ? dwp_file->tus->nr_units : 0)); return dwp_file; } @@ -13240,13 +13210,10 @@ lookup_dwo_cutu (dwarf2_cu *cu, const char *dwo_name, const char *comp_dir, if (dwo_cutu != NULL) { - if (dwarf_read_debug) - { - fprintf_unfiltered (gdb_stdlog, - "Virtual DWO %s %s found: @%s\n", - kind, hex_string (signature), - host_address_to_string (dwo_cutu)); - } + dwarf_read_debug_printf ("Virtual DWO %s %s found: @%s", + kind, hex_string (signature), + host_address_to_string (dwo_cutu)); + return dwo_cutu; } } @@ -13290,12 +13257,10 @@ lookup_dwo_cutu (dwarf2_cu *cu, const char *dwo_name, const char *comp_dir, if (dwo_cutu != NULL) { - if (dwarf_read_debug) - { - fprintf_unfiltered (gdb_stdlog, "DWO %s %s(%s) found: @%s\n", - kind, dwo_name, hex_string (signature), - host_address_to_string (dwo_cutu)); - } + dwarf_read_debug_printf ("DWO %s %s(%s) found: @%s", + kind, dwo_name, hex_string (signature), + host_address_to_string (dwo_cutu)); + return dwo_cutu; } } @@ -13305,11 +13270,8 @@ lookup_dwo_cutu (dwarf2_cu *cu, const char *dwo_name, const char *comp_dir, someone deleted the DWO/DWP file, or the search path isn't set up correctly to find the file. */ - if (dwarf_read_debug) - { - fprintf_unfiltered (gdb_stdlog, "DWO %s %s(%s) not found\n", - kind, dwo_name, hex_string (signature)); - } + dwarf_read_debug_printf ("DWO %s %s(%s) not found", + kind, dwo_name, hex_string (signature)); /* This is a warning and not a complaint because it can be caused by pilot error (e.g., user accidentally deleting the DWO). */ -- 2.29.1