public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Use gdb_printf and gdb_vprintf in more places Date: Wed, 30 Mar 2022 18:49:30 +0000 (GMT) [thread overview] Message-ID: <20220330184930.8904C385801B@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cd1c3a45442e8ef68d062215d508c8104a8e008d commit cd1c3a45442e8ef68d062215d508c8104a8e008d Author: Tom Tromey <tromey@adacore.com> Date: Wed Mar 30 09:32:18 2022 -0600 Use gdb_printf and gdb_vprintf in more places 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); if (show_debug_regs) - fprintf_unfiltered - (gdb_stdlog, - "insert_hw_breakpoint on entry (addr=0x%08lx, len=%d))\n", - (unsigned long) addr, len); + gdb_printf (gdb_stdlog, + "insert_hw_breakpoint on entry (addr=0x%08lx, len=%d))\n", + (unsigned long) addr, len); ret = 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); if (show_debug_regs) - fprintf_unfiltered - (gdb_stdlog, "remove_hw_breakpoint on entry (addr=0x%08lx, len=%d))\n", - (unsigned long) addr, len); + gdb_printf (gdb_stdlog, + "remove_hw_breakpoint on entry (addr=0x%08lx, len=%d))\n", + (unsigned long) addr, len); ret = aarch64_handle_breakpoint (type, addr, len, 0 /* is_insert */, inferior_ptid, state); @@ -177,9 +176,9 @@ aarch64_insert_watchpoint (CORE_ADDR addr, int len, enum target_hw_bp_type type, = aarch64_get_debug_reg_state (inferior_ptid.pid ()); if (show_debug_regs) - fprintf_unfiltered (gdb_stdlog, - "insert_watchpoint on entry (addr=0x%08lx, len=%d)\n", - (unsigned long) addr, len); + gdb_printf (gdb_stdlog, + "insert_watchpoint on entry (addr=0x%08lx, len=%d)\n", + (unsigned long) addr, len); gdb_assert (type != hw_execute); @@ -208,9 +207,9 @@ aarch64_remove_watchpoint (CORE_ADDR addr, int len, enum target_hw_bp_type type, = aarch64_get_debug_reg_state (inferior_ptid.pid ()); if (show_debug_regs) - fprintf_unfiltered (gdb_stdlog, - "remove_watchpoint on entry (addr=0x%08lx, len=%d)\n", - (unsigned long) addr, len); + gdb_printf (gdb_stdlog, + "remove_watchpoint on entry (addr=0x%08lx, len=%d)\n", + (unsigned long) addr, len); gdb_assert (type != hw_execute); 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, ...) 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); }
reply other threads:[~2022-03-30 18:49 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220330184930.8904C385801B@sourceware.org \ --to=tromey@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).