Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Sep 1997 17:10:04 +0600 (ESD)
From:      "Serge A. Babkin" <babkin@hq.icb.chel.su>
To:        joerg_wunsch@uriah.heep.sax.de
Cc:        hackers@FreeBSD.ORG
Subject:   Re: NPX old bug
Message-ID:  <199709071110.RAA08431@hq.icb.chel.su>
In-Reply-To: <19970907093012.CE57420@uriah.heep.sax.de> from "J Wunsch" at Sep 7, 97 09:30:12 am

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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 <setjmp.h>
  
+ #include <vm/pmap.h>
+ 
  /*
   * 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709071110.RAA08431>