summaryrefslogtreecommitdiffstats
path: root/lib/libproc/proc_regs.c
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2013-12-25 22:36:27 +0000
committermarkj <markj@FreeBSD.org>2013-12-25 22:36:27 +0000
commitd6a22c4af9f2bcdadc20850e58adf24c37c7407e (patch)
tree5bdcf42531efa1c8eb5b6b739eb9edfa90adb34a /lib/libproc/proc_regs.c
parente9055f74febe9413802e444141d5e339838b6f36 (diff)
downloadFreeBSD-src-d6a22c4af9f2bcdadc20850e58adf24c37c7407e.zip
FreeBSD-src-d6a22c4af9f2bcdadc20850e58adf24c37c7407e.tar.gz
MFC r256661 r257222 r257235 r257248 r257298.
MFC r256661: Fix the libproc build when DEBUG is defined. MFC r257222: Clean up the debug printing in libproc a bit. In particular: * Don't print any error messages to stderr unless DEBUG is defined. * Add a DPRINTFX macro for use when errno isn't set. * Print the error string from libelf when appropriate. MFC r257235: Remove an incorrect debug printf. MFC r257248: Fix the build with gcc. MFC r257298: Revert r257248 and fix the problem in a way that doesn't violate style(9).
Diffstat (limited to 'lib/libproc/proc_regs.c')
-rw-r--r--lib/libproc/proc_regs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libproc/proc_regs.c b/lib/libproc/proc_regs.c
index aac0125..145c8fe 100644
--- a/lib/libproc/proc_regs.c
+++ b/lib/libproc/proc_regs.c
@@ -76,7 +76,7 @@ proc_regget(struct proc_handle *phdl, proc_reg_t reg, unsigned long *regvalue)
#endif
break;
default:
- warn("ERROR: no support for reg number %d", reg);
+ DPRINTFX("ERROR: no support for reg number %d", reg);
return (-1);
}
@@ -119,7 +119,7 @@ proc_regset(struct proc_handle *phdl, proc_reg_t reg, unsigned long regvalue)
#endif
break;
default:
- warn("ERROR: no support for reg number %d", reg);
+ DPRINTFX("ERROR: no support for reg number %d", reg);
return (-1);
}
if (ptrace(PT_SETREGS, proc_getpid(phdl), (caddr_t)&regs, 0) < 0)
OpenPOWER on IntegriCloud