[binutils-gdb] Print overload debug messages to gdb_stdlog

Tom Tromey 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=fbcead885e5c72d3dd2a46f860be5a474aa21691

commit fbcead885e5c72d3dd2a46f860be5a474aa21691
Author: Tom Tromey <[email protected]>
Date:   Thu Feb 19 12:15:05 2026 -0700

    Print overload debug messages to gdb_stdlog
    
    I noticed that overload debugging messages go to gdb_stderr.  I think
    the usual convention is that debug output goes to gdb_stdlog, so this
    patch makes this change.
    
    Reviewed-By: Keith Seitz <[email protected]>

Diff:
---
 gdb/gdbtypes.c |  2 +-
 gdb/valops.c   | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 49941e44628..dcfdc6b56c6 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -4716,7 +4716,7 @@ rank_one_type (struct type *parm, struct type *arg, struct value *value)
   if (overload_debug)
     {
       /* Debugging only.  */
-      gdb_printf (gdb_stderr,
+      gdb_printf (gdb_stdlog,
 		  "------ Arg is %s [%d], parm is %s [%d]\n",
 		  arg->name (), arg->code (),
 		  parm->name (), parm->code ());
diff --git a/gdb/valops.c b/gdb/valops.c
index 7725a230ab2..494ed9aaa98 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -3248,26 +3248,26 @@ find_oload_champ (gdb::array_view<value *> args,
       if (overload_debug)
 	{
 	  if (methods != NULL)
-	    gdb_printf (gdb_stderr,
+	    gdb_printf (gdb_stdlog,
 			"Overloaded method instance %s, # of parms %d\n",
 			methods[ix].physname, (int) parm_types.size ());
 	  else if (xmethods != NULL)
-	    gdb_printf (gdb_stderr,
+	    gdb_printf (gdb_stdlog,
 			"Xmethod worker, # of parms %d\n",
 			(int) parm_types.size ());
 	  else
-	    gdb_printf (gdb_stderr,
+	    gdb_printf (gdb_stdlog,
 			"Overloaded function instance "
 			"%s # of parms %d\n",
 			functions[ix]->demangled_name (),
 			(int) parm_types.size ());
 
-	  gdb_printf (gdb_stderr,
+	  gdb_printf (gdb_stdlog,
 		      "...Badness of length : {%d, %d}\n",
 		      bv[0].rank, bv[0].subrank);
 
 	  for (jj = 1; jj < bv.size (); jj++)
-	    gdb_printf (gdb_stderr,
+	    gdb_printf (gdb_stdlog,
 			"...Badness of arg %d : {%d, %d}\n",
 			jj, bv[jj].rank, bv[jj].subrank);
 	}
@@ -3297,7 +3297,7 @@ find_oload_champ (gdb::array_view<value *> args,
 	    break;
 	  }
       if (overload_debug)
-	gdb_printf (gdb_stderr, "Overload resolution "
+	gdb_printf (gdb_stdlog, "Overload resolution "
 		    "champion is %d, ambiguous? %d\n",
 		    oload_champ, oload_ambiguous);
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.