aboutsummaryrefslogtreecommitdiff
path: root/gdb/arc-newlib-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-01-13 14:32:39 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2021-01-13 14:32:39 -0500
commitd8d1feb424fe57e54485212698f53fb90edbdf35 (patch)
tree8dcd8e0c4ce53efdf35f503ddd4a7ad7a958bbf0 /gdb/arc-newlib-tdep.c
parentfb0f5031bbbe2bed505fe413e178e05807e8db19 (diff)
downloadfsf-binutils-gdb-d8d1feb424fe57e54485212698f53fb90edbdf35.zip
fsf-binutils-gdb-d8d1feb424fe57e54485212698f53fb90edbdf35.tar.gz
fsf-binutils-gdb-d8d1feb424fe57e54485212698f53fb90edbdf35.tar.bz2
gdb: convert arc to new-style debug macros
Add the standard arc_debug_printf, but also arc_linux_debug_printf, arc_linux_nat_debug_printf and arc_newlib_debug_printf to match the prefixes currently used in the debug messages. gdb/ChangeLog: * arc-tdep.h (arc_debug_printf): New. * arc-tdep.c: Use arc_debug_printf. * arc-linux-nat.c (arc_linux_nat_debug_printf): Add and use. * arc-linux-tdep.c (arc_linux_debug_printf): Add and use. * arc-newlib-tdep.c (arc_newlib_debug_printf): Add and use. Change-Id: I5d937566ed7a1925f7982e8809802c8f0560d8c6
Diffstat (limited to 'gdb/arc-newlib-tdep.c')
-rw-r--r--gdb/arc-newlib-tdep.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gdb/arc-newlib-tdep.c b/gdb/arc-newlib-tdep.c
index 8a83aaf..325e11b 100644
--- a/gdb/arc-newlib-tdep.c
+++ b/gdb/arc-newlib-tdep.c
@@ -24,13 +24,17 @@
#include "arc-tdep.h"
#include "osabi.h"
+/* Print an "arc-newlib" debug statement. */
+
+#define arc_newlib_debug_printf(fmt, ...) \
+ debug_prefixed_printf_cond (arc_debug, "arc-newlib", fmt, ##__VA_ARGS__)
+
/* Implement the 'init_osabi' method of struct gdb_osabi_handler. */
static void
arc_newlib_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- if (arc_debug)
- debug_printf ("arc-newlib: Initialization.\n");
+ arc_newlib_debug_printf ("Initialization.");
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
@@ -44,8 +48,7 @@ arc_newlib_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
static enum gdb_osabi
arc_newlib_osabi_sniffer (bfd *abfd)
{
- if (arc_debug)
- debug_printf ("arc-newlib: OS/ABI sniffer.\n");
+ arc_newlib_debug_printf ("OS/ABI sniffer.");
/* crt0.S in libgloss for ARC defines .ivt section for interrupt handlers.
If this section is not present then this is likely not a newlib - could be