summaryrefslogtreecommitdiff
path: root/gdb/arc-linux-nat.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-linux-nat.c
parentfb0f5031bbbe2bed505fe413e178e05807e8db19 (diff)
downloadbinutils-gdb-d8d1feb424fe57e54485212698f53fb90edbdf35.tar.gz
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-linux-nat.c')
-rw-r--r--gdb/arc-linux-nat.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/arc-linux-nat.c b/gdb/arc-linux-nat.c
index b03363a4865..642f3a769bd 100644
--- a/gdb/arc-linux-nat.c
+++ b/gdb/arc-linux-nat.c
@@ -46,6 +46,11 @@
/* Defines ps_err_e, struct ps_prochandle. */
#include "gdb_proc_service.h"
+/* Print an "arc-linux-nat" debug statement. */
+
+#define arc_linux_nat_debug_printf(fmt, ...) \
+ debug_prefixed_printf_cond (arc_debug, "arc-linux-nat", fmt, ##__VA_ARGS__)
+
/* Linux starting with 4.12 supports NT_ARC_V2 note type, which adds R30,
R58 and R59 registers, which are specific to ARC HS and aren't
available in ARC 700. */
@@ -219,9 +224,7 @@ void
fill_fpregset (const struct regcache *regcache,
gdb_fpregset_t *fpregsetp, int regnum)
{
- if (arc_debug)
- debug_printf ("arc-linux-nat: fill_fpregset called.");
- return;
+ arc_linux_nat_debug_printf ("called");
}
/* ARC doesn't have separate FP registers. This function is exported
@@ -230,9 +233,7 @@ fill_fpregset (const struct regcache *regcache,
void
supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
{
- if (arc_debug)
- debug_printf ("arc-linux-nat: supply_fpregset called.");
- return;
+ arc_linux_nat_debug_printf ("called");
}
/* Implement the "read_description" method of linux_nat_target. */
@@ -295,8 +296,7 @@ ps_err_e
ps_get_thread_area (struct ps_prochandle *ph, lwpid_t lwpid, int idx,
void **base)
{
- if (arc_debug)
- debug_printf ("arc-linux-nat: ps_get_thread_area called");
+ arc_linux_nat_debug_printf ("called");
if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
return PS_ERR;