From owner-freebsd-hackers Sun Sep 7 04:12:02 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id EAA13872 for hackers-outgoing; Sun, 7 Sep 1997 04:12:02 -0700 (PDT) Received: from hq.icb.chel.su (hq.icb.chel.su [193.125.10.33]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id EAA13849 for ; Sun, 7 Sep 1997 04:11:42 -0700 (PDT) Received: (babkin@localhost) by hq.icb.chel.su (8.8.3/8.6.5) id RAA08431; Sun, 7 Sep 1997 17:10:05 +0600 (ESD) From: "Serge A. Babkin" Message-Id: <199709071110.RAA08431@hq.icb.chel.su> Subject: Re: NPX old bug To: joerg_wunsch@uriah.heep.sax.de Date: Sun, 7 Sep 1997 17:10:04 +0600 (ESD) Cc: hackers@FreeBSD.ORG In-Reply-To: <19970907093012.CE57420@uriah.heep.sax.de> from "J Wunsch" at Sep 7, 97 09:30:12 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > P.S. I've found that `vtophys' is worth adding it to DDB. The > > addition is very simple. Does anyone from the core team think > > that it's worth too ? > > That's certainly not worth a core-team decision. ;-) Are you sure > there's not already one of the `show' commands that could do this? No, it does not. My patch is: *** db_command.c 1997/08/29 20:58:08 1.1 --- db_command.c 1997/08/29 21:21:03 *************** *** 47,52 **** --- 47,54 ---- #include + #include + /* * Exported global variables */ *************** *** 59,64 **** --- 61,67 ---- static db_cmdfcn_t db_fncall; static db_cmdfcn_t db_panic; + static db_cmdfcn_t db_vtophys; /* * if 'ed' style: 'dot' is set at start of last item printed, * and '+' points to next line. *************** *** 366,371 **** --- 369,375 ---- { "show", 0, 0, db_show_cmds }, { "ps", db_ps, 0, 0 }, { "panic", db_panic, 0, 0 }, + { "vtophys", db_vtophys, 0, 0 }, { (char *)0, } }; *************** *** 393,398 **** --- 397,412 ---- char * dummy4; { panic("from debugger"); + } + + static void + db_vtophys(addr, dummy2, dummy3, dummy4) + db_expr_t addr; + boolean_t dummy2; + db_expr_t dummy3; + char * dummy4; + { + db_printf("0x%08x\n",vtophys(addr)); } void