Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/mips - #if DEBUG -> #ifdef FPEMUL_DEBUG
details: https://anonhg.NetBSD.org/src/rev/929aa0df3575
branches: trunk
changeset: 762716:929aa0df3575
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sat Feb 26 10:56:56 2011 +0000
description:
- #if DEBUG -> #ifdef FPEMUL_DEBUG
- use __func__ to print function name
- add debug printf()s in mips_fpuexcept() and mips_fpuillinst() too
diffstat:
sys/arch/mips/mips/mips_fputrap.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diffs (46 lines):
diff -r a6feb7b36cb5 -r 929aa0df3575 sys/arch/mips/mips/mips_fputrap.c
--- a/sys/arch/mips/mips/mips_fputrap.c Sat Feb 26 09:52:16 2011 +0000
+++ b/sys/arch/mips/mips/mips_fputrap.c Sat Feb 26 10:56:56 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_fputrap.c,v 1.7 2011/02/20 07:45:48 matt Exp $ */
+/* $NetBSD: mips_fputrap.c,v 1.8 2011/02/26 10:56:56 tsutsui Exp $ */
/*
* Copyright (c) 2004
@@ -46,6 +46,11 @@
{
ksiginfo_t ksi;
+#ifdef FPEMUL_DEBUG
+ printf("%s(%x,%#"PRIxREGISTER")\n",
+ __func__, fpustat, l->l_md.md_utf->tf_regs[_R_PC]);
+#endif
+
KSI_INIT_TRAP(&ksi);
ksi.ksi_signo = SIGFPE;
ksi.ksi_code = fpustat2sicode(fpustat);
@@ -58,6 +63,11 @@
{
ksiginfo_t ksi;
+#ifdef FPEMUL_DEBUG
+ printf("%s(%x,%#"PRIxREGISTER")\n",
+ __func__, opcode, l->l_md.md_utf->tf_regs[_R_PC]);
+#endif
+
KSI_INIT_TRAP(&ksi);
ksi.ksi_signo = SIGILL;
ksi.ksi_code = ILL_ILLOPC;
@@ -97,9 +107,9 @@
{
ksiginfo_t ksi;
-#if DEBUG
- printf("fpemul_trapsignal(%x,%x,%#"PRIxREGISTER")\n",
- sig, code, l->l_md.md_utf->tf_regs[_R_PC]);
+#ifdef FPEMUL_DEBUG
+ printf("%s(%x,%x,%#"PRIxREGISTER")\n",
+ __func__, sig, code, l->l_md.md_utf->tf_regs[_R_PC]);
#endif
KSI_INIT_TRAP(&ksi);
Home |
Main Index |
Thread Index |
Old Index