From owner-doc-jp@jp.freebsd.org  Mon Apr  7 13:27:45 1997
Received: by jaz.jp.freebsd.org (8.8.5+2.7Wbeta5/8.7.3) id NAA19123
	Mon, 7 Apr 1997 13:27:45 +0900 (JST)
Received: by jaz.jp.freebsd.org (8.8.5+2.7Wbeta5/8.7.3) with SMTP id NAA19118
	for <doc-jp@jp.FreeBSD.ORG>; Mon, 7 Apr 1997 13:27:43 +0900 (JST)
Received: from amont.astec.co.jp (amont.astec.co.jp [172.20.10.1]) by tokyonet-entrance.astec.co.jp (8.6.12+2.5Wb7/3.4Wbeta5-astecMX2.3) with ESMTP id NAA21419 for <doc-jp@jp.FreeBSD.ORG>; Mon, 7 Apr 1997 13:27:42 +0900
Received: from lepton (lepton.astec.co.jp [172.20.12.27]) by amont.astec.co.jp (8.7.6/3.5Wbeta-astecMX2.4) with ESMTP id NAA24014 for <doc-jp@jp.FreeBSD.ORG>; Mon, 7 Apr 1997 13:27:40 +0900 (JST)
To: doc-jp@jp.FreeBSD.ORG
From: Hiroyuki HANAI <hanai@astec.co.jp>
X-Mailer: Mew version 1.68 on Emacs 19.34.1 / Mule 2.3
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Message-Id: <19970407133038W.hanai@astec.co.jp>
Date: Mon, 07 Apr 1997 13:30:38 +0900
X-Dispatcher: impost version 0.99h (Apr. 2, 1997)
Lines: 113
Reply-To: doc-jp@jp.freebsd.org
Precedence: bulk
X-Distribute: distribute [version 2.1 (Alpha) patchlevel=19]
X-Sequence: doc-jp 2789
Subject: [doc-jp 2789] <handbook> Status
Errors-To: owner-doc-jp@jp.freebsd.org
Sender: owner-doc-jp@jp.freebsd.org

$B$$$/$D$+$N%U%!%$%k$,99?7$5$l$F$^$9(B.
$B8=:_$N%j%t%#%8%g%s$O(B,

                          $B%*%j%8%J%k(B     $BF|K\8l(B
bibliographies.sgml         1.26          1.25
contrib.sgml                1.231         1.230
kerneldebug.sgml            1.14          1.13
policies.sgml               1.14          1.11

$B$G$9(B. $B$3$N$&$A(B, $B:G=i$NFs$D$O9g$o$;$F$*$-$^$7$?(B.

kerneldebug.sgml $B$O$A$g$C$HLu$,I,MW$=$&$J$N$G(B,
$B2<$K:9J,$rIU$1$F$*$-$^$9$N$G$h$m$7$/$G$9(B. > $B$&$A$+$oMM(B

policies.sgml $B$O(B 3/31 $B$N(B [doc-jp 2742] $B$G(B, 1.11 $B$H(B 1.12 $B$N:9J,$r(B
$BAw$j$^$7$?$N$G(B, 1.12 $B$H(B 1.14 $B$N:9J,$rIU$1$F$*$-$^$9(B. > $BEDCf(B($BH~(B)$BMM(B

--$B$O$J$$(B
Index: kerneldebug.sgml
===================================================================
RCS file: /home/ncvs/src/share/doc/handbook/kerneldebug.sgml,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- kerneldebug.sgml	1997/03/18 00:42:36	1.13
+++ kerneldebug.sgml	1997/04/06 23:03:27	1.14
@@ -1,4 +1,4 @@
-<!-- $Id: kerneldebug.sgml,v 1.13 1997/03/18 00:42:36 joerg Exp $ -->
+<!-- $Id: kerneldebug.sgml,v 1.14 1997/04/06 23:03:27 dfr Exp $ -->
 <!-- The FreeBSD Documentation Project -->
 
 <chapt><heading>Kernel Debugging<label id="kerneldebug"></heading>
@@ -481,6 +481,36 @@
   full access to the source, running it in gud-mode inside an Emacs
   window (which gives you an automatic source code display in another
   Emacs window) etc.
+
+<p>Remote GDB can also be used to debug LKMs.  First build the LKM
+ with debugging symbols:
+<tscreen><verb>
+# cd /usr/src/lkm/linux
+# make clean; make COPTS=-g
+</verb></tscreen>
+
+ Then install this version of the module on the target machine, load it
+ and use <tt>modstat</tt> to find out where it was loaded:
+<tscreen><verb>
+# linux
+# modstat
+Type     Id Off Loadaddr Size Info     Rev Module Name
+EXEC      0   4 f5109000 001c f510f010   1 linux_mod
+</verb></tscreen>
+
+ Take the load address of the module and add 0x20 (probably to account
+ for the a.out header).  This is the address that the module code was
+ relocated to.  Use the <tt>add-symbol-file</tt> command in GDB to tell the
+ debugger about the module:
+<tscreen><verb>
+(kgdb) add-symbol-file /usr/src/lkm/linux/linux_mod.o 0xf5109020
+add symbol table from file "/usr/src/lkm/linux/linux_mod.o" at
+text_addr = 0xf5109020?
+(y or n) y
+(kgdb)
+</verb></tscreen>
+
+ You now have access to all the symbols in the LKM.
 
 <sect><heading>Debugging a console driver</heading>
 
-------------------------------------------------------------------------------
Index: policies.sgml
===================================================================
RCS file: /home/ncvs/src/share/doc/handbook/policies.sgml,v
retrieving revision 1.12
retrieving revision 1.14
diff -u -r1.12 -r1.14
--- policies.sgml	1997/03/30 09:55:11	1.12
+++ policies.sgml	1997/04/03 10:47:21	1.14
@@ -1,4 +1,4 @@
-<!-- $Id: policies.sgml,v 1.12 1997/03/30 09:55:11 obrien Exp $ -->
+<!-- $Id: policies.sgml,v 1.14 1997/04/03 10:47:21 obrien Exp $ -->
 <!-- The FreeBSD Documentation Project -->
 
 <chapt><heading>Source Tree Guidelines and Policies
@@ -127,7 +127,7 @@
 src/tools directory along with the port itself so that it is available
 to future maintainers.
 
-<p>In the src/contrib/tcl level directory, a file called README.FreeBSD
+<p>In the src/contrib/tcl level directory, a file called FREEBSD-upgrade
 should be added and it should states things like:
 
 <itemize>
@@ -138,8 +138,8 @@
  <item> Perhaps an overview of the FreeBSD-specific changes that have been made.
 </itemize>
 
-<p>However, please do not import README.FreeBSD with the contributed source.  
-Rather you should ``cvs add README.FreeBSD ; cvs ci'' after the
+<p>However, please do not import FREEBSD-upgrade with the contributed source.  
+Rather you should ``cvs add FREEBSD-upgrade ; cvs ci'' after the
 initial import.  Example wording from ``src/contrib/cpio'' is below:
 
 <verb>This directory contains virgin sources of the original distribution files
@@ -167,7 +167,7 @@
                 cvs import -m 'Virgin import of GNU v2.4.2' \
                         src/contrib/cpio GNU v2.4.2
 
-        4. Follow the instructions printed out in step 2 to resolve any
+        4. Follow the instructions printed out in step 3 to resolve any
            conflicts between local FreeBSD changes and the newer version.
 
 Do not, under any circumstances, deviate from this procedure.
