Restore lost <replaceable> tags.
This commit is contained in:
parent
ff76bf5f73
commit
21115a05b8
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=44678
7 changed files with 48 additions and 48 deletions
en_US.ISO8859-1/books/developers-handbook
kernelbuild
kerneldebug
l10n
policies
testing
tools
x86
|
@ -49,7 +49,7 @@
|
|||
<para>Run &man.config.8; to generate the kernel source
|
||||
code:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>/usr/sbin/config MYKERNEL</userinput></screen>
|
||||
<screen>&prompt.root; <userinput>/usr/sbin/config <replaceable>MYKERNEL</replaceable></userinput></screen>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
|
@ -57,7 +57,7 @@
|
|||
print the name of this directory after being run as
|
||||
above.</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd ../compile/MYKERNEL</userinput></screen>
|
||||
<screen>&prompt.root; <userinput>cd ../compile/<replaceable>MYKERNEL</replaceable></userinput></screen>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
|
|
|
@ -153,8 +153,8 @@
|
|||
the crash dump, locate the debug version of your kernel
|
||||
(normally called <filename>kernel.debug</filename>) and the path
|
||||
to the source files used to build your kernel (normally
|
||||
<filename>/usr/obj/usr/src/sys/KERNCONF</filename>,
|
||||
where <filename>KERNCONF</filename>
|
||||
<filename>/usr/obj/usr/src/sys/<replaceable>KERNCONF</replaceable></filename>,
|
||||
where <filename><replaceable>KERNCONF</replaceable></filename>
|
||||
is the <varname>ident</varname> specified in a kernel
|
||||
&man.config.5;). With those two pieces of info, let the
|
||||
debugging commence!</para>
|
||||
|
@ -162,7 +162,7 @@
|
|||
<para>To enter into the debugger and begin getting information
|
||||
from the dump, the following steps are required at a minimum:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/obj/usr/src/sys/KERNCONF</userinput>
|
||||
<screen>&prompt.root; <userinput>cd /usr/obj/usr/src/sys/<replaceable>KERNCONF</replaceable></userinput>
|
||||
&prompt.root; <userinput>kgdb kernel.debug /var/crash/vmcore.0</userinput></screen>
|
||||
|
||||
<para>You can debug the crash dump using the kernel sources just like
|
||||
|
@ -180,7 +180,7 @@
|
|||
your patch winds its way into the source tree via a problem
|
||||
report, mailing lists, or by being able to commit it!</para>
|
||||
|
||||
<screen> 1:&prompt.root; <userinput>cd /usr/obj/usr/src/sys/KERNCONF</userinput>
|
||||
<screen> 1:&prompt.root; <userinput>cd /usr/obj/usr/src/sys/<replaceable>KERNCONF</replaceable></userinput>
|
||||
2:&prompt.root; <userinput>kgdb kernel.debug /var/crash/vmcore.0</userinput>
|
||||
3:GNU gdb 5.2.1 (FreeBSD)
|
||||
4:Copyright 2002 Free Software Foundation, Inc.
|
||||
|
@ -901,7 +901,7 @@ hw.firewire.dcons_crom.force_console=1</screen>
|
|||
|
||||
<para>Run &man.dconschat.8;, with:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>dconschat -e \# -br -G 12345 -t 00-11-22-33-44-55-66-77</userinput></screen>
|
||||
<screen>&prompt.root; <userinput>dconschat -e \# -br -G 12345 -t <replaceable>00-11-22-33-44-55-66-77</replaceable></userinput></screen>
|
||||
|
||||
<para>The following key combinations can be used once
|
||||
&man.dconschat.8; is running:</para>
|
||||
|
|
|
@ -122,8 +122,8 @@
|
|||
program is used, such as <application>grep</application>.
|
||||
This name will be used when looking for the compiled
|
||||
catalog file. The &man.catopen.3; call looks for this file
|
||||
in <filename>/usr/share/nls/locale/catname</filename>
|
||||
and in <filename>/usr/local/share/nls/locale/catname</filename>,
|
||||
in <filename>/usr/share/nls/<replaceable>locale</replaceable>/<replaceable>catname</replaceable></filename>
|
||||
and in <filename>/usr/local/share/nls/<replaceable>locale</replaceable>/<replaceable>catname</replaceable></filename>,
|
||||
where <literal>locale</literal> is the locale set and
|
||||
<literal>catname</literal> is the catalog name being
|
||||
discussed. The second parameter is a constant, which can have
|
||||
|
|
|
@ -167,13 +167,13 @@
|
|||
<acronym>SVN</acronym>, vendor branches were imported with
|
||||
the same layout as the main tree. For example, the
|
||||
<application>foo</application> vendor sources ended up in
|
||||
<filename>vendor/foo/dist/contrib/foo</filename>,
|
||||
<filename>vendor/<replaceable>foo</replaceable>/dist/contrib/<replaceable>foo</replaceable></filename>,
|
||||
but it is pointless and rather inconvenient. What we
|
||||
really want is to have the vendor source directly in
|
||||
<filename>vendor/foo/dist</filename>,
|
||||
<filename>vendor/<replaceable>foo</replaceable>/dist</filename>,
|
||||
like this:</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>cd vendor/foo/dist/contrib/foo</userinput>
|
||||
<screen>&prompt.user; <userinput>cd vendor/<replaceable>foo</replaceable>/dist/contrib/<replaceable>foo</replaceable></userinput>
|
||||
&prompt.user; <userinput>svn move $(svn list) ../..</userinput>
|
||||
&prompt.user; <userinput>cd ../..</userinput>
|
||||
&prompt.user; <userinput>svn remove contrib</userinput>
|
||||
|
@ -207,8 +207,8 @@
|
|||
that corresponds to the last change was made to the vendor
|
||||
tree prior to importing new sources is also needed:</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>cd head/contrib/foo</userinput>
|
||||
&prompt.user; <userinput>svn merge --record-only svn_base/vendor/foo/dist@12345678 .</userinput>
|
||||
<screen>&prompt.user; <userinput>cd head/contrib/<replaceable>foo</replaceable></userinput>
|
||||
&prompt.user; <userinput>svn merge --record-only <replaceable>svn_base</replaceable>/vendor/<replaceable>foo</replaceable>/dist@<replaceable>12345678</replaceable> .</userinput>
|
||||
&prompt.user; <userinput>svn commit</userinput></screen>
|
||||
|
||||
<para>where <replaceable>svn_base</replaceable> is the base
|
||||
|
@ -231,30 +231,30 @@
|
|||
sorted lists of the contents of the vendor tree and of the
|
||||
sources you are about to import:</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>cd vendor/foo/dist</userinput>
|
||||
&prompt.user; <userinput>svn list -R | grep -v '/$' | sort > ../old</userinput>
|
||||
&prompt.user; <userinput>cd ../foo-9.9</userinput>
|
||||
&prompt.user; <userinput>find . -type f | cut -c 3- | sort > ../new</userinput></screen>
|
||||
<screen>&prompt.user; <userinput>cd vendor/<replaceable>foo</replaceable>/dist</userinput>
|
||||
&prompt.user; <userinput>svn list -R | grep -v '/$' | sort > ../<replaceable>old</replaceable></userinput>
|
||||
&prompt.user; <userinput>cd ../<replaceable>foo-9.9</replaceable></userinput>
|
||||
&prompt.user; <userinput>find . -type f | cut -c 3- | sort > ../<replaceable>new</replaceable></userinput></screen>
|
||||
|
||||
<para>With these two files, the following command will list
|
||||
list removed files (files only in
|
||||
<filename>old</filename>):</para>
|
||||
<filename><replaceable>old</replaceable></filename>):</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>comm -23 ../old ../new</userinput></screen>
|
||||
<screen>&prompt.user; <userinput>comm -23 ../<replaceable>old</replaceable> ../<replaceable>new</replaceable></userinput></screen>
|
||||
|
||||
<para>While the command below will list added files (files
|
||||
only in
|
||||
<filename>new</filename>):</para>
|
||||
<filename><replaceable>new</replaceable></filename>):</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>comm -13 ../old ../new</userinput></screen>
|
||||
<screen>&prompt.user; <userinput>comm -13 ../<replaceable>old</replaceable> ../<replaceable>new</replaceable></userinput></screen>
|
||||
|
||||
<para>Let's put this together:</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>cd vendor/foo/foo-9.9</userinput>
|
||||
<screen>&prompt.user; <userinput>cd vendor/<replaceable>foo</replaceable>/<replaceable>foo-9.9</replaceable></userinput>
|
||||
&prompt.user; <userinput>tar cf - . | tar xf - -C ../dist</userinput>
|
||||
&prompt.user; <userinput>cd ../dist</userinput>
|
||||
&prompt.user; <userinput>comm -23 ../old ../new | xargs svn remove</userinput>
|
||||
&prompt.user; <userinput>comm -13 ../old ../new | xargs svn add</userinput></screen>
|
||||
&prompt.user; <userinput>comm -23 ../<replaceable>old</replaceable> ../<replaceable>new</replaceable> | xargs svn remove</userinput>
|
||||
&prompt.user; <userinput>comm -13 ../<replaceable>old</replaceable> ../<replaceable>new</replaceable> | xargs svn add</userinput></screen>
|
||||
|
||||
<warning>
|
||||
<para>If there are new directories in the new
|
||||
|
@ -303,11 +303,11 @@
|
|||
should tag it for future reference. The best and quickest
|
||||
way is to do it directly in the repository:</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>svn copy svn_base/vendor/foo/dist svn_base/vendor/foo/9.9</userinput></screen>
|
||||
<screen>&prompt.user; <userinput>svn copy <replaceable>svn_base</replaceable>/vendor/<replaceable>foo</replaceable>/dist <replaceable>svn_base</replaceable>/vendor/<replaceable>foo</replaceable>/<replaceable>9.9</replaceable></userinput></screen>
|
||||
|
||||
<para>To get the new tag, you can update your working copy
|
||||
of
|
||||
<filename>vendor/foo</filename>.</para>
|
||||
<filename>vendor/<replaceable>foo</replaceable></filename>.</para>
|
||||
|
||||
<note>
|
||||
<para>If you choose to do the copy in the checkout
|
||||
|
@ -325,9 +325,9 @@
|
|||
<acronym>SVN</acronym> not to handle merge conflicts yet,
|
||||
because they will be taken care of manually:</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>cd head/contrib/foo</userinput>
|
||||
<screen>&prompt.user; <userinput>cd head/contrib/<replaceable>foo</replaceable></userinput>
|
||||
&prompt.user; <userinput>svn update</userinput>
|
||||
&prompt.user; <userinput>svn merge --accept=postpone svn_base/vendor/foo/dist</userinput></screen>
|
||||
&prompt.user; <userinput>svn merge --accept=postpone <replaceable>svn_base</replaceable>/vendor/<replaceable>foo</replaceable>/dist</userinput></screen>
|
||||
|
||||
<para>Resolve any conflicts, and make sure that any files
|
||||
that were added or removed in the vendor tree have been
|
||||
|
@ -335,7 +335,7 @@
|
|||
a good idea to check differences against the vendor
|
||||
branch:</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>svn diff --no-diff-deleted --old=svn_base/vendor/foo/dist --new=.</userinput></screen>
|
||||
<screen>&prompt.user; <userinput>svn diff --no-diff-deleted --old=<replaceable>svn_base</replaceable>/vendor/<replaceable>foo</replaceable>/dist --new=.</userinput></screen>
|
||||
|
||||
<para>The <option>--no-diff-deleted</option> option tells
|
||||
<acronym>SVN</acronym> not to check files that are in the
|
||||
|
@ -418,7 +418,7 @@
|
|||
|
||||
<listitem>
|
||||
<para>Object files are named
|
||||
<filename>arch/filename.o.uu></filename>.</para>
|
||||
<filename><replaceable>arch</replaceable>/<replaceable>filename</replaceable>.o.uu></filename>.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
|
|
@ -363,11 +363,11 @@
|
|||
have rank 9999.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>RELENG_x</literal>
|
||||
<para><literal>RELENG_<replaceable>x</replaceable></literal>
|
||||
has rank <replaceable>xx</replaceable>99.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>RELENG_x_y</literal>
|
||||
<para><literal>RELENG_<replaceable>x</replaceable>_<replaceable>y</replaceable></literal>
|
||||
has rank <replaceable>xxyy</replaceable>.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
|
|
@ -600,7 +600,7 @@
|
|||
compiler to add it.</para>
|
||||
|
||||
<para>The rule is that if the library is called
|
||||
<filename>libsomething.a</filename>,
|
||||
<filename>lib<replaceable>something</replaceable>.a</filename>,
|
||||
you give <command>cc</command> the argument
|
||||
<option>-l<replaceable>something</replaceable></option>.
|
||||
For example, the math library is
|
||||
|
@ -996,7 +996,7 @@ free(foo);
|
|||
<para>to find out the process ID of your program, and
|
||||
do</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>kill -ABRT pid</userinput>
|
||||
<screen>&prompt.user; <userinput>kill -ABRT <replaceable>pid</replaceable></userinput>
|
||||
</screen>
|
||||
|
||||
<para>where
|
||||
|
@ -1147,7 +1147,7 @@ install:
|
|||
<para>We can tell make which target we want to make by
|
||||
typing:</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>make target</userinput></screen>
|
||||
<screen>&prompt.user; <userinput>make <replaceable>target</replaceable></userinput></screen>
|
||||
|
||||
<para><command>make</command> will then only look at that target
|
||||
and ignore any others. For example, if we type
|
||||
|
@ -1376,12 +1376,12 @@ DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
|
|||
<command>gdb</command> (<application>GNU
|
||||
debugger</application>). You start it up by typing</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>gdb progname</userinput></screen>
|
||||
<screen>&prompt.user; <userinput>gdb <replaceable>progname</replaceable></userinput></screen>
|
||||
|
||||
<para>although many people prefer to run it inside
|
||||
<application>Emacs</application>. You can do this by:</para>
|
||||
|
||||
<screen><userinput>M-x gdb RET progname RET</userinput></screen>
|
||||
<screen><userinput>M-x gdb RET <replaceable>progname</replaceable> RET</userinput></screen>
|
||||
|
||||
<para>Using a debugger allows you to run the program under more
|
||||
controlled circumstances. Typically, you can step through the
|
||||
|
@ -1543,7 +1543,7 @@ main() {
|
|||
listings of core files and sweat over machine code manuals,
|
||||
but now life is a bit easier. Incidentally, under FreeBSD and
|
||||
other 4.4BSD systems, a core file is called
|
||||
<filename>progname.core</filename> instead of just
|
||||
<filename><replaceable>progname</replaceable>.core</filename> instead of just
|
||||
<filename>core</filename>, to make it clearer which program a
|
||||
core file belongs to.</para>
|
||||
|
||||
|
@ -1551,7 +1551,7 @@ main() {
|
|||
the usual way. Instead of typing <command>break</command> or
|
||||
<command>run</command>, type</para>
|
||||
|
||||
<screen>(gdb) <userinput>core progname.core</userinput></screen>
|
||||
<screen>(gdb) <userinput>core <replaceable>progname</replaceable>.core</userinput></screen>
|
||||
|
||||
<para>If you are not in the same directory as the core file,
|
||||
you will have to do <userinput>dir
|
||||
|
@ -1609,7 +1609,7 @@ Cannot access memory at address 0x7020796d.
|
|||
use <command>ps</command> to find the process ID for the
|
||||
child, and do</para>
|
||||
|
||||
<screen>(gdb) <userinput>attach pid</userinput></screen>
|
||||
<screen>(gdb) <userinput>attach <replaceable>pid</replaceable></userinput></screen>
|
||||
|
||||
<para>in <command>gdb</command>, and then debug as usual.</para>
|
||||
|
||||
|
@ -1851,7 +1851,7 @@ else if (pid == 0) { /* child */
|
|||
if you are doing something outside Emacs and you want to
|
||||
edit a file, you can just type in</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>emacsclient filename</userinput>
|
||||
<screen>&prompt.user; <userinput>emacsclient <replaceable>filename</replaceable></userinput>
|
||||
</screen>
|
||||
|
||||
<para>and then you can edit the file in your
|
||||
|
|
|
@ -249,7 +249,7 @@ the system know about it. After your program is assembled and
|
|||
linked, you need to brand the executable:
|
||||
</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>brandelf -t Linux filename</userinput></screen>
|
||||
<screen>&prompt.user; <userinput>brandelf -t Linux <replaceable>filename</replaceable></userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -870,7 +870,7 @@ If you do not have <application>nasm</application>, type:
|
|||
</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>su</userinput>
|
||||
Password:<userinput>your root password</userinput>
|
||||
Password:<userinput><replaceable>your root password</replaceable></userinput>
|
||||
&prompt.root; <userinput>cd /usr/ports/devel/nasm</userinput>
|
||||
&prompt.root; <userinput>make install</userinput>
|
||||
&prompt.root; <userinput>exit</userinput>
|
||||
|
@ -2313,15 +2313,15 @@ to send the output to a different file. Most of the time,
|
|||
I end up using it like this:
|
||||
</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>tuc myfile tempfile</userinput>
|
||||
&prompt.user; <userinput>mv tempfile myfile</userinput></screen>
|
||||
<screen>&prompt.user; <userinput>tuc <replaceable>myfile tempfile</replaceable></userinput>
|
||||
&prompt.user; <userinput>mv <replaceable>tempfile myfile</replaceable></userinput></screen>
|
||||
|
||||
<para>
|
||||
It would be nice to have a <application>ftuc</application>,
|
||||
i.e., <emphasis>fast tuc</emphasis>, and use it like this:
|
||||
</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>ftuc myfile</userinput></screen>
|
||||
<screen>&prompt.user; <userinput>ftuc <replaceable>myfile</replaceable></userinput></screen>
|
||||
|
||||
<para>
|
||||
In this chapter, then, we will write
|
||||
|
@ -3343,7 +3343,7 @@ specified.
|
|||
To get the 11th field of each record, I can now do:
|
||||
</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>csv '-t;' data.csv | awk '-F;' '{print $11}'</userinput></screen>
|
||||
<screen>&prompt.user; <userinput>csv '-t;' <replaceable>data.csv</replaceable> | awk '-F;' '{print $11}'</userinput></screen>
|
||||
|
||||
<para>
|
||||
The code stores the options (except for the file descriptors)
|
||||
|
|
Loading…
Reference in a new issue