From strick@covad.net  Mon Oct 13 13:49:33 2003
Return-Path: <strick@covad.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2944716A4B3
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 13 Oct 2003 13:49:33 -0700 (PDT)
Received: from smtp.covadmail.net (mx05.covadmail.net [63.65.120.65])
	by mx1.FreeBSD.org (Postfix) with SMTP id 9719143F85
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 13 Oct 2003 13:49:31 -0700 (PDT)
	(envelope-from strick@covad.net)
Received: (covad.net 1096 invoked from network); 13 Oct 2003 20:49:26 -0000
Received: from unknown (HELO ice.nodomain) (68.165.100.159)
  by sun-qmail10 with SMTP; 13 Oct 2003 20:49:26 -0000
Received: from ice.nodomain (localhost [127.0.0.1])
	by ice.nodomain (8.12.8p1/8.12.8) with ESMTP id h9DKnZIl000948
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 13 Oct 2003 13:49:36 -0700 (PDT)
	(envelope-from dan@ice.nodomain)
Received: (from dan@localhost)
	by ice.nodomain (8.12.8p1/8.12.8/Submit) id h9DKnZ4B000947;
	Mon, 13 Oct 2003 13:49:35 -0700 (PDT)
Message-Id: <200310132049.h9DKnZ4B000947@ice.nodomain>
Date: Mon, 13 Oct 2003 13:49:35 -0700 (PDT)
From: Dan Strick <strick@covad.net>
Reply-To: Dan Strick <strick@covad.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: simple kernel DDB enhancement
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         57976
>Category:       kern
>Synopsis:       [patch] [request] simple kernel ddb(4) enhancement
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    rwatson
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 13 13:50:24 PDT 2003
>Closed-Date:    Sun Aug 03 16:09:24 UTC 2008
>Last-Modified:  Sun Aug 03 16:09:24 UTC 2008
>Originator:     Dan Strick
>Release:        FreeBSD in general
>Organization:
>Environment:
System: FreeBSD ice 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Sun Apr 6 21:47:39 PDT 2003 root@ice:/usr/src/sys/compile/ICE i386

>Description:

This is not bug report but a request for a trivial but potentially very
useful enhancement to the kernel DDB facility.  In function db_examine()
in the source file /sys/ddb/db_examine.c, add something like this:

                            case 'S':   /* symbolic */
                                value = db_get_value(addr, size, FALSE);
                                addr += size;
                                db_printsym(value, DB_STGY_ANY);
                                break;

to the examine format switch, for example just before the line:

                            case 'c':   /* character */

This would create a new examine modifer format that expresses a value
as a global_symbol+offset instead of just a non-obvious number.
This might be very useful when examining pointers in memory.

Presumably the DDB(4) man page would also be modified to mention
the new format.  This would also be a good time to add a description
of the DDB "panic" command which has somehow escaped mention on
the man page.

Dan Strick
strick@covad.net
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->rwatson 
Responsible-Changed-By: rwatson 
Responsible-Changed-When: Fri Mar 7 12:36:57 UTC 2008 
Responsible-Changed-Why:  
Take ownership of this DDB-related feature request since I've been working 
with DDB lately. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=57976 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/57976: commit references a PR
Date: Fri,  7 Mar 2008 18:09:18 +0000 (UTC)

 rwatson     2008-03-07 18:09:07 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/ddb              db_examine.c 
   Log:
   Add a /S mode to DDB "ex" command, which interprets and prints the
   value at the requested address as a symbol.  For example, "ex /S
   aio_swake" prints the name of the function currently registered in
   via aio_swake hook.
   
   The change as committed differs slightly from the patch in the PR,
   as I force the size of the retrieved value (and the automatic
   address increment) to be sizeof(void *).  This seems to provide
   the most useful auto-increment behavior, and defaults using the
   default size (4), which is not sizeof(void *) on 64-bit platforms.
   
   MFC after:      3 days
   PR:             57976
   Submitted by:   Dan Strick <strick at covad.net>
   
   Revision  Changes    Path
   1.35      +6 -0      src/sys/ddb/db_examine.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: rwatson 
State-Changed-When: Fri Mar 7 18:10:17 UTC 2008 
State-Changed-Why:  
Transition to patched as a modified version of the patch in this PR has 
been committed to CVS HEAD.  I will close the PR once it has been MFC'd 
to various branches.  Thanks for the submission, this looks like a useful 
addition! 


http://www.freebsd.org/cgi/query-pr.cgi?pr=57976 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/57976: commit references a PR
Date: Fri,  7 Mar 2008 18:14:36 +0000 (UTC)

 rwatson     2008-03-07 18:14:30 UTC
 
   FreeBSD src repository
 
   Modified files:
     share/man/man4       ddb.4 
   Log:
   Update ddb.4 to reflect addition of /S (symbol name) printing mode for
   examine.
   
   MFC after:      3 days
   PR:             57976
   
   Revision  Changes    Path
   1.48      +2 -0      src/share/man/man4/ddb.4
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/57976: commit references a PR
Date: Tue,  1 Apr 2008 11:48:33 +0000 (UTC)

 rwatson     2008-04-01 11:48:25 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_7)
     sys/ddb              db_examine.c 
   Log:
   Merge db_examine.c:1.35 from HEAD to RELENG_7:
   
     Add a /S mode to DDB "ex" command, which interprets and prints the
     value at the requested address as a symbol.  For example, "ex /S
     aio_swake" prints the name of the function currently registered in
     via aio_swake hook.
   
     The change as committed differs slightly from the patch in the PR,
     as I force the size of the retrieved value (and the automatic
     address increment) to be sizeof(void *).  This seems to provide
     the most useful auto-increment behavior, and defaults using the
     default size (4), which is not sizeof(void *) on 64-bit platforms.
   
     PR:             57976
     Submitted by:   Dan Strick <strick at covad.net>
   
   Revision  Changes    Path
   1.33.2.2  +6 -0      src/sys/ddb/db_examine.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/57976: commit references a PR
Date: Tue,  1 Apr 2008 11:50:11 +0000 (UTC)

 rwatson     2008-04-01 11:50:04 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_7)
     share/man/man4       ddb.4 
   Log:
   Merge ddb.4:1.48 from HEAD to RELENG_7:
   
     Update ddb.4 to reflect addition of /S (symbol name) printing mode for
     examine.
   
     PR:             57976
   
   Revision  Changes    Path
   1.42.2.6  +2 -0      src/share/man/man4/ddb.4
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: rwatson 
State-Changed-When: Sun Aug 3 16:08:31 UTC 2008 
State-Changed-Why:  
This change has now been merged to 7.x, and will appear in 7.1-RELEASE. 
Thanks for the patch submission! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=57976 
>Unformatted:
