aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-04-05 09:01:15 +0000
committerJohn Gilmore <gnu@cygnus>1991-04-05 09:01:15 +0000
commit07d021a6ae8d3ed9da9f55c8623739e7a716308e (patch)
treeb89d9ed8acbddfa222437388e1b1c2e5c3226082 /gdb/doc
parent4e1dc656813c2a5e04f210210977ab748514bd4b (diff)
downloadgdb-07d021a6ae8d3ed9da9f55c8623739e7a716308e.zip
gdb-07d021a6ae8d3ed9da9f55c8623739e7a716308e.tar.gz
gdb-07d021a6ae8d3ed9da9f55c8623739e7a716308e.tar.bz2
Initial revision
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/all.m418
-rw-r--r--gdb/doc/amd29k.m45
-rw-r--r--gdb/doc/gen.m413
-rw-r--r--gdb/doc/i80386.m45
-rw-r--r--gdb/doc/i960.m412
-rw-r--r--gdb/doc/m680x0.m45
-rw-r--r--gdb/doc/none.m449
-rw-r--r--gdb/doc/pretex.m4252
-rw-r--r--gdb/doc/sparc.m45
-rw-r--r--gdb/doc/vax.m45
10 files changed, 369 insertions, 0 deletions
diff --git a/gdb/doc/all.m4 b/gdb/doc/all.m4
new file mode 100644
index 0000000..4d97fbe
--- /dev/null
+++ b/gdb/doc/all.m4
@@ -0,0 +1,18 @@
+_divert__(-1)
+_define__(<_ALL_ARCH__>,<1>)
+_define__(<_GENERIC__>,<1>) In case none.m4 changes its mind abt default
+
+_define__(<_AOUT__>,<1>)
+_define__(<_BOUT__>,<1>)
+_define__(<_COFF__>,<1>)
+_define__(<_ELF__>,<1>)
+
+_define__(<_AMD29K__>,<1>)
+_define__(<_I80386__>,<1>)
+_define__(<_I960__>,<1>)
+_define__(<_M680X0__>,<1>)
+_define__(<_SPARC__>,<1>)
+_define__(<_VAX__>,<1>)
+_define__(<_VXWORKS__>,<1>)
+
+_divert__<> \ No newline at end of file
diff --git a/gdb/doc/amd29k.m4 b/gdb/doc/amd29k.m4
new file mode 100644
index 0000000..cf3ba386
--- /dev/null
+++ b/gdb/doc/amd29k.m4
@@ -0,0 +1,5 @@
+_divert__(-1)
+_define__(<_AMD29K__>,<1>)
+_define__(<_HOST__>,<AMD 29K>)
+_define__(<_MACH_DEP__>,<AMD29K Dependent>
+_divert__<> \ No newline at end of file
diff --git a/gdb/doc/gen.m4 b/gdb/doc/gen.m4
new file mode 100644
index 0000000..be995bf
--- /dev/null
+++ b/gdb/doc/gen.m4
@@ -0,0 +1,13 @@
+_divert__(-1)
+_define__(<_GENERIC__>,<1>) In case none.m4 changes its mind abt default
+
+_define__(<_AOUT__>,<1>)
+_define__(<_COFF__>,<1>)
+_define__(<_ELF__>,<1>)
+
+_define__(<_I80386__>,<1>)
+_define__(<_M680X0__>,<1>)
+_define__(<_SPARC__>,<1>)
+_define__(<_VAX__>,<1>)
+
+_divert__<> \ No newline at end of file
diff --git a/gdb/doc/i80386.m4 b/gdb/doc/i80386.m4
new file mode 100644
index 0000000..d8293d1
--- /dev/null
+++ b/gdb/doc/i80386.m4
@@ -0,0 +1,5 @@
+_divert__(-1)
+_define__(<_I80386__>,<1>)
+_define__(<_HOST__>,<Intel 80386>)
+_define__(<_MACH_DEP__>,<80386 Dependent>
+_divert__<> \ No newline at end of file
diff --git a/gdb/doc/i960.m4 b/gdb/doc/i960.m4
new file mode 100644
index 0000000..e98155d
--- /dev/null
+++ b/gdb/doc/i960.m4
@@ -0,0 +1,12 @@
+_divert__(-1)
+_define__(<_I960__>,<1>)
+_define__(<_AOUT__>,<0>)
+_define__(<_BOUT__>,<1>)
+_define__(<_COFF__>,<1>)
+_define__(<_AS__>,<gas960>)
+_define__(<_GCC__>,<gcc960>)
+_define__(<_LD__>,<gld960>)
+_define__(<_GDB__>,<gdb960>)
+_define__(<_HOST__>,<Intel 960>)
+_define__(<_MACH_DEP__>,<i960 Dependent>)
+_divert__<> \ No newline at end of file
diff --git a/gdb/doc/m680x0.m4 b/gdb/doc/m680x0.m4
new file mode 100644
index 0000000..e5f83b6
--- /dev/null
+++ b/gdb/doc/m680x0.m4
@@ -0,0 +1,5 @@
+_divert__(-1)
+_define__(<_M680X0__>,<1>)
+_define__(<_HOST__>,<Motorola 680x0>)
+_define__(<_MACH_DEP__>,<M680x0 Dependent>)
+_divert__<> \ No newline at end of file
diff --git a/gdb/doc/none.m4 b/gdb/doc/none.m4
new file mode 100644
index 0000000..940245c
--- /dev/null
+++ b/gdb/doc/none.m4
@@ -0,0 +1,49 @@
+_divert__(-1)
+
+Switches:
+
+_define__(<_ALL_ARCH__>,<0>) (Meant as most inclusive; file turning
+ it on is expected to also turn on
+ all arch-related switches including
+ "_GENERIC__")
+_define__(<_GENERIC__>,<1>) (may not be quite all configs;
+ meant for "most vanilla" manual)
+_define__(<_INTERNALS__>,<0>)
+
+_define__(<_AOUT__>,<1>) Object formats. Note we turn on one.
+_define__(<_BOUT__>,<0>)
+_define__(<_COFF__>,<0>)
+_define__(<_ELF__>,<0>)
+
+_define__(<_AMD29K__>,<0>) Specific architectures. Note none
+_define__(<_I80386__>,<0>) starts out on.
+_define__(<_I960__>,<0>)
+_define__(<_M680X0__>,<0>)
+_define__(<_SPARC__>,<0>)
+_define__(<_VAX__>,<0>)
+_define__(<_VXWORKS__>,<0>)
+
+Text:
+
+Default names; individual configs may override
+Assembler:
+_define__(<_AS__>,<as>)
+C Compiler:
+_define__(<_GCC__>,<gcc>)
+Linker:
+_define__(<_LD__>,<ld>)
+Debugger name:
+_define__(<_GDBN__>,<GDB>)
+Debugger program:
+_define__(<_GDBP__>,<gdb>)
+Debugger init file:
+_define__(<_GDBINIT__>,<.gdbinit>)
+
+Text for host; individual configs *should* override, but this may
+catch some flubs
+_define__(<_HOST__>,<machine specific>)
+
+"Machine Dependent" nodename
+_define__(<_MACH_DEP__>,<Machine Dependent>)
+
+_divert__<> \ No newline at end of file
diff --git a/gdb/doc/pretex.m4 b/gdb/doc/pretex.m4
new file mode 100644
index 0000000..3fe9e05
--- /dev/null
+++ b/gdb/doc/pretex.m4
@@ -0,0 +1,252 @@
+divert(-1) -*-Text-*-
+
+I. INTRODUCTION
+
+This collection of M4 macros is meant to help in pre-processing texinfo
+files to allow configuring them by hosts; for example, the reader of an
+as manual who only has access to a 386 may not really want to see crud about
+VAXen.
+
+A preprocessor is used, rather than extending texinfo, because this
+way we can hack the conditionals in only one place; otherwise we would
+have to write TeX macros, update makeinfo, and update the Emacs
+info-formatting functions.
+
+II. COMPATIBILITY
+
+These macros should work with GNU m4 and System V m4; they do not work
+with Sun or Berkeley M4.
+
+III. USAGE
+
+A. M4 INVOCATION
+Assume this file is called "pretex.m4". Then, to preprocess a
+document "mybook.texinfo" you might do something like the following:
+
+ m4 pretex.m4 none.m4 PARTIC.m4 mybook.texinfo >mybook-PARTIC.texinfo
+
+---where your path is set to find GNU or SysV "m4", and the other m4
+files mentioned are as follows:
+
+ none.m4: A file that defines, as 0, all the options you might
+ want to turn on using the conditionals defined below.
+ Unlike the C preprocessor, m4 does not default
+ undefined macros to 0. For example, here is a "none.m4"
+ I have been using:
+ _divert__(-1)
+
+ _define__(<_ALL_ARCH__>,<0>)
+ _define__(<_INTERNALS__>,<0>)
+
+ _define__(<_AMD29K__>,<0>)
+ _define__(<_I80386__>,<0>)
+ _define__(<_I960__>,<0>)
+ _define__(<_M680X0__>,<0>)
+ _define__(<_SPARC__>,<0>)
+ _define__(<_VAX__>,<0>)
+
+ _divert__<>
+
+ PARTIC.m4: A file that turns on whichever options you actually
+ want the manual configured for, in this particular
+ instance. Its contents are similar to one or more of
+ the lines in "none.m4", but of course the second
+ argument to _define__ is <1> rather than <0>.
+
+ This is also a convenient place to define any macros
+ that you want to expand to different text for
+ different configurations---for example, the name of
+ the program being described.
+
+Naturally, these are just suggested conventions; you could put your macro
+definitions in any files or combinations of files you like.
+
+These macros use the characters < and > as m4 quotes; if you need
+these characters in your text, you will also want to use the macros
+_0__ and _1__ from this package---see the description of "Quote
+Handling" in the "Implementation" section below.
+
+B. WHAT GOES IN THE PRE-TEXINFO SOURCE
+
+For the most part, the text of your book. In addition, you can
+include text that is included only conditionally, using the macros
+_if__ and _fi__ defined below. They BOTH take an argument! This is
+primarily meant for readability (so a human can more easily see what
+conditional end matches what conditional beginning), but the argument
+is actually used in the _fi__ as well as the _if__ implementation.
+You should always give a _fi__ the same argument as its matching
+_if__. Other arguments may appear to work for a while, but are almost
+certain to produce the wrong output for some configurations.
+
+For example, here is an excerpt from the very beginning of the
+documentation for GNU as, to name the info file appropriately for
+different configurations:
+ _if__(_ALL_ARCH__)
+ @setfilename as.info
+ _fi__(_ALL_ARCH__)
+ _if__(_M680X0__ && !_ALL_ARCH__)
+ @setfilename as-m680x0.info
+ _fi__(_M680X0__ && !_ALL_ARCH__)
+ _if__(_AMD29K__ && !_ALL_ARCH__)
+ @setfilename as-29k.info
+ _fi__(_AMD29K__ && !_ALL_ARCH__)
+
+Note that you can use Boolean expressions in the arguments; the
+expression language is that of the builtin m4 macro "eval", described
+in the m4 manual.
+
+IV. IMPLEMENTATION
+
+A.PRIMITIVE RENAMING
+First, we redefine m4's built-ins to avoid conflict with plain text.
+The naming convention used is that our macros all begin with a single
+underbar and end with two underbars. The asymmetry is meant to avoid
+conflict with some other conventions (which we may want to document) that
+are intended to avoid conflict, like ANSI C predefined macros.
+
+define(`_undefine__',defn(`undefine'))
+define(`_define__',defn(`define'))
+define(`_defn__',defn(`defn'))
+define(`_ppf__',`_define__(`_$1__',_defn__(`$1'))_undefine__(`$1')')
+_ppf__(`builtin')
+_ppf__(`changecom')
+_ppf__(`changequote')
+_ppf__(`decr')
+_ppf__(`define')
+_ppf__(`defn')
+_ppf__(`divert')
+_ppf__(`dnl')
+_ppf__(`dumpdef')
+_ppf__(`errprint')
+_ppf__(`eval')
+_ppf__(`ifdef')
+_ppf__(`ifelse')
+_ppf__(`include')
+_ppf__(`incr')
+_ppf__(`index')
+_ppf__(`len')
+_ppf__(`m4exit')
+_ppf__(`m4wrap')
+_ppf__(`maketemp')
+_ppf__(`popdef')
+_ppf__(`pushdef')
+_ppf__(`shift')
+_ppf__(`sinclude')
+_ppf__(`substr')
+_ppf__(`syscmd')
+_ppf__(`sysval')
+_ppf__(`traceoff')
+_ppf__(`traceon')
+_ppf__(`translit')
+_ppf__(`undefine')
+_ppf__(`undivert')
+
+B. QUOTE HANDLING.
+
+The characters used as quotes by M4, by default, are unfortunately
+quite likely to occur in ordinary text. To avoid surprises, we will
+use the characters <> ---which are just as suggestive (more so to
+Francophones, perhaps) but a little less common in text (save for
+those poor Francophones. You win some, you lose some). Still, we
+expect also to have to set < and > occasionally in text; to do that,
+we define a macro to turn off quote handling (_0__) and a macro to
+turn it back on (_1__), according to our convention.
+
+ BEWARE: This seems to make < and > unusable as relational operations
+ in calls to the builtin "eval". So far I've gotten
+ along without; but a better choice may be possible.
+
+Note that we postponed this for a while, for convenience in discussing
+the issue and in the primitive renaming---not to mention in defining
+_0__ and _1__ themselves! However, the quote redefinitions MUST
+precede the _if__ / _fi__ definitions, because M4 will expand the text
+as given---if we use the wrong quotes here, we will get the wrong
+quotes when we use the conditionals.
+
+_define__(_0__,`_changequote__(,)')_define__(_1__,`_changequote__(<,>)')
+_1__
+
+C. CONDITIONALS
+
+We define two macros, _if__ and _fi__. BOTH take arguments! This is
+meant both to help the human reader match up a _fi__ with its
+corresponding _if__ and to aid in the implementation. You may use the
+full expression syntax supported by M4 (see docn of `eval' builtin in
+the m4 manual).
+
+The conditional macros are carefully defined to avoid introducing
+extra whitespace (i.e., blank lines or blank characters). One side
+effect exists---
+
+ BEWARE: text following an `_if__' on the same line is
+ DISCARDED even if the condition is true; text
+ following a `_fi__' on the same line is also
+ always discarded.
+
+The recommended convention is to always place _if__ and _fi__ on a
+line by themselves. This will also aid the human reader. TeX won't
+care about the line breaks; as for info, you may want to insert calls
+to `@refill' at the end of paragraphs containing conditionalized text,
+where you don't want line breaks separating unconditional from
+conditional text. info formatting will then give you nice looking
+paragraphs in the info file.
+
+Nesting: conditionals are designed to nest, in the following way:
+*nothing* is output between an outer pair of false conditionals, even
+if there are true conditionals inside. A false conditional "defeats"
+all conditionals within it. The counter _IF_FS__ is used to
+implement this; kindly avoid redefining it directly.
+
+_define__(<_IF_FS__>,<0>)
+_define__(
+ <_pushf__>,
+ <_define__(<_IF_FS__>,
+ _incr__(_IF_FS__))>)
+_define__(
+ <_popf__>,
+ <_ifelse__(0,_IF_FS__,
+ <<>_dnl__<>>,
+ <_define__(<_IF_FS__>,_decr__(_IF_FS__))>)>)
+
+_define__(
+ <_if__>,
+ <_ifelse__(1,_eval__( ($1) ),
+ <<>_dnl__<>>,
+ <_pushf__<>_divert__(-1)>)>)
+_define__(
+ <_fi__>,
+ <_ifelse__(1,_eval__( ($1) ),
+ <<>_dnl__<>>,
+ <_popf__<>_ifelse__(0,_IF_FS__,
+ <_divert__<>_dnl__<>>,<>)>)>)
+
+D. CHAPTER/SECTION MACRO
+In a parametrized manual, the heading level may need to be calculated;
+for example, a manual that has a chapter on machine dependencies
+should be conditionally structured as follows:
+ - IF the manual is configured for a SINGLE machine type, use
+the chapter heading for that machine type, and run headings down
+from there (top level for a particular machine is chapter, then within
+that we have section, subsection etc);
+ - ELSE, if MANY machine types are described in the chapter,
+use a generic chapter heading such as "@chapter Machine Dependencies",
+use "section" for the top level description of EACH machine, and run
+headings down from there (top level for a particular machine is
+section, then within that we have subsection, subsubsection etc).
+
+The macro <_CHAPSEC__> is for this purpose: its argument is evaluated (so
+you can construct expressions to express choices such as above), then
+expands as follows:
+ 0: @chapter
+ 1: @section
+ 2: @subsection
+ 3: @subsubsection
+ ...and so on.
+
+_define__(<_CHAPSEC__>,<@_cs__(_eval__($1))>)
+_define__(<_cs__>,<_ifelse__(
+ 0, $1, <chapter>,
+ 1, $1, <section>,
+ <sub<>_cs__(_eval__($1 - 1))>)>)
+
+_divert__<>_dnl__<>
diff --git a/gdb/doc/sparc.m4 b/gdb/doc/sparc.m4
new file mode 100644
index 0000000..8cc6a3e
--- /dev/null
+++ b/gdb/doc/sparc.m4
@@ -0,0 +1,5 @@
+_divert__(-1)
+_define__(<_SPARC__>,<1>)
+_define__(<_HOST__>,<SPARC>)
+_define__(<_MACH_DEP__>,<SPARC Dependent>)
+_divert__<> \ No newline at end of file
diff --git a/gdb/doc/vax.m4 b/gdb/doc/vax.m4
new file mode 100644
index 0000000..59cb2ab
--- /dev/null
+++ b/gdb/doc/vax.m4
@@ -0,0 +1,5 @@
+_divert__(-1)
+_define__(<_VAX__>,<1>)
+_define__(<_HOST__>,<VAX>)
+_define__(<_MACH_DEP__>,<VAX Dependent>)
+_divert__<> \ No newline at end of file