From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 8904C385801B; Wed, 30 Mar 2022 18:49:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8904C385801B Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Use gdb_printf and gdb_vprintf in more places X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: c50e54825bfea1ab6afbd984a4d2e78e9306e70f X-Git-Newrev: cd1c3a45442e8ef68d062215d508c8104a8e008d Message-Id: <20220330184930.8904C385801B@sourceware.org> Date: Wed, 30 Mar 2022 18:49:30 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2022 18:49:30 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dcd1c3a45442e= 8ef68d062215d508c8104a8e008d commit cd1c3a45442e8ef68d062215d508c8104a8e008d Author: Tom Tromey Date: Wed Mar 30 09:32:18 2022 -0600 Use gdb_printf and gdb_vprintf in more places =20 Luis pointed out that I missed a spot in the gdb_printf conversion -- namely aarch64-nat.c. While looking at this, I found another spot in darwin-nat.c that I also missed. I can't build either of these, but I think this patch should fix the problems. Diff: --- gdb/aarch64-nat.c | 25 ++++++++++++------------- gdb/darwin-nat.c | 2 +- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/gdb/aarch64-nat.c b/gdb/aarch64-nat.c index 85cf7f2011a..cd86c384a0e 100644 --- a/gdb/aarch64-nat.c +++ b/gdb/aarch64-nat.c @@ -114,10 +114,9 @@ aarch64_insert_hw_breakpoint (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc (gdbarch, &addr, &len); =20 if (show_debug_regs) - fprintf_unfiltered - (gdb_stdlog, - "insert_hw_breakpoint on entry (addr=3D0x%08lx, len=3D%d))\n", - (unsigned long) addr, len); + gdb_printf (gdb_stdlog, + "insert_hw_breakpoint on entry (addr=3D0x%08lx, len=3D%d))\n", + (unsigned long) addr, len); =20 ret =3D aarch64_handle_breakpoint (type, addr, len, 1 /* is_insert */, inferior_ptid, state); @@ -148,9 +147,9 @@ aarch64_remove_hw_breakpoint (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc (gdbarch, &addr, &len); =20 if (show_debug_regs) - fprintf_unfiltered - (gdb_stdlog, "remove_hw_breakpoint on entry (addr=3D0x%08lx, len=3D%= d))\n", - (unsigned long) addr, len); + gdb_printf (gdb_stdlog, + "remove_hw_breakpoint on entry (addr=3D0x%08lx, len=3D%d))\n", + (unsigned long) addr, len); =20 ret =3D aarch64_handle_breakpoint (type, addr, len, 0 /* is_insert */, inferior_ptid, state); @@ -177,9 +176,9 @@ aarch64_insert_watchpoint (CORE_ADDR addr, int len, enu= m target_hw_bp_type type, =3D aarch64_get_debug_reg_state (inferior_ptid.pid ()); =20 if (show_debug_regs) - fprintf_unfiltered (gdb_stdlog, - "insert_watchpoint on entry (addr=3D0x%08lx, len=3D%d)\n", - (unsigned long) addr, len); + gdb_printf (gdb_stdlog, + "insert_watchpoint on entry (addr=3D0x%08lx, len=3D%d)\n", + (unsigned long) addr, len); =20 gdb_assert (type !=3D hw_execute); =20 @@ -208,9 +207,9 @@ aarch64_remove_watchpoint (CORE_ADDR addr, int len, enu= m target_hw_bp_type type, =3D aarch64_get_debug_reg_state (inferior_ptid.pid ()); =20 if (show_debug_regs) - fprintf_unfiltered (gdb_stdlog, - "remove_watchpoint on entry (addr=3D0x%08lx, len=3D%d)\n", - (unsigned long) addr, len); + gdb_printf (gdb_stdlog, + "remove_watchpoint on entry (addr=3D0x%08lx, len=3D%d)\n", + (unsigned long) addr, len); =20 gdb_assert (type !=3D hw_execute); =20 diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c index 60d315b7063..17723656930 100644 --- a/gdb/darwin-nat.c +++ b/gdb/darwin-nat.c @@ -170,7 +170,7 @@ inferior_debug (int level, const char *fmt, ...) =20 va_start (ap, fmt); gdb_printf (gdb_stdlog, _("[%d inferior]: "), getpid ()); - vfprintf_unfiltered (gdb_stdlog, fmt, ap); + gdb_vprintf (gdb_stdlog, fmt, ap); va_end (ap); }