* [patch+doc] New gdbinit.5 man page
@ 2013-02-11 20:14 Jan Kratochvil
2013-02-12 16:11 ` Eli Zaretskii
0 siblings, 1 reply; 24+ messages in thread
From: Jan Kratochvil @ 2013-02-11 20:14 UTC (permalink / raw)
To: gdb-patches
Hi Eli,
the primary goal is to add a new infrastructure so that man pages can be
generated from gdb.texinfo, like src/binutils/doc/ does.
Later I would like to convert current nroff src/gdb/gdb.1 also into
gdb.texinfo and also convert pending gdb_gcore.pod patch that way:
[patch] gdb_gcore man/help/install [+doc] #2
http://sourceware.org/ml/gdb-patches/2011-12/msg00157.html
Message-ID: <20111206002555.GA12329@host2.jankratochvil.net>
It adds gdbinit.5 as a proof of concept as I had to write it anyway now.
I did not want to duplicate much the gdb.info content so this man page is
mostly just about references into the info document.
I have not developed any of the Makefile rules myself, it is just a port
+ simplification of the scripts and texinfo usage from src/binutils/doc/ .
Particularly the parts of Makefile.in generated from Makefile.am .
Thanks,
Jan
gdb/doc/
2013-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
New gdbinit.5 man page.
* Makefile.in (mandir, man5dir, SYSTEM_GDBINIT, MANCONF, TEXI2POD)
(POD2MAN5, MAN5S, MANS, man, install-man, install-man5, uninstall-man)
(uninstall-man5): New.
(STAGESTUFF): Add *.5.
(GDBvn.texi): Add SYSTEM_GDBINIT.
(gdbinit.5): New.
(mostlyclean): Add $(MANS).
* gdb.texinfo (@include gdb-cfg.texi): Wrap it by @c man begin INCLUDE.
(@copying): Wrap it by @c man begin COPYRIGHT.
(Top): Add Man Pages.
(Man Pages, gdbinit man): New.
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index 7da67c6..ce3fa27 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -26,6 +26,8 @@ datarootdir = @datarootdir@
docdir = @docdir@
pdfdir = @pdfdir@
htmldir = @htmldir@
+mandir = @mandir@
+man5dir = $(mandir)/man5
SHELL = @SHELL@
@@ -35,6 +37,8 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
+SYSTEM_GDBINIT = @SYSTEM_GDBINIT@
+
mkinstalldirs = $(SHELL) $(srcdir)/../../mkinstalldirs
# main GDB source directory
@@ -160,6 +164,21 @@ ANNOTATE_DOC_FILES = \
$(ANNOTATE_DOC_SOURCE_INCLUDES) \
$(ANNOTATE_DOC_BUILD_INCLUDES)
+# Options to extract the man page from gdb.texinfo
+MANCONF = -Dman
+
+TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl \
+ $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS)
+
+POD2MAN5 = pod2man --center="GNU Development Tools" \
+ --release="gdb-$(VERSION)" --section=5
+
+# List of man pages generated from gdb.texi
+MAN5S = \
+ gdbinit.5
+
+MANS = $(MAN5S)
+
#### Host, target, and site specific Makefile fragments come in here.
###
@@ -170,6 +189,7 @@ dvi: gdb.dvi gdbint.dvi stabs.dvi refcard.dvi annotate.dvi
ps: gdb.ps gdbint.ps stabs.ps refcard.ps annotate.ps
html: $(HTMLFILES)
pdf: $(PDFFILES)
+man: $(MANS)
all-doc: info dvi ps # pdf
diststuff: info
rm -f gdb-cfg.texi GDBvn.texi
@@ -242,7 +262,30 @@ install-pdf: $(PDFFILES)
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
done
-STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi *.pdf
+install-man: install-man5
+
+install-man5: $(MAN5S)
+ test -z "$(man5dir)" || $(mkinstalldirs) "$(DESTDIR)$(man5dir)"
+ @list='$(MANS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=`echo $$p | sed -e 's|^.*/||'`; \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man5dir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(man5dir)/$$f"; \
+ done
+
+uninstall-man: uninstall-man5
+
+uninstall-man5:
+ @test -n "$(man5dir)" || exit 0; \
+ files=`{ l2='$(MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.5[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man5dir)" && rm -f $$files; }
+
+STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi *.pdf *.5
# Copy the object files from a particular stage into a subdirectory.
stage1: force
@@ -313,6 +356,9 @@ GDBvn.texi : ${gdbdir}/version.in
if test -z "$(READLINE_TEXI_INCFLAG)"; then \
echo "@set SYSTEM_READLINE" >> ./GDBvn.new; \
fi
+ if [ -n "$(SYSTEM_GDBINIT)" ]; then \
+ echo "@set SYSTEM_GDBINIT $(SYSTEM_GDBINIT)" >> ./GDBvn.new; \
+ fi
mv GDBvn.new GDBvn.texi
# Updated atomically
@@ -523,6 +569,14 @@ annotate.info: $(ANNOTATE_DOC_FILES)
annotate/index.html: $(ANNOTATE_DOC_FILES)
$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/annotate.texinfo
+# Man pages
+gdbinit.5: $(GDB_DOC_FILES)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dgdbinit < gdb.texinfo > gdbinit.pod
+ -($(POD2MAN5) gdbinit.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f gdbinit.pod
+
force:
Makefile: Makefile.in $(host_makefile_frag) ../config.status
@@ -533,7 +587,7 @@ Makefile: Makefile.in $(host_makefile_frag) ../config.status
# automatically generated files that are just intermediate files,
mostlyclean:
- rm -f gdb.mm gdb.ms gdb.me links2roff
+ rm -f gdb.mm gdb.ms gdb.me links2roff $(MANS)
rm -f $(GDB_TEX_TMPS)
rm -f $(GDBINT_TEX_TMPS)
rm -f $(STABS_TEX_TMPS)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index e3f336e..d789f98 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -6,7 +6,9 @@
@c of @set vars. However, you can override filename with makeinfo -o.
@setfilename gdb.info
@c
+@c man begin INCLUDE
@include gdb-cfg.texi
+@c man end
@c
@settitle Debugging with @value{GDBN}
@setchapternewpage odd
@@ -47,6 +49,7 @@
@end direntry
@copying
+@c man begin COPYRIGHT
Copyright @copyright{} 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
@@ -59,6 +62,7 @@ and with the Back-Cover Texts as in (a) below.
(a) The FSF's Back-Cover Text is: ``You are free to copy and modify
this GNU Manual. Buying copies from GNU Press supports the FSF in
developing GNU and promoting software freedom.''
+@c man end
@end copying
@ifnottex
@@ -180,6 +184,7 @@ software in general. We will miss him.
the operating system
* Trace File Format:: GDB trace file format
* Index Section Format:: .gdb_index section format
+* Man Pages:: Manual pages
* Copying:: GNU General Public License says
how you can copy and share GDB
* GNU Free Documentation License:: The license for this documentation
@@ -41346,6 +41351,69 @@ switch (die->tag)
@include gpl.texi
+@node Man Pages
+@appendix Manual pages
+@cindex Man pages
+
+@menu
+* gdbinit man:: gdbinit scripts
+@end menu
+
+@node gdbinit man,,,Man Pages
+@heading gdbinit
+
+@c man title gdbinit GDB initialization scripts
+
+@c man begin SYNOPSIS gdbinit
+@table @env
+@ifset SYSTEM_GDBINIT
+@itemx @value{SYSTEM_GDBINIT}
+@end ifset
+@itemx ~/.gdbinit
+@itemx ./.gdbinit
+@end table
+@c man end
+
+@c man begin DESCRIPTION gdbinit
+These files contain @value{GDBN} commands to automatically execute during
+@value{GDBN} startup. The lines of contents are canned sequences of commands,
+described in the @value{GDBN} manual in node @code{Sequences}, accessible by
+shell command @code{info -f gdb -n Sequences}.
+
+Please read more in the @value{GDBN} manual in node @code{Startup},
+accessible by shell command @code{info -f gdb -n Startup}.
+
+@table @env
+@ifset SYSTEM_GDBINIT
+@item @value{SYSTEM_GDBINIT}
+@end ifset
+@ifclear SYSTEM_GDBINIT
+@item (not enabled during @value{GDBN} compilation with @code{--with-system-gdbinit})
+@end ifclear
+System-wide initialization file. It is executed unless user specified
+@value{GDBN} option @code{-nx} or @code{-n}.
+See more in the @value{GDBN} manual in node @code{System-wide configuration},
+accessible by shell command @code{info -f gdb -n 'System-wide configuration'}.
+
+@item ~/.gdbinit
+User initialization file. It is executed unless user specified
+@value{GDBN} options @code{-nx}, @code{-n} or @code{-nh}.
+
+@item ./.gdbinit
+Initialization file for current directory. It may need to be enabled with
+@value{GDBN} security command @code{set auto-load local-gdbinit}.
+See more in the @value{GDBN} manual in node @code{Init File in the Current
+Directory} - shell command
+@code{info -f gdb -n 'Init File in the Current Directory'}.
+@end table
+@c man end
+
+@ignore
+@c man begin SEEALSO gdbinit
+gdb(1), @code{info -f gdb -n Startup}
+@c man end
+@end ignore
+
@node GNU Free Documentation License
@appendix GNU Free Documentation License
@include fdl.texi
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patch+doc] New gdbinit.5 man page
2013-02-11 20:14 [patch+doc] New gdbinit.5 man page Jan Kratochvil
@ 2013-02-12 16:11 ` Eli Zaretskii
2013-02-12 16:22 ` Jan Kratochvil
0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2013-02-12 16:11 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches
> Date: Mon, 11 Feb 2013 21:14:01 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
>
> the primary goal is to add a new infrastructure so that man pages can be
> generated from gdb.texinfo, like src/binutils/doc/ does.
I do not necessarily object, but what would be the purpose of this?
Why is this better than maintaining man pages in their roff format?
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patch+doc] New gdbinit.5 man page
2013-02-12 16:11 ` Eli Zaretskii
@ 2013-02-12 16:22 ` Jan Kratochvil
2013-02-12 21:20 ` Tom Tromey
0 siblings, 1 reply; 24+ messages in thread
From: Jan Kratochvil @ 2013-02-12 16:22 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches
On Tue, 12 Feb 2013 17:11:18 +0100, Eli Zaretskii wrote:
> I do not necessarily object, but what would be the purpose of this?
> Why is this better than maintaining man pages in their roff format?
It is in fact Tom's idea to make the man pages in texinfo:
Re: [patch] gdb_gcore man/help/install [+doc] #2
http://sourceware.org/ml/gdb-patches/2011-12/msg00659.html
Message-ID: <m3obv3mhp8.fsf@fleche.redhat.com>
> We still need an info node for invoking gcore.
But that may have applied only to gcore (/usr/bin/gcore) which currently does
not have its gdb.texinfo description. You are right gdbinit files are already
described in gdb.texinfo.
But then:
[patch] gdb_gcore man/help/install [+doc] #2
http://sourceware.org/ml/gdb-patches/2011-12/msg00157.html
Message-ID: <20111206002555.GA12329@host2.jankratochvil.net>
> From the practical point of view with the goal to generate only the nroff .1
> format I think the choice is clear from nroff, pod and texinfo.
> The most simple format for maintenance is pod. Therefore I did not use
> texi2pod at all.
nroff is not well writable + maintainable format. And writing some man pages
(like gdbinit.5) in pod and other man pages (like gdbcore.1) in texinfo seems
to be needlessly complicated to me, then I find texinfo-for-all as the most
simple way to got forward.
I already wrote gcore.1 in nroff, gcore.1 in pod and now gdbinit.5 in texinfo
se we have already looped back while choosing the right format...
Jan
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patch+doc] New gdbinit.5 man page
2013-02-12 16:22 ` Jan Kratochvil
@ 2013-02-12 21:20 ` Tom Tromey
2013-02-13 17:42 ` Eli Zaretskii
0 siblings, 1 reply; 24+ messages in thread
From: Tom Tromey @ 2013-02-12 21:20 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: Eli Zaretskii, gdb-patches
Jan> It is in fact Tom's idea to make the man pages in texinfo:
I think it is worth doing if it makes maintenance simpler at all.
This approach has worked ok for gcc for a long time now.
Tom
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patch+doc] New gdbinit.5 man page
2013-02-12 21:20 ` Tom Tromey
@ 2013-02-13 17:42 ` Eli Zaretskii
2013-02-19 16:28 ` Jan Kratochvil
0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2013-02-13 17:42 UTC (permalink / raw)
To: Tom Tromey; +Cc: jan.kratochvil, gdb-patches
> From: Tom Tromey <tromey@redhat.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sourceware.org
> Date: Tue, 12 Feb 2013 14:19:55 -0700
>
> Jan> It is in fact Tom's idea to make the man pages in texinfo:
>
> I think it is worth doing if it makes maintenance simpler at all.
I just don't see how it will make maintenance simpler. But I'm
prepared to be convinced ;-)
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patch+doc] New gdbinit.5 man page
2013-02-13 17:42 ` Eli Zaretskii
@ 2013-02-19 16:28 ` Jan Kratochvil
2013-02-19 18:03 ` Eli Zaretskii
0 siblings, 1 reply; 24+ messages in thread
From: Jan Kratochvil @ 2013-02-19 16:28 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Tom Tromey, gdb-patches
On Wed, 13 Feb 2013 18:42:25 +0100, Eli Zaretskii wrote:
> I just don't see how it will make maintenance simpler. But I'm
> prepared to be convinced ;-)
On Tue, 12 Feb 2013 17:11:18 +0100, Eli Zaretskii wrote:
> Why is this better than maintaining man pages in their roff format?
One reason is that mostly any other format is more convenient to write and
maintain than roff. So that means to write man pages either in pod or in
texinfo (or maybe in some other format but not roff).
At least the content of man page for gdb/gdb_gcore.sh (/usr/bin/gcore) should
be available also in texinfo as gcore's script description is currently not
present in the GDB manual.
Having gdb/gdb_gcore.sh man page in texinfo and other (like /usr/bin/gdb) man
pages in other format seems more complicated to me than having all the man
pages in single format (which is texinfo in this case).
Another reason is that GDB contributors already have to know texinfo for the
GDB manual updates so it means a more difficult learning curve to require
another documentation format (such as pod) knowledge from contributors.
Is there some reason why not to have all the GDB man pages in texinfo?
Thanks,
Jan
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patch+doc] New gdbinit.5 man page
2013-02-19 16:28 ` Jan Kratochvil
@ 2013-02-19 18:03 ` Eli Zaretskii
2013-02-20 8:44 ` Jan Kratochvil
0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2013-02-19 18:03 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: tromey, gdb-patches
> Date: Tue, 19 Feb 2013 17:27:41 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: Tom Tromey <tromey@redhat.com>, gdb-patches@sourceware.org
>
> On Wed, 13 Feb 2013 18:42:25 +0100, Eli Zaretskii wrote:
> > I just don't see how it will make maintenance simpler. But I'm
> > prepared to be convinced ;-)
>
> On Tue, 12 Feb 2013 17:11:18 +0100, Eli Zaretskii wrote:
> > Why is this better than maintaining man pages in their roff format?
>
> One reason is that mostly any other format is more convenient to write and
> maintain than roff. So that means to write man pages either in pod or in
> texinfo (or maybe in some other format but not roff).
There's a downside as well: you need Perl to be available.
> Another reason is that GDB contributors already have to know texinfo for the
> GDB manual updates so it means a more difficult learning curve to require
> another documentation format (such as pod) knowledge from contributors.
>
> Is there some reason why not to have all the GDB man pages in texinfo?
If doing that helps people contribute and keep the man pages up to
date, let's go for it.
Thanks.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patch+doc] New gdbinit.5 man page
2013-02-19 18:03 ` Eli Zaretskii
@ 2013-02-20 8:44 ` Jan Kratochvil
2013-02-20 19:26 ` Eli Zaretskii
0 siblings, 1 reply; 24+ messages in thread
From: Jan Kratochvil @ 2013-02-20 8:44 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: tromey, gdb-patches
On Tue, 19 Feb 2013 19:02:09 +0100, Eli Zaretskii wrote:
> There's a downside as well: you need Perl to be available.
Good catch, binutils.tar distributes the *.1 files, fixed gdb/doc/Makefile.in
to do the same [attached].
> If doing that helps people contribute and keep the man pages up to
> date, let's go for it.
I will therefore add later the other (two) man pages to gdb.texinfo.
Jan
gdb/doc/
2013-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
New gdbinit.5 man page.
* Makefile.in (mandir, man5dir, SYSTEM_GDBINIT, MANCONF, TEXI2POD)
(POD2MAN5, MAN5S, MANS, man): New.
(diststuff): Add man.
(install-man, install-man5, uninstall-man, uninstall-man5): New.
(STAGESTUFF): Add *.5.
(GDBvn.texi): Add SYSTEM_GDBINIT.
(gdbinit.5): New.
(maintainer-clean realclean): Add $(MANS).
* gdb.texinfo (@include gdb-cfg.texi): Wrap it by @c man begin INCLUDE.
(@copying): Wrap it by @c man begin COPYRIGHT.
(Top): Add Man Pages.
(Man Pages, gdbinit man): New.
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index 7da67c6..4572041 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -26,6 +26,8 @@ datarootdir = @datarootdir@
docdir = @docdir@
pdfdir = @pdfdir@
htmldir = @htmldir@
+mandir = @mandir@
+man5dir = $(mandir)/man5
SHELL = @SHELL@
@@ -35,6 +37,8 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
+SYSTEM_GDBINIT = @SYSTEM_GDBINIT@
+
mkinstalldirs = $(SHELL) $(srcdir)/../../mkinstalldirs
# main GDB source directory
@@ -160,6 +164,21 @@ ANNOTATE_DOC_FILES = \
$(ANNOTATE_DOC_SOURCE_INCLUDES) \
$(ANNOTATE_DOC_BUILD_INCLUDES)
+# Options to extract the man page from gdb.texinfo
+MANCONF = -Dman
+
+TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl \
+ $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS)
+
+POD2MAN5 = pod2man --center="GNU Development Tools" \
+ --release="gdb-$(VERSION)" --section=5
+
+# List of man pages generated from gdb.texi
+MAN5S = \
+ gdbinit.5
+
+MANS = $(MAN5S)
+
#### Host, target, and site specific Makefile fragments come in here.
###
@@ -170,8 +189,9 @@ dvi: gdb.dvi gdbint.dvi stabs.dvi refcard.dvi annotate.dvi
ps: gdb.ps gdbint.ps stabs.ps refcard.ps annotate.ps
html: $(HTMLFILES)
pdf: $(PDFFILES)
+man: $(MANS)
all-doc: info dvi ps # pdf
-diststuff: info
+diststuff: info man
rm -f gdb-cfg.texi GDBvn.texi
install-info: $(INFO_DEPS)
@@ -242,7 +262,30 @@ install-pdf: $(PDFFILES)
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
done
-STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi *.pdf
+install-man: install-man5
+
+install-man5: $(MAN5S)
+ test -z "$(man5dir)" || $(mkinstalldirs) "$(DESTDIR)$(man5dir)"
+ @list='$(MANS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=`echo $$p | sed -e 's|^.*/||'`; \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man5dir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(man5dir)/$$f"; \
+ done
+
+uninstall-man: uninstall-man5
+
+uninstall-man5:
+ @test -n "$(man5dir)" || exit 0; \
+ files=`{ l2='$(MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.5[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man5dir)" && rm -f $$files; }
+
+STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi *.pdf *.5
# Copy the object files from a particular stage into a subdirectory.
stage1: force
@@ -313,6 +356,9 @@ GDBvn.texi : ${gdbdir}/version.in
if test -z "$(READLINE_TEXI_INCFLAG)"; then \
echo "@set SYSTEM_READLINE" >> ./GDBvn.new; \
fi
+ if [ -n "$(SYSTEM_GDBINIT)" ]; then \
+ echo "@set SYSTEM_GDBINIT $(SYSTEM_GDBINIT)" >> ./GDBvn.new; \
+ fi
mv GDBvn.new GDBvn.texi
# Updated atomically
@@ -523,6 +569,14 @@ annotate.info: $(ANNOTATE_DOC_FILES)
annotate/index.html: $(ANNOTATE_DOC_FILES)
$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/annotate.texinfo
+# Man pages
+gdbinit.5: $(GDB_DOC_FILES)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dgdbinit < gdb.texinfo > gdbinit.pod
+ -($(POD2MAN5) gdbinit.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f gdbinit.pod
+
force:
Makefile: Makefile.in $(host_makefile_frag) ../config.status
@@ -551,7 +605,7 @@ distclean: clean
# "clean" or "distclean". Use maintainer-clean to remove them.
maintainer-clean realclean: distclean
- rm -f GDBvn.texi *.info* *.dvi *.ps *.html *.pdf
+ rm -f GDBvn.texi *.info* *.dvi *.ps *.html *.pdf $(MANS)
install: install-info
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index e8ac8c5..82d81b4 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -6,7 +6,9 @@
@c of @set vars. However, you can override filename with makeinfo -o.
@setfilename gdb.info
@c
+@c man begin INCLUDE
@include gdb-cfg.texi
+@c man end
@c
@settitle Debugging with @value{GDBN}
@setchapternewpage odd
@@ -47,6 +49,7 @@
@end direntry
@copying
+@c man begin COPYRIGHT
Copyright @copyright{} 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
@@ -59,6 +62,7 @@ and with the Back-Cover Texts as in (a) below.
(a) The FSF's Back-Cover Text is: ``You are free to copy and modify
this GNU Manual. Buying copies from GNU Press supports the FSF in
developing GNU and promoting software freedom.''
+@c man end
@end copying
@ifnottex
@@ -180,6 +184,7 @@ software in general. We will miss him.
the operating system
* Trace File Format:: GDB trace file format
* Index Section Format:: .gdb_index section format
+* Man Pages:: Manual pages
* Copying:: GNU General Public License says
how you can copy and share GDB
* GNU Free Documentation License:: The license for this documentation
@@ -41350,6 +41355,69 @@ switch (die->tag)
@include gpl.texi
+@node Man Pages
+@appendix Manual pages
+@cindex Man pages
+
+@menu
+* gdbinit man:: gdbinit scripts
+@end menu
+
+@node gdbinit man,,,Man Pages
+@heading gdbinit
+
+@c man title gdbinit GDB initialization scripts
+
+@c man begin SYNOPSIS gdbinit
+@table @env
+@ifset SYSTEM_GDBINIT
+@itemx @value{SYSTEM_GDBINIT}
+@end ifset
+@itemx ~/.gdbinit
+@itemx ./.gdbinit
+@end table
+@c man end
+
+@c man begin DESCRIPTION gdbinit
+These files contain @value{GDBN} commands to automatically execute during
+@value{GDBN} startup. The lines of contents are canned sequences of commands,
+described in the @value{GDBN} manual in node @code{Sequences}, accessible by
+shell command @code{info -f gdb -n Sequences}.
+
+Please read more in the @value{GDBN} manual in node @code{Startup},
+accessible by shell command @code{info -f gdb -n Startup}.
+
+@table @env
+@ifset SYSTEM_GDBINIT
+@item @value{SYSTEM_GDBINIT}
+@end ifset
+@ifclear SYSTEM_GDBINIT
+@item (not enabled during @value{GDBN} compilation with @code{--with-system-gdbinit})
+@end ifclear
+System-wide initialization file. It is executed unless user specified
+@value{GDBN} option @code{-nx} or @code{-n}.
+See more in the @value{GDBN} manual in node @code{System-wide configuration},
+accessible by shell command @code{info -f gdb -n 'System-wide configuration'}.
+
+@item ~/.gdbinit
+User initialization file. It is executed unless user specified
+@value{GDBN} options @code{-nx}, @code{-n} or @code{-nh}.
+
+@item ./.gdbinit
+Initialization file for current directory. It may need to be enabled with
+@value{GDBN} security command @code{set auto-load local-gdbinit}.
+See more in the @value{GDBN} manual in node @code{Init File in the Current
+Directory} - shell command
+@code{info -f gdb -n 'Init File in the Current Directory'}.
+@end table
+@c man end
+
+@ignore
+@c man begin SEEALSO gdbinit
+gdb(1), @code{info -f gdb -n Startup}
+@c man end
+@end ignore
+
@node GNU Free Documentation License
@appendix GNU Free Documentation License
@include fdl.texi
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patch+doc] New gdbinit.5 man page
2013-02-20 8:44 ` Jan Kratochvil
@ 2013-02-20 19:26 ` Eli Zaretskii
2013-04-04 22:09 ` [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1 Jan Kratochvil
0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2013-02-20 19:26 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: tromey, gdb-patches
> Date: Wed, 20 Feb 2013 09:43:53 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: tromey@redhat.com, gdb-patches@sourceware.org
>
> +@node gdbinit man,,,Man Pages
There's no need to have prev/next/up pointers on the @node line, I
don't think we use them elsewhere.
> +@c man begin DESCRIPTION gdbinit
> +These files contain @value{GDBN} commands to automatically execute during
> +@value{GDBN} startup. The lines of contents are canned sequences of commands,
> +described in the @value{GDBN} manual in node @code{Sequences}, accessible by
> +shell command @code{info -f gdb -n Sequences}.
Hmm. A reference such as "in node @code{Sequences}" is not a Texinfo
reference, it won't produce a link that can be followed in an Info
reader. If we want this stuff to be part of the manual, we could use
conditionals, so that we get a usual xref in the manual, and text like
above in the man pages.
Alternatively, we could keep these as separate files, not included in
the manual; then the form you used would be fine.
> +See more in the @value{GDBN} manual in node @code{Init File in the Current
> +Directory} - shell command
^^^
You want 2 or 3 dashes in a row here.
OK with those changes.
Thanks.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1
2013-02-20 19:26 ` Eli Zaretskii
@ 2013-04-04 22:09 ` Jan Kratochvil
2013-04-05 11:47 ` Eli Zaretskii
0 siblings, 1 reply; 24+ messages in thread
From: Jan Kratochvil @ 2013-04-04 22:09 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: tromey, gdb-patches
On Wed, 20 Feb 2013 20:26:59 +0100, Eli Zaretskii wrote:
> > +@c man begin DESCRIPTION gdbinit
> > +These files contain @value{GDBN} commands to automatically execute during
> > +@value{GDBN} startup. The lines of contents are canned sequences of commands,
> > +described in the @value{GDBN} manual in node @code{Sequences}, accessible by
> > +shell command @code{info -f gdb -n Sequences}.
>
> Hmm. A reference such as "in node @code{Sequences}" is not a Texinfo
> reference, it won't produce a link that can be followed in an Info
> reader. If we want this stuff to be part of the manual, we could use
> conditionals, so that we get a usual xref in the manual, and text like
> above in the man pages.
Done with @ref.
> > +See more in the @value{GDBN} manual in node @code{Init File in the Current
> > +Directory} - shell command
> ^^^
> You want 2 or 3 dashes in a row here.
Done 2.
Thanks,
Jan
gdb/
2013-04-04 Jan Kratochvil <jan.kratochvil@redhat.com>
Convert man pages to texinfo, new gdbinit.5 texinfo page.
* Makefile.in (gdb.z): Remove.
(install-only): Remove $(man1dir) and gdb.1 installation.
* gdb.1: Remove.
gdb/gdbserver/
2013-04-04 Jan Kratochvil <jan.kratochvil@redhat.com>
* Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
installation.
* gdbserver.1: Remove.
gdb/doc/
2013-04-04 Jan Kratochvil <jan.kratochvil@redhat.com>
Convert man pages to texinfo, new gdbinit.5 texinfo page.
* Makefile.in (mandir, man1dir, man5dir, SYSTEM_GDBINIT, MANCONF,
(TEXI2POD, POD2MAN1, POD2MAN5, MAN1S, MAN5S, MANS, man): New.
(diststuff): Add man.
(install-man, install-man1, install-man5, uninstall-man, uninstall-man1)
(uninstall-man5): New.
(STAGESTUFF): Add *.1 and *.5.
(GDBvn.texi): Add SYSTEM_GDBINIT.
(gdb.1, gdbserver.1, gdbinit.5): New.
(maintainer-clean realclean): Add $(MANS).
(install): Add install-man.
(uninstall): Add uninstall-man.
* gdb.texinfo (@include gdb-cfg.texi): Wrap it by @c man begin INCLUDE.
(@copying): Wrap it by @c man begin COPYRIGHT.
(Top): Add Man Pages.
(Man Pages, gdb man, gdbserver man, gdbinit man): New.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 47b4338..9a0a624 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1019,11 +1019,6 @@ check//%: force
info install-info clean-info dvi pdf install-pdf html install-html: force
@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
-gdb.z:gdb.1
- nroff -man $(srcdir)/gdb.1 | col -b > gdb.t
- pack gdb.t ; rm -f gdb.t
- mv gdb.t.z gdb.z
-
# Traditionally "install" depends on "all". But it may be useful
# not to; for example, if the user has made some trivial change to a
# source file and doesn't care about rebuilding or just wants to save the
@@ -1043,10 +1038,6 @@ install-only: $(CONFIG_INSTALL)
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
$(INSTALL_PROGRAM) gdb$(EXEEXT) \
$(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
- $(SHELL) $(srcdir)/../mkinstalldirs \
- $(DESTDIR)$(man1dir) ; \
- $(INSTALL_DATA) $(srcdir)/gdb.1 \
- $(DESTDIR)$(man1dir)/$$transformed_name.1 ; \
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \
$(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h
@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index 7da67c6..b016740 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -26,6 +26,9 @@ datarootdir = @datarootdir@
docdir = @docdir@
pdfdir = @pdfdir@
htmldir = @htmldir@
+mandir = @mandir@
+man1dir = $(mandir)/man1
+man5dir = $(mandir)/man5
SHELL = @SHELL@
@@ -35,6 +38,8 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
+SYSTEM_GDBINIT = @SYSTEM_GDBINIT@
+
mkinstalldirs = $(SHELL) $(srcdir)/../../mkinstalldirs
# main GDB source directory
@@ -160,6 +165,22 @@ ANNOTATE_DOC_FILES = \
$(ANNOTATE_DOC_SOURCE_INCLUDES) \
$(ANNOTATE_DOC_BUILD_INCLUDES)
+# Options to extract the man page from gdb.texinfo
+MANCONF = -Dman
+
+TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl \
+ $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS)
+
+POD2MAN1 = pod2man --center="GNU Development Tools" \
+ --release="gdb-$(VERSION)" --section=1
+POD2MAN5 = pod2man --center="GNU Development Tools" \
+ --release="gdb-$(VERSION)" --section=5
+
+# List of man pages generated from gdb.texi
+MAN1S = gdb.1 gdbserver.1
+MAN5S = gdbinit.5
+MANS = $(MAN1S) $(MAN5S)
+
#### Host, target, and site specific Makefile fragments come in here.
###
@@ -170,8 +191,9 @@ dvi: gdb.dvi gdbint.dvi stabs.dvi refcard.dvi annotate.dvi
ps: gdb.ps gdbint.ps stabs.ps refcard.ps annotate.ps
html: $(HTMLFILES)
pdf: $(PDFFILES)
+man: $(MANS)
all-doc: info dvi ps # pdf
-diststuff: info
+diststuff: info man
rm -f gdb-cfg.texi GDBvn.texi
install-info: $(INFO_DEPS)
@@ -242,7 +264,49 @@ install-pdf: $(PDFFILES)
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
done
-STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi *.pdf
+install-man: install-man1 install-man5
+
+install-man1: $(MAN1S)
+ test -z "$(man1dir)" || $(mkinstalldirs) "$(DESTDIR)$(man1dir)"
+ @list='$(MANS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=`echo $$p | sed -e 's|^.*/||'`; \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man1dir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(man1dir)/$$f"; \
+ done
+
+install-man5: $(MAN5S)
+ test -z "$(man5dir)" || $(mkinstalldirs) "$(DESTDIR)$(man5dir)"
+ @list='$(MANS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=`echo $$p | sed -e 's|^.*/||'`; \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man5dir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(man5dir)/$$f"; \
+ done
+
+uninstall-man: uninstall-man1 uninstall-man5
+
+uninstall-man1:
+ @test -n "$(man1dir)" || exit 0; \
+ files=`{ l2='$(MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+
+uninstall-man5:
+ @test -n "$(man5dir)" || exit 0; \
+ files=`{ l2='$(MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.5[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man5dir)" && rm -f $$files; }
+
+STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi *.pdf *.1 *.5
# Copy the object files from a particular stage into a subdirectory.
stage1: force
@@ -313,6 +377,9 @@ GDBvn.texi : ${gdbdir}/version.in
if test -z "$(READLINE_TEXI_INCFLAG)"; then \
echo "@set SYSTEM_READLINE" >> ./GDBvn.new; \
fi
+ if [ -n "$(SYSTEM_GDBINIT)" ]; then \
+ echo "@set SYSTEM_GDBINIT $(SYSTEM_GDBINIT)" >> ./GDBvn.new; \
+ fi
mv GDBvn.new GDBvn.texi
# Updated atomically
@@ -523,6 +590,28 @@ annotate.info: $(ANNOTATE_DOC_FILES)
annotate/index.html: $(ANNOTATE_DOC_FILES)
$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/annotate.texinfo
+# Man pages
+gdb.1: $(GDB_DOC_FILES)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dgdb < gdb.texinfo > gdb.pod
+ -($(POD2MAN1) gdb.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f gdb.pod
+
+gdbserver.1: $(GDB_DOC_FILES)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dgdbserver < gdb.texinfo > gdbserver.pod
+ -($(POD2MAN1) gdbserver.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f gdbserver.pod
+
+gdbinit.5: $(GDB_DOC_FILES)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dgdbinit < gdb.texinfo > gdbinit.pod
+ -($(POD2MAN5) gdbinit.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f gdbinit.pod
+
force:
Makefile: Makefile.in $(host_makefile_frag) ../config.status
@@ -551,8 +640,8 @@ distclean: clean
# "clean" or "distclean". Use maintainer-clean to remove them.
maintainer-clean realclean: distclean
- rm -f GDBvn.texi *.info* *.dvi *.ps *.html *.pdf
+ rm -f GDBvn.texi *.info* *.dvi *.ps *.html *.pdf $(MANS)
-install: install-info
+install: install-info install-man
-uninstall: uninstall-info
+uninstall: uninstall-info uninstall-man
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 8ae7259..eebfc85 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -6,7 +6,9 @@
@c of @set vars. However, you can override filename with makeinfo -o.
@setfilename gdb.info
@c
+@c man begin INCLUDE
@include gdb-cfg.texi
+@c man end
@c
@settitle Debugging with @value{GDBN}
@setchapternewpage odd
@@ -46,6 +48,7 @@
@end direntry
@copying
+@c man begin COPYRIGHT
Copyright @copyright{} 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
@@ -58,6 +61,7 @@ and with the Back-Cover Texts as in (a) below.
(a) The FSF's Back-Cover Text is: ``You are free to copy and modify
this GNU Manual. Buying copies from GNU Press supports the FSF in
developing GNU and promoting software freedom.''
+@c man end
@end copying
@ifnottex
@@ -179,6 +183,7 @@ software in general. We will miss him.
the operating system
* Trace File Format:: GDB trace file format
* Index Section Format:: .gdb_index section format
+* Man Pages:: Manual pages
* Copying:: GNU General Public License says
how you can copy and share GDB
* GNU Free Documentation License:: The license for this documentation
@@ -41597,6 +41602,480 @@ switch (die->tag)
@}
@end smallexample
+@node Man Pages
+@appendix Manual pages
+@cindex Man pages
+
+@menu
+* gdb man:: The GNU Debugger man page
+* gdbserver man:: Remote Server for the GNU Debugger man page
+* gdbinit man:: gdbinit scripts
+@end menu
+
+@node gdb man
+@heading gdb man
+
+@c man title gdb The GNU Debugger
+
+@c man begin SYNOPSIS gdb
+gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}]
+[@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}]
+[@option{-b}@w{ }@var{bps}]
+ [@option{-tty=}@var{dev}] [@option{-s} @var{symfile}]
+[@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}]
+[@option{-c}@w{ }@var{core}] [@option{-x}@w{ }@var{cmds}]
+ [@option{-d}@w{ }@var{dir}] [@var{prog}|@var{core}|@var{procID}]
+@c man end
+
+@c man begin DESCRIPTION gdb
+The purpose of a debugger such as @value{GDBN} is to allow you to see what is
+going on ``inside'' another program while it executes -- or what another
+program was doing at the moment it crashed.
+
+@value{GDBN} can do four main kinds of things (plus other things in support of
+these) to help you catch bugs in the act:
+
+@itemize @bullet
+@item
+Start your program, specifying anything that might affect its behavior.
+
+@item
+Make your program stop on specified conditions.
+
+@item
+Examine what has happened, when your program has stopped.
+
+@item
+Change things in your program, so you can experiment with correcting the
+effects of one bug and go on to learn about another.
+@end itemize
+
+You can use @value{GDBN} to debug programs written in C, C++, and Modula-2.
+Fortran support will be added when a GNU Fortran compiler is ready.
+
+GDB is invoked with the shell command @code{gdb}. Once started, it reads
+commands from the terminal until you tell it to exit with the @value{GDBN}
+command @code{quit}. You can get online help from @value{GDBN} itself
+by using the command @code{help}.
+
+You can run @code{gdb} with no arguments or options; but the most
+usual way to start @value{GDBN} is with one argument or two, specifying an
+executable program as the argument:
+
+@smallexample
+gdb program
+@end smallexample
+
+You can also start with both an executable program and a core file specified:
+
+@smallexample
+gdb program core
+@end smallexample
+
+You can, instead, specify a process ID as a second argument, if you want
+to debug a running process:
+
+@smallexample
+gdb program 1234
+@end smallexample
+
+would attach @value{GDBN} to process @code{1234} (unless you also have a file
+named @file{1234}; @value{GDBN} does check for a core file first).
+
+Here are some of the most frequently needed @value{GDBN} commands:
+
+@c pod2man highlights the right hand side of the @item lines.
+@table @env
+@item break [@var{file}:]@var{functiop}
+Set a breakpoint at @var{function} (in @var{file}).
+
+@item run [@var{arglist}]
+Start your program (with @var{arglist}, if specified).
+
+@item bt
+Backtrace: display the program stack.
+
+@item print @var{expr}
+Display the value of an expression.
+
+@item c
+Continue running your program (after stopping, e.g. at a breakpoint).
+
+@item next
+Execute next program line (after stopping); step @emph{over} any
+function calls in the line.
+
+@item edit [@var{file}:]@var{function}
+look at the program line where it is presently stopped.
+
+@item list [@var{file}:]@var{function}
+type the text of the program in the vicinity of where it is presently stopped.
+
+@item step
+Execute next program line (after stopping); step @emph{into} any
+function calls in the line.
+
+@item help [@var{name}]
+Show information about @value{GDBN} command @var{name}, or general information
+about using @value{GDBN}.
+
+@item quit
+Exit from @value{GDBN}.
+@end table
+
+@ifset man
+For full details on @value{GDBN},
+see @cite{Using GDB: A Guide to the GNU Source-Level Debugger},
+by Richard M. Stallman and Roland H. Pesch. The same text is available online
+as the @code{gdb} entry in the @code{info} program.
+@end ifset
+@c man end
+
+@c man begin OPTIONS gdb
+Any arguments other than options specify an executable
+file and core file (or process ID); that is, the first argument
+encountered with no
+associated option flag is equivalent to a @option{-se} option, and the second,
+if any, is equivalent to a @option{-c} option if it's the name of a file.
+Many options have
+both long and short forms; both are shown here. The long forms are also
+recognized if you truncate them, so long as enough of the option is
+present to be unambiguous. (If you prefer, you can flag option
+arguments with @option{+} rather than @option{-}, though we illustrate the
+more usual convention.)
+
+All the options and command line arguments you give are processed
+in sequential order. The order makes a difference when the @option{-x}
+option is used.
+
+@table @env
+@item -help
+@itemx -h
+List all options, with brief explanations.
+
+@item -symbols=@var{file}
+@itemx -s @var{file}
+Read symbol table from file @var{file}.
+
+@item -write
+Enable writing into executable and core files.
+
+@item -exec=@var{file}
+@itemx -e @var{file}
+Use file @var{file} as the executable file to execute when
+appropriate, and for examining pure data in conjunction with a core
+dump.
+
+@item -se=@var{file}
+Read symbol table from file @var{file} and use it as the executable
+file.
+
+@item -core=@var{file}
+@itemx -c @var{file}
+Use file @var{file} as a core dump to examine.
+
+@item -command=@var{file}
+@itemx -x @var{file}
+Execute @value{GDBN} commands from file @var{file}.
+
+@item -ex @var{command}
+Execute given @value{GDBN} @var{command}.
+
+@item -directory=@var{directory}
+@itemx -d @var{directory}
+Add @var{directory} to the path to search for source files.
+
+@item -nh
+Do not execute commands from @file{~/.gdbinit}.
+
+@item -nx
+@itemx -n
+Do not execute commands from any @file{.gdbinit} initialization files.
+
+@item -quiet
+@itemx -q
+``Quiet''. Do not print the introductory and copyright messages. These
+messages are also suppressed in batch mode.
+
+@item -batch
+Run in batch mode. Exit with status @code{0} after processing all the command
+files specified with @option{-x} (and @file{.gdbinit}, if not inhibited).
+Exit with nonzero status if an error occurs in executing the @value{GDBN}
+commands in the command files.
+
+Batch mode may be useful for running @value{GDBN} as a filter, for example to
+download and run a program on another computer; in order to make this
+more useful, the message
+
+@smallexample
+Program exited normally.
+@end smallexample
+
+(which is ordinarily issued whenever a program running under @value{GDBN} control
+terminates) is not issued when running in batch mode.
+
+@item -cd=@var{directory}
+Run @value{GDBN} using @var{directory} as its working directory,
+instead of the current directory.
+
+@item -fullname
+@itemx -f
+Emacs sets this option when it runs @value{GDBN} as a subprocess. It tells
+@value{GDBN} to output the full file name and line number in a standard,
+recognizable fashion each time a stack frame is displayed (which
+includes each time the program stops). This recognizable format looks
+like two @samp{\032} characters, followed by the file name, line number
+and character position separated by colons, and a newline. The
+Emacs-to-@value{GDBN} interface program uses the two @samp{\032}
+characters as a signal to display the source code for the frame.
+
+@item -b @var{bps}
+Set the line speed (baud rate or bits per second) of any serial
+interface used by @value{GDBN} for remote debugging.
+
+@item -tty=@var{device}
+Run using @var{device} for your program's standard input and output.
+@end table
+@c man end
+
+@c man begin SEEALSO gdb
+@ifset man
+The full documentation for @value{GDBN} is maintained as a Texinfo manual.
+If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo
+documentation are properly installed at your site, the command
+
+@smallexample
+info gdb
+@end smallexample
+
+should give you access to the complete manual.
+
+@cite{Using GDB: A Guide to the GNU Source-Level Debugger},
+Richard M. Stallman and Roland H. Pesch, July 1991.
+@end ifset
+@c man end
+
+@node gdbserver man
+@heading gdbserver man
+
+@c man title gdbserver Remote Server for the GNU Debugger
+@format
+@c man begin SYNOPSIS gdbserver
+gdbserver @var{tty} @var{prog} [@var{args}@dots{}]
+
+gdbserver @var{tty} --attach @var{PID}
+@c man end
+@end format
+
+@c man begin DESCRIPTION gdbserver
+@command{gdbserver} is a program that allows you to run @value{GDBN} on a different machine
+than the one which is running the program being debugged.
+
+@ifclear man
+@subheading Usage (server (target) side)
+@end ifclear
+@ifset man
+Usage (server (target) side):
+@end ifset
+
+First, you need to have a copy of the program you want to debug put onto
+the target system. The program can be stripped to save space if needed, as
+@command{gdbserver} doesn't care about symbols. All symbol handling is taken care of by
+the @value{GDBN} running on the host system.
+
+To use the server, you log on to the target system, and run the @command{gdbserver}
+program. You must tell it (a) how to communicate with @value{GDBN}, (b) the name of
+your program, and (c) its arguments. The general syntax is:
+
+@smallexample
+target> gdbserver COMM PROGRAM [ARGS ...]
+@end smallexample
+
+For example, using a serial port, you might say:
+
+@smallexample
+target> gdbserver /dev/com1 emacs foo.txt
+@end smallexample
+
+This tells @command{gdbserver} to debug emacs with an argument of foo.txt, and to
+communicate with @value{GDBN} via /dev/com1. @command{gdbserver} now waits patiently for the
+host @value{GDBN} to communicate with it.
+
+To use a TCP connection, you could say:
+
+@smallexample
+target> gdbserver host:2345 emacs foo.txt
+@end smallexample
+
+This says pretty much the same thing as the last example, except that we are
+going to communicate with the host @value{GDBN} via TCP. The `host:2345' argument means
+that we are expecting to see a TCP connection from `host' to local TCP port
+2345. (Currently, the `host' part is ignored.) You can choose any number you
+want for the port number as long as it does not conflict with any existing TCP
+ports on the target system. This same port number must be used in the host
+@value{GDBN}s `target remote' command, which will be described shortly. Note that if
+you chose a port number that conflicts with another service, @command{gdbserver} will
+print an error message and exit.
+
+On some targets, @command{gdbserver} can also attach to running programs.
+This is accomplished via the --attach argument. The syntax is:
+
+@smallexample
+target> gdbserver COMM --attach PID
+@end smallexample
+
+PID is the process ID of a currently running process. It isn't
+necessary to point @command{gdbserver} at a binary for the running process.
+
+@ifclear man
+@subheading Usage (host side)
+@end ifclear
+@ifset man
+Usage (host side):
+@end ifset
+
+You need an unstripped copy of the target program on your host system, since
+@value{GDBN} needs to examine it's symbol tables and such. Start up @value{GDBN} as you normally
+would, with the target program as the first argument. (You may need to use the
+--baud option if the serial line is running at anything except 9600 baud.)
+Ie: `gdb TARGET-PROG', or `gdb --baud BAUD TARGET-PROG'. After that, the only
+new command you need to know about is `target remote'. It's argument is either
+a device name (usually a serial device, like `/dev/ttyb'), or a HOST:PORT
+descriptor. For example:
+
+@smallexample
+(gdb) target remote /dev/ttyb
+@end smallexample
+
+communicates with the server via serial line /dev/ttyb, and:
+
+@smallexample
+(gdb) target remote the-target:2345
+@end smallexample
+
+communicates via a TCP connection to port 2345 on host `the-target', where
+you previously started up @command{gdbserver} with the same port number. Note that for
+TCP connections, you must start up @command{gdbserver} prior to using the `target remote'
+command, otherwise you may get an error that looks something like
+`Connection refused'.
+@c man end
+
+@c man begin OPTIONS gdbserver
+You have to supply the name of the program to debug
+and the tty to communicate on; the remote @value{GDBN} will do everything else.
+Any remaining arguments will be passed to the program verbatim.
+@c man end
+
+@c man begin SEEALSO gdbserver
+@ifset man
+The full documentation for @value{GDBN} is maintained as a Texinfo manual.
+If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo
+documentation are properly installed at your site, the command
+
+@smallexample
+info gdb
+@end smallexample
+
+should give you access to the complete manual.
+
+@cite{Using GDB: A Guide to the GNU Source-Level Debugger},
+Richard M. Stallman and Roland H. Pesch, July 1991.
+@end ifset
+@c man end
+
+@node gdbinit man
+@heading gdbinit
+
+@c man title gdbinit GDB initialization scripts
+
+@format
+@c man begin SYNOPSIS gdbinit
+@ifset SYSTEM_GDBINIT
+@value{SYSTEM_GDBINIT}
+@end ifset
+
+~/.gdbinit
+
+./.gdbinit
+@c man end
+@end format
+
+@c man begin DESCRIPTION gdbinit
+These files contain @value{GDBN} commands to automatically execute during
+@value{GDBN} startup. The lines of contents are canned sequences of commands,
+described in
+@ifset man
+the @value{GDBN} manual in node @code{Sequences}
+-- shell command @code{info -f gdb -n Sequences}.
+@end ifset
+@ifclear man
+@ref{Sequences}.
+@end ifclear
+
+Please read more in
+@ifset man
+the @value{GDBN} manual in node @code{Startup}
+-- shell command @code{info -f gdb -n Startup}.
+@end ifset
+@ifclear man
+@ref{Startup}.
+@end ifclear
+
+@table @env
+@ifset SYSTEM_GDBINIT
+@item @value{SYSTEM_GDBINIT}
+@end ifset
+@ifclear SYSTEM_GDBINIT
+@item (not enabled with @code{--with-system-gdbinit} during compilation)
+@end ifclear
+System-wide initialization file. It is executed unless user specified
+@value{GDBN} option @code{-nx} or @code{-n}.
+See more in
+@ifset man
+the @value{GDBN} manual in node @code{System-wide configuration}
+-- shell command @code{info -f gdb -n 'System-wide configuration'}.
+@end ifset
+@ifclear man
+@ref{System-wide configuration}.
+@end ifclear
+
+@item ~/.gdbinit
+User initialization file. It is executed unless user specified
+@value{GDBN} options @code{-nx}, @code{-n} or @code{-nh}.
+
+@item ./.gdbinit
+Initialization file for current directory. It may need to be enabled with
+@value{GDBN} security command @code{set auto-load local-gdbinit}.
+See more in
+@ifset man
+the @value{GDBN} manual in node @code{Init File in the Current Directory}
+-- shell command @code{info -f gdb -n 'Init File in the Current Directory'}.
+@end ifset
+@ifclear man
+@ref{Init File in the Current Directory}.
+@end ifclear
+@end table
+@c man end
+
+@c man begin SEEALSO gdbinit
+@ifset man
+gdb(1), @code{info -f gdb -n Startup}
+
+The full documentation for @value{GDBN} is maintained as a Texinfo manual.
+If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo
+documentation are properly installed at your site, the command
+
+@smallexample
+info gdb
+@end smallexample
+
+should give you access to the complete manual.
+
+@cite{Using GDB: A Guide to the GNU Source-Level Debugger},
+Richard M. Stallman and Roland H. Pesch, July 1991.
+@end ifset
+@c man end
+
@include gpl.texi
@node GNU Free Documentation License
diff --git a/gdb/gdb.1 b/gdb/gdb.1
deleted file mode 100644
index ec6c02a..0000000
--- a/gdb/gdb.1
+++ /dev/null
@@ -1,403 +0,0 @@
-.\" Copyright (C) 1991-2013 Free Software Foundation, Inc.
-.\" See section COPYING for conditions for redistribution
-.\" $Id$
-.TH gdb 1 "22may2002" "GNU Tools" "GNU Tools"
-.SH NAME
-gdb \- The GNU Debugger
-.SH SYNOPSIS
-.na
-.TP
-.B gdb
-.RB "[\|" \-help "\|]"
-.RB "[\|" \-nh "\|]"
-.RB "[\|" \-nx "\|]"
-.RB "[\|" \-q "\|]"
-.RB "[\|" \-batch "\|]"
-.RB "[\|" \-cd=\c
-.I dir\c
-\|]
-.RB "[\|" \-f "\|]"
-.RB "[\|" "\-b\ "\c
-.IR bps "\|]"
-.RB "[\|" "\-tty="\c
-.IR dev "\|]"
-.RB "[\|" "\-s "\c
-.I symfile\c
-\&\|]
-.RB "[\|" "\-e "\c
-.I prog\c
-\&\|]
-.RB "[\|" "\-se "\c
-.I prog\c
-\&\|]
-.RB "[\|" "\-c "\c
-.I core\c
-\&\|]
-.RB "[\|" "\-x "\c
-.I file\c
-\&\|]
-.RB "[\|" "\-ex "\c
-.I cmd\c
-\&\|]
-.RB "[\|" "\-d "\c
-.I dir\c
-\&\|]
-.RB "[\|" \c
-.I prog\c
-.RB "[\|" \c
-.IR core \||\| procID\c
-\&\|]\&\|]
-.ad b
-.SH DESCRIPTION
-The purpose of a debugger such as GDB is to allow you to see what is
-going on ``inside'' another program while it executes\(em\&or what another
-program was doing at the moment it crashed.
-
-GDB can do four main kinds of things (plus other things in support of
-these) to help you catch bugs in the act:
-
-.TP
-\ \ \ \(bu
-Start your program, specifying anything that might affect its behavior.
-
-.TP
-\ \ \ \(bu
-Make your program stop on specified conditions.
-
-.TP
-\ \ \ \(bu
-Examine what has happened, when your program has stopped.
-
-.TP
-\ \ \ \(bu
-Change things in your program, so you can experiment with correcting the
-effects of one bug and go on to learn about another.
-.PP
-
-You can use GDB to debug programs written in C, C++, and Modula-2.
-Fortran support will be added when a GNU Fortran compiler is ready.
-
-GDB is invoked with the shell command \c
-.B gdb\c
-\&. Once started, it reads
-commands from the terminal until you tell it to exit with the GDB
-command \c
-.B quit\c
-\&. You can get online help from \c
-.B gdb\c
-\& itself
-by using the command \c
-.B help\c
-\&.
-
-You can run \c
-.B gdb\c
-\& with no arguments or options; but the most
-usual way to start GDB is with one argument or two, specifying an
-executable program as the argument:
-.sp
-.br
-gdb\ program
-.br
-.sp
-
-You can also start with both an executable program and a core file specified:
-.sp
-.br
-gdb\ program\ core
-.br
-.sp
-
-You can, instead, specify a process ID as a second argument, if you want
-to debug a running process:
-.sp
-.br
-gdb\ program\ 1234
-.br
-.sp
-
-would attach GDB to process \c
-.B 1234\c
-\& (unless you also have a file
-named `\|\c
-.B 1234\c
-\&\|'; GDB does check for a core file first).
-
-Here are some of the most frequently needed GDB commands:
-.TP
-.B break \fR[\|\fIfile\fB:\fR\|]\fIfunction
-\&
-Set a breakpoint at \c
-.I function\c
-\& (in \c
-.I file\c
-\&).
-.TP
-.B run \fR[\|\fIarglist\fR\|]
-Start your program (with \c
-.I arglist\c
-\&, if specified).
-.TP
-.B bt
-Backtrace: display the program stack.
-.TP
-.BI print " expr"\c
-\&
-Display the value of an expression.
-.TP
-.B c
-Continue running your program (after stopping, e.g. at a breakpoint).
-.TP
-.B next
-Execute next program line (after stopping); step \c
-.I over\c
-\& any
-function calls in the line.
-.TP
-.B edit \fR[\|\fIfile\fB:\fR\|]\fIfunction
-look at the program line where it is presently stopped.
-.TP
-.B list \fR[\|\fIfile\fB:\fR\|]\fIfunction
-type the text of the program in the vicinity of where it is presently stopped.
-.TP
-.B step
-Execute next program line (after stopping); step \c
-.I into\c
-\& any
-function calls in the line.
-.TP
-.B help \fR[\|\fIname\fR\|]
-Show information about GDB command \c
-.I name\c
-\&, or general information
-about using GDB.
-.TP
-.B quit
-Exit from GDB.
-.PP
-For full details on GDB, see \c
-.I
-Using GDB: A Guide to the GNU Source-Level Debugger\c
-\&, by Richard M. Stallman and Roland H. Pesch. The same text is available online
-as the \c
-.B gdb\c
-\& entry in the \c
-.B info\c
-\& program.
-.SH OPTIONS
-Any arguments other than options specify an executable
-file and core file (or process ID); that is, the first argument
-encountered with no
-associated option flag is equivalent to a `\|\c
-.B \-se\c
-\&\|' option, and the
-second, if any, is equivalent to a `\|\c
-.B \-c\c
-\&\|' option if it's the name of a file. Many options have
-both long and short forms; both are shown here. The long forms are also
-recognized if you truncate them, so long as enough of the option is
-present to be unambiguous. (If you prefer, you can flag option
-arguments with `\|\c
-.B +\c
-\&\|' rather than `\|\c
-.B \-\c
-\&\|', though we illustrate the
-more usual convention.)
-
-All the options and command line arguments you give are processed
-in sequential order. The order makes a difference when the
-`\|\c
-.B \-x\c
-\&\|' option is used.
-
-.TP
-.B \-help
-.TP
-.B \-h
-List all options, with brief explanations.
-
-.TP
-.BI "\-symbols=" "file"\c
-.TP
-.BI "\-s " "file"\c
-\&
-Read symbol table from file \c
-.I file\c
-\&.
-
-.TP
-.B \-write
-Enable writing into executable and core files.
-
-.TP
-.BI "\-exec=" "file"\c
-.TP
-.BI "\-e " "file"\c
-\&
-Use file \c
-.I file\c
-\& as the executable file to execute when
-appropriate, and for examining pure data in conjunction with a core
-dump.
-
-.TP
-.BI "\-se=" "file"\c
-\&
-Read symbol table from file \c
-.I file\c
-\& and use it as the executable
-file.
-
-.TP
-.BI "\-core=" "file"\c
-.TP
-.BI "\-c " "file"\c
-\&
-Use file \c
-.I file\c
-\& as a core dump to examine.
-
-.TP
-.BI "\-command=" "file"\c
-.TP
-.BI "\-x " "file"\c
-\&
-Execute GDB commands from file \c
-.I file\c
-\&.
-
-.TP
-.BI "\-ex " "command"\c
-\&
-Execute given GDB \c
-.I command\c
-\&.
-
-.TP
-.BI "\-directory=" "directory"\c
-.TP
-.BI "\-d " "directory"\c
-\&
-Add \c
-.I directory\c
-\& to the path to search for source files.
-.PP
-
-.TP
-.B \-nh
-Do not execute commands from ~/.gdbinit.
-
-.TP
-.B \-nx
-.TP
-.B \-n
-Do not execute commands from any `\|\c
-.B .gdbinit\c
-\&\|' initialization files.
-
-
-.TP
-.B \-quiet
-.TP
-.B \-q
-``Quiet''. Do not print the introductory and copyright messages. These
-messages are also suppressed in batch mode.
-
-.TP
-.B \-batch
-Run in batch mode. Exit with status \c
-.B 0\c
-\& after processing all the command
-files specified with `\|\c
-.B \-x\c
-\&\|' (and `\|\c
-.B .gdbinit\c
-\&\|', if not inhibited).
-Exit with nonzero status if an error occurs in executing the GDB
-commands in the command files.
-
-Batch mode may be useful for running GDB as a filter, for example to
-download and run a program on another computer; in order to make this
-more useful, the message
-.sp
-.br
-Program\ exited\ normally.
-.br
-.sp
-
-(which is ordinarily issued whenever a program running under GDB control
-terminates) is not issued when running in batch mode.
-
-.TP
-.BI "\-cd=" "directory"\c
-\&
-Run GDB using \c
-.I directory\c
-\& as its working directory,
-instead of the current directory.
-
-.TP
-.B \-fullname
-.TP
-.B \-f
-Emacs sets this option when it runs GDB as a subprocess. It tells GDB
-to output the full file name and line number in a standard,
-recognizable fashion each time a stack frame is displayed (which
-includes each time the program stops). This recognizable format looks
-like two `\|\c
-.B \032\c
-\&\|' characters, followed by the file name, line number
-and character position separated by colons, and a newline. The
-Emacs-to-GDB interface program uses the two `\|\c
-.B \032\c
-\&\|' characters as
-a signal to display the source code for the frame.
-
-.TP
-.BI "\-b " "bps"\c
-\&
-Set the line speed (baud rate or bits per second) of any serial
-interface used by GDB for remote debugging.
-
-.TP
-.BI "\-tty=" "device"\c
-\&
-Run using \c
-.I device\c
-\& for your program's standard input and output.
-.PP
-
-.SH "SEE ALSO"
-The full documentation for
-.B gdb
-is maintained as a Texinfo manual. If the
-.B info
-and
-.B gdb
-programs and GDB's Texinfo documentation are properly installed at
-your site, the command
-.IP
-.B info gdb
-.PP
-should give you access to the complete manual.
-
-.I
-Using GDB: A Guide to the GNU Source-Level Debugger\c
-, Richard M. Stallman and Roland H. Pesch, July 1991.
-.SH COPYING
-Copyright (c) 1991, 2010 Free Software Foundation, Inc.
-.PP
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-.PP
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-.PP
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 08db2cc..ef839d3 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -252,8 +252,6 @@ install-only:
fi; \
$(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir); \
$(INSTALL_PROGRAM) gdbserver$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT); \
- $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(man1dir); \
- $(INSTALL_DATA) $(srcdir)/gdbserver.1 $(DESTDIR)$(man1dir)/$$n.1
@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
uninstall: force
diff --git a/gdb/gdbserver/gdbserver.1 b/gdb/gdbserver/gdbserver.1
deleted file mode 100644
index 59ed0bb..0000000
--- a/gdb/gdbserver/gdbserver.1
+++ /dev/null
@@ -1,116 +0,0 @@
-.\" Copyright (C) 1993-2013 Free Software Foundation, Inc.
-.\" See section COPYING for conditions for redistribution
-.TH gdbserver 1 "2 November 1993" "Cygnus Support" "GNU Development Tools"
-.SH NAME
-gdbserver \- Remote Server for the GNU Debugger
-.SH SYNOPSIS
-.na
-.TP
-.B gdbserver
-.RB tty
-.RB prog
-.RB "[\|" args... "\|]"
-.PP
-.B gdbserver
-.RB tty
-.B --attach
-.RB PID
-.ad b
-.SH DESCRIPTION
-GDBSERVER is a program that allows you to run GDB on a different machine
-than the one which is running the program being debugged.
-
-Usage (server (target) side):
-
-First, you need to have a copy of the program you want to debug put onto
-the target system. The program can be stripped to save space if needed, as
-GDBserver doesn't care about symbols. All symbol handling is taken care of by
-the GDB running on the host system.
-
-To use the server, you log on to the target system, and run the `gdbserver'
-program. You must tell it (a) how to communicate with GDB, (b) the name of
-your program, and (c) its arguments. The general syntax is:
-
- target> gdbserver COMM PROGRAM [ARGS ...]
-
-For example, using a serial port, you might say:
-
- target> gdbserver /dev/com1 emacs foo.txt
-
-This tells gdbserver to debug emacs with an argument of foo.txt, and to
-communicate with GDB via /dev/com1. Gdbserver now waits patiently for the
-host GDB to communicate with it.
-
-To use a TCP connection, you could say:
-
- target> gdbserver host:2345 emacs foo.txt
-
-This says pretty much the same thing as the last example, except that we are
-going to communicate with the host GDB via TCP. The `host:2345' argument means
-that we are expecting to see a TCP connection from `host' to local TCP port
-2345. (Currently, the `host' part is ignored.) You can choose any number you
-want for the port number as long as it does not conflict with any existing TCP
-ports on the target system. This same port number must be used in the host
-GDBs `target remote' command, which will be described shortly. Note that if
-you chose a port number that conflicts with another service, gdbserver will
-print an error message and exit.
-
-On some targets, gdbserver can also attach to running programs.
-This is accomplished via the --attach argument. The syntax is:
-
- target> gdbserver COMM --attach PID
-
-PID is the process ID of a currently running process. It isn't
-necessary to point gdbserver at a binary for the running process.
-
-Usage (host side):
-
-You need an unstripped copy of the target program on your host system, since
-GDB needs to examine it's symbol tables and such. Start up GDB as you normally
-would, with the target program as the first argument. (You may need to use the
---baud option if the serial line is running at anything except 9600 baud.)
-Ie: `gdb TARGET-PROG', or `gdb --baud BAUD TARGET-PROG'. After that, the only
-new command you need to know about is `target remote'. It's argument is either
-a device name (usually a serial device, like `/dev/ttyb'), or a HOST:PORT
-descriptor. For example:
-
- (gdb) target remote /dev/ttyb
-
-communicates with the server via serial line /dev/ttyb, and:
-
- (gdb) target remote the-target:2345
-
-communicates via a TCP connection to port 2345 on host `the-target', where
-you previously started up gdbserver with the same port number. Note that for
-TCP connections, you must start up gdbserver prior to using the `target remote'
-command, otherwise you may get an error that looks something like
-`Connection refused'.
-.SH OPTIONS
-You have to supply the name of the program to debug
-and the tty to communicate on; the remote GDB will do everything else.
-Any remaining arguments will be passed to the program verbatim.
-.SH "SEE ALSO"
-.RB "`\|" gdb "\|'"
-entry in
-.B info\c
-\&;
-.I
-Using GDB: A Guide to the GNU Source-Level Debugger\c
-, Richard M. Stallman and Roland H. Pesch, July 1991.
-.SH COPYING
-Copyright (c) 1993 Free Software Foundation, Inc.
-.PP
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-.PP
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-.PP
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1
2013-04-04 22:09 ` [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1 Jan Kratochvil
@ 2013-04-05 11:47 ` Eli Zaretskii
2013-04-05 13:03 ` Jan Kratochvil
0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2013-04-05 11:47 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: tromey, gdb-patches
> Date: Thu, 4 Apr 2013 18:09:15 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: tromey@redhat.com, gdb-patches@sourceware.org
>
> > Hmm. A reference such as "in node @code{Sequences}" is not a Texinfo
> > reference, it won't produce a link that can be followed in an Info
> > reader. If we want this stuff to be part of the manual, we could use
> > conditionals, so that we get a usual xref in the manual, and text like
> > above in the man pages.
>
> Done with @ref.
>
>
> > > +See more in the @value{GDBN} manual in node @code{Init File in the Current
> > > +Directory} - shell command
> > ^^^
> > You want 2 or 3 dashes in a row here.
>
> Done 2.
These are the only 2 changes and the only comments I had, right? If
so, this is ready to go in, thanks.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1
2013-04-05 13:03 ` Jan Kratochvil
@ 2013-04-05 13:03 ` Eli Zaretskii
2013-04-05 17:50 ` Jan Kratochvil
0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2013-04-05 13:03 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: tromey, gdb-patches
> Date: Thu, 4 Apr 2013 19:14:39 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: tromey@redhat.com, gdb-patches@sourceware.org
>
> For gdbinit.5 it is true but in this patch I also added the gdb.1 and
> gdbserver.1 conversion (so that no *.[0-9] files are in the repository
> anymore).
Ah, OK. So here goes:
> +@c man begin SYNOPSIS gdb
> +gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}]
> +[@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}]
> +[@option{-b}@w{ }@var{bps}]
> + [@option{-tty=}@var{dev}] [@option{-s} @var{symfile}]
> +[@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}]
> +[@option{-c}@w{ }@var{core}] [@option{-x}@w{ }@var{cmds}]
> + [@option{-d}@w{ }@var{dir}] [@var{prog}|@var{core}|@var{procID}]
> +@c man end
Why are the options formatted in such a strange way -- some lines
indented, others not? The original man page has them all aligned
nicely after formatting:
SYNOPSIS
gdb [-help] [-nx] [-q] [-batch] [-cd=dir] [-f] [-b bps] [-tty=dev]
[-s symfile] [-e prog] [-se prog] [-c core] [-x file] [-ex cmd]
[-d dir] [prog[core|procID]]
> +You can use @value{GDBN} to debug programs written in C, C++, and Modula-2.
^^^
C@t{++}
> +Fortran support will be added when a GNU Fortran compiler is ready.
This list of languages is outdated, right?
> +GDB is invoked with the shell command @code{gdb}. Once started, it reads
^^^
@value{GDBN}
> +You can, instead, specify a process ID as a second argument, if you want
> +to debug a running process:
> +
> +@smallexample
> +gdb program 1234
> +@end smallexample
Should we mention "gdb -p PID" as well?
> +would attach @value{GDBN} to process @code{1234} (unless you also have a file
> +named @file{1234}; @value{GDBN} does check for a core file first).
@noindent before the "would attach" line.
> +(which is ordinarily issued whenever a program running under @value{GDBN} control
@noindent before this line.
> +should give you access to the complete manual.
Likewise here.
> +@smallexample
> +target> gdbserver COMM PROGRAM [ARGS ...]
> +@end smallexample
The words in CAPS should instead be in @var (and lower-case).
> +@smallexample
> +target> gdbserver /dev/com1 emacs foo.txt
> +@end smallexample
/dev/com1 should be in @file or @code.
> +This tells @command{gdbserver} to debug emacs with an argument of foo.txt, and to
> +communicate with @value{GDBN} via /dev/com1. @command{gdbserver} now waits patiently for the
Likewise here.
> +This says pretty much the same thing as the last example, except that we are
> +going to communicate with the host @value{GDBN} via TCP. The `host:2345' argument means
> +that we are expecting to see a TCP connection from `host' to local TCP port
> +2345. (Currently, the `host' part is ignored.) You can choose any number you
> +want for the port number as long as it does not conflict with any existing TCP
> +ports on the target system. This same port number must be used in the host
> +@value{GDBN}s `target remote' command, which will be described shortly. Note that if
> +you chose a port number that conflicts with another service, @command{gdbserver} will
> +print an error message and exit.
`host', `target' etc. should be @code instead (and no quotes).
> +On some targets, @command{gdbserver} can also attach to running programs.
> +This is accomplished via the --attach argument. The syntax is:
^^^^^^^^
@option{--attach}
> +@smallexample
> +target> gdbserver COMM --attach PID
> +@end smallexample
@var instead of CAPS
> +PID is the process ID of a currently running process. It isn't
^^^
@var{pid}
> +--baud option if the serial line is running at anything except 9600 baud.)
^^^^^^
@option{--baud}
> +Ie: `gdb TARGET-PROG', or `gdb --baud BAUD TARGET-PROG'. After that, the only
^^
> +new command you need to know about is `target remote'. It's argument is either
> +a device name (usually a serial device, like `/dev/ttyb'), or a HOST:PORT
> +descriptor. For example:
"That is" ("Ie" doesn't look right at the beginning of a sentence).
Also, @code instead of quotes around commands and /dev/ttyb.
> +communicates with the server via serial line /dev/ttyb, and:
And here (and elsewhere).
> +@smallexample
> +info gdb
> +@end smallexample
> +
> +should give you access to the complete manual.
@noindent
OK with those changes.
Thanks.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1
2013-04-05 11:47 ` Eli Zaretskii
@ 2013-04-05 13:03 ` Jan Kratochvil
2013-04-05 13:03 ` Eli Zaretskii
0 siblings, 1 reply; 24+ messages in thread
From: Jan Kratochvil @ 2013-04-05 13:03 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: tromey, gdb-patches
On Thu, 04 Apr 2013 19:01:04 +0200, Eli Zaretskii wrote:
> These are the only 2 changes and the only comments I had, right? If
> so, this is ready to go in, thanks.
For gdbinit.5 it is true but in this patch I also added the gdb.1 and
gdbserver.1 conversion (so that no *.[0-9] files are in the repository
anymore).
Sorry for not splitting it but you can follow the incremental diff below where
the gdbinit.5 change is no longer visible.
Thanks,
Jan
diff --git a/README.archer b/README.archer
new file mode 100644
index 0000000..1723606
--- /dev/null
+++ b/README.archer
@@ -0,0 +1,2 @@
+Unify man pages into texinfo format:
+https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=881892
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 47b4338..9a0a624 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1019,11 +1019,6 @@ check//%: force
info install-info clean-info dvi pdf install-pdf html install-html: force
@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
-gdb.z:gdb.1
- nroff -man $(srcdir)/gdb.1 | col -b > gdb.t
- pack gdb.t ; rm -f gdb.t
- mv gdb.t.z gdb.z
-
# Traditionally "install" depends on "all". But it may be useful
# not to; for example, if the user has made some trivial change to a
# source file and doesn't care about rebuilding or just wants to save the
@@ -1043,10 +1038,6 @@ install-only: $(CONFIG_INSTALL)
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
$(INSTALL_PROGRAM) gdb$(EXEEXT) \
$(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
- $(SHELL) $(srcdir)/../mkinstalldirs \
- $(DESTDIR)$(man1dir) ; \
- $(INSTALL_DATA) $(srcdir)/gdb.1 \
- $(DESTDIR)$(man1dir)/$$transformed_name.1 ; \
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \
$(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h
@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index 4572041..b016740 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -27,6 +27,7 @@ docdir = @docdir@
pdfdir = @pdfdir@
htmldir = @htmldir@
mandir = @mandir@
+man1dir = $(mandir)/man1
man5dir = $(mandir)/man5
SHELL = @SHELL@
@@ -170,14 +171,15 @@ MANCONF = -Dman
TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl \
$(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS)
+POD2MAN1 = pod2man --center="GNU Development Tools" \
+ --release="gdb-$(VERSION)" --section=1
POD2MAN5 = pod2man --center="GNU Development Tools" \
--release="gdb-$(VERSION)" --section=5
# List of man pages generated from gdb.texi
-MAN5S = \
- gdbinit.5
-
-MANS = $(MAN5S)
+MAN1S = gdb.1 gdbserver.1
+MAN5S = gdbinit.5
+MANS = $(MAN1S) $(MAN5S)
#### Host, target, and site specific Makefile fragments come in here.
###
@@ -262,7 +264,16 @@ install-pdf: $(PDFFILES)
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
done
-install-man: install-man5
+install-man: install-man1 install-man5
+
+install-man1: $(MAN1S)
+ test -z "$(man1dir)" || $(mkinstalldirs) "$(DESTDIR)$(man1dir)"
+ @list='$(MANS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=`echo $$p | sed -e 's|^.*/||'`; \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man1dir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(man1dir)/$$f"; \
+ done
install-man5: $(MAN5S)
test -z "$(man5dir)" || $(mkinstalldirs) "$(DESTDIR)$(man5dir)"
@@ -273,7 +284,17 @@ install-man5: $(MAN5S)
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(man5dir)/$$f"; \
done
-uninstall-man: uninstall-man5
+uninstall-man: uninstall-man1 uninstall-man5
+
+uninstall-man1:
+ @test -n "$(man1dir)" || exit 0; \
+ files=`{ l2='$(MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
uninstall-man5:
@test -n "$(man5dir)" || exit 0; \
@@ -285,7 +306,7 @@ uninstall-man5:
echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(man5dir)" && rm -f $$files; }
-STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi *.pdf *.5
+STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi *.pdf *.1 *.5
# Copy the object files from a particular stage into a subdirectory.
stage1: force
@@ -570,6 +591,20 @@ annotate/index.html: $(ANNOTATE_DOC_FILES)
$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/annotate.texinfo
# Man pages
+gdb.1: $(GDB_DOC_FILES)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dgdb < gdb.texinfo > gdb.pod
+ -($(POD2MAN1) gdb.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f gdb.pod
+
+gdbserver.1: $(GDB_DOC_FILES)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dgdbserver < gdb.texinfo > gdbserver.pod
+ -($(POD2MAN1) gdbserver.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f gdbserver.pod
+
gdbinit.5: $(GDB_DOC_FILES)
touch $@
-$(TEXI2POD) $(MANCONF) -Dgdbinit < gdb.texinfo > gdbinit.pod
@@ -607,6 +642,6 @@ distclean: clean
maintainer-clean realclean: distclean
rm -f GDBvn.texi *.info* *.dvi *.ps *.html *.pdf $(MANS)
-install: install-info
+install: install-info install-man
-uninstall: uninstall-info
+uninstall: uninstall-info uninstall-man
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 6bc3c06..eebfc85 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -41602,51 +41602,442 @@ switch (die->tag)
@}
@end smallexample
-@include gpl.texi
-
@node Man Pages
@appendix Manual pages
@cindex Man pages
@menu
+* gdb man:: The GNU Debugger man page
+* gdbserver man:: Remote Server for the GNU Debugger man page
* gdbinit man:: gdbinit scripts
@end menu
-@node gdbinit man,,,Man Pages
+@node gdb man
+@heading gdb man
+
+@c man title gdb The GNU Debugger
+
+@c man begin SYNOPSIS gdb
+gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}]
+[@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}]
+[@option{-b}@w{ }@var{bps}]
+ [@option{-tty=}@var{dev}] [@option{-s} @var{symfile}]
+[@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}]
+[@option{-c}@w{ }@var{core}] [@option{-x}@w{ }@var{cmds}]
+ [@option{-d}@w{ }@var{dir}] [@var{prog}|@var{core}|@var{procID}]
+@c man end
+
+@c man begin DESCRIPTION gdb
+The purpose of a debugger such as @value{GDBN} is to allow you to see what is
+going on ``inside'' another program while it executes -- or what another
+program was doing at the moment it crashed.
+
+@value{GDBN} can do four main kinds of things (plus other things in support of
+these) to help you catch bugs in the act:
+
+@itemize @bullet
+@item
+Start your program, specifying anything that might affect its behavior.
+
+@item
+Make your program stop on specified conditions.
+
+@item
+Examine what has happened, when your program has stopped.
+
+@item
+Change things in your program, so you can experiment with correcting the
+effects of one bug and go on to learn about another.
+@end itemize
+
+You can use @value{GDBN} to debug programs written in C, C++, and Modula-2.
+Fortran support will be added when a GNU Fortran compiler is ready.
+
+GDB is invoked with the shell command @code{gdb}. Once started, it reads
+commands from the terminal until you tell it to exit with the @value{GDBN}
+command @code{quit}. You can get online help from @value{GDBN} itself
+by using the command @code{help}.
+
+You can run @code{gdb} with no arguments or options; but the most
+usual way to start @value{GDBN} is with one argument or two, specifying an
+executable program as the argument:
+
+@smallexample
+gdb program
+@end smallexample
+
+You can also start with both an executable program and a core file specified:
+
+@smallexample
+gdb program core
+@end smallexample
+
+You can, instead, specify a process ID as a second argument, if you want
+to debug a running process:
+
+@smallexample
+gdb program 1234
+@end smallexample
+
+would attach @value{GDBN} to process @code{1234} (unless you also have a file
+named @file{1234}; @value{GDBN} does check for a core file first).
+
+Here are some of the most frequently needed @value{GDBN} commands:
+
+@c pod2man highlights the right hand side of the @item lines.
+@table @env
+@item break [@var{file}:]@var{functiop}
+Set a breakpoint at @var{function} (in @var{file}).
+
+@item run [@var{arglist}]
+Start your program (with @var{arglist}, if specified).
+
+@item bt
+Backtrace: display the program stack.
+
+@item print @var{expr}
+Display the value of an expression.
+
+@item c
+Continue running your program (after stopping, e.g. at a breakpoint).
+
+@item next
+Execute next program line (after stopping); step @emph{over} any
+function calls in the line.
+
+@item edit [@var{file}:]@var{function}
+look at the program line where it is presently stopped.
+
+@item list [@var{file}:]@var{function}
+type the text of the program in the vicinity of where it is presently stopped.
+
+@item step
+Execute next program line (after stopping); step @emph{into} any
+function calls in the line.
+
+@item help [@var{name}]
+Show information about @value{GDBN} command @var{name}, or general information
+about using @value{GDBN}.
+
+@item quit
+Exit from @value{GDBN}.
+@end table
+
+@ifset man
+For full details on @value{GDBN},
+see @cite{Using GDB: A Guide to the GNU Source-Level Debugger},
+by Richard M. Stallman and Roland H. Pesch. The same text is available online
+as the @code{gdb} entry in the @code{info} program.
+@end ifset
+@c man end
+
+@c man begin OPTIONS gdb
+Any arguments other than options specify an executable
+file and core file (or process ID); that is, the first argument
+encountered with no
+associated option flag is equivalent to a @option{-se} option, and the second,
+if any, is equivalent to a @option{-c} option if it's the name of a file.
+Many options have
+both long and short forms; both are shown here. The long forms are also
+recognized if you truncate them, so long as enough of the option is
+present to be unambiguous. (If you prefer, you can flag option
+arguments with @option{+} rather than @option{-}, though we illustrate the
+more usual convention.)
+
+All the options and command line arguments you give are processed
+in sequential order. The order makes a difference when the @option{-x}
+option is used.
+
+@table @env
+@item -help
+@itemx -h
+List all options, with brief explanations.
+
+@item -symbols=@var{file}
+@itemx -s @var{file}
+Read symbol table from file @var{file}.
+
+@item -write
+Enable writing into executable and core files.
+
+@item -exec=@var{file}
+@itemx -e @var{file}
+Use file @var{file} as the executable file to execute when
+appropriate, and for examining pure data in conjunction with a core
+dump.
+
+@item -se=@var{file}
+Read symbol table from file @var{file} and use it as the executable
+file.
+
+@item -core=@var{file}
+@itemx -c @var{file}
+Use file @var{file} as a core dump to examine.
+
+@item -command=@var{file}
+@itemx -x @var{file}
+Execute @value{GDBN} commands from file @var{file}.
+
+@item -ex @var{command}
+Execute given @value{GDBN} @var{command}.
+
+@item -directory=@var{directory}
+@itemx -d @var{directory}
+Add @var{directory} to the path to search for source files.
+
+@item -nh
+Do not execute commands from @file{~/.gdbinit}.
+
+@item -nx
+@itemx -n
+Do not execute commands from any @file{.gdbinit} initialization files.
+
+@item -quiet
+@itemx -q
+``Quiet''. Do not print the introductory and copyright messages. These
+messages are also suppressed in batch mode.
+
+@item -batch
+Run in batch mode. Exit with status @code{0} after processing all the command
+files specified with @option{-x} (and @file{.gdbinit}, if not inhibited).
+Exit with nonzero status if an error occurs in executing the @value{GDBN}
+commands in the command files.
+
+Batch mode may be useful for running @value{GDBN} as a filter, for example to
+download and run a program on another computer; in order to make this
+more useful, the message
+
+@smallexample
+Program exited normally.
+@end smallexample
+
+(which is ordinarily issued whenever a program running under @value{GDBN} control
+terminates) is not issued when running in batch mode.
+
+@item -cd=@var{directory}
+Run @value{GDBN} using @var{directory} as its working directory,
+instead of the current directory.
+
+@item -fullname
+@itemx -f
+Emacs sets this option when it runs @value{GDBN} as a subprocess. It tells
+@value{GDBN} to output the full file name and line number in a standard,
+recognizable fashion each time a stack frame is displayed (which
+includes each time the program stops). This recognizable format looks
+like two @samp{\032} characters, followed by the file name, line number
+and character position separated by colons, and a newline. The
+Emacs-to-@value{GDBN} interface program uses the two @samp{\032}
+characters as a signal to display the source code for the frame.
+
+@item -b @var{bps}
+Set the line speed (baud rate or bits per second) of any serial
+interface used by @value{GDBN} for remote debugging.
+
+@item -tty=@var{device}
+Run using @var{device} for your program's standard input and output.
+@end table
+@c man end
+
+@c man begin SEEALSO gdb
+@ifset man
+The full documentation for @value{GDBN} is maintained as a Texinfo manual.
+If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo
+documentation are properly installed at your site, the command
+
+@smallexample
+info gdb
+@end smallexample
+
+should give you access to the complete manual.
+
+@cite{Using GDB: A Guide to the GNU Source-Level Debugger},
+Richard M. Stallman and Roland H. Pesch, July 1991.
+@end ifset
+@c man end
+
+@node gdbserver man
+@heading gdbserver man
+
+@c man title gdbserver Remote Server for the GNU Debugger
+@format
+@c man begin SYNOPSIS gdbserver
+gdbserver @var{tty} @var{prog} [@var{args}@dots{}]
+
+gdbserver @var{tty} --attach @var{PID}
+@c man end
+@end format
+
+@c man begin DESCRIPTION gdbserver
+@command{gdbserver} is a program that allows you to run @value{GDBN} on a different machine
+than the one which is running the program being debugged.
+
+@ifclear man
+@subheading Usage (server (target) side)
+@end ifclear
+@ifset man
+Usage (server (target) side):
+@end ifset
+
+First, you need to have a copy of the program you want to debug put onto
+the target system. The program can be stripped to save space if needed, as
+@command{gdbserver} doesn't care about symbols. All symbol handling is taken care of by
+the @value{GDBN} running on the host system.
+
+To use the server, you log on to the target system, and run the @command{gdbserver}
+program. You must tell it (a) how to communicate with @value{GDBN}, (b) the name of
+your program, and (c) its arguments. The general syntax is:
+
+@smallexample
+target> gdbserver COMM PROGRAM [ARGS ...]
+@end smallexample
+
+For example, using a serial port, you might say:
+
+@smallexample
+target> gdbserver /dev/com1 emacs foo.txt
+@end smallexample
+
+This tells @command{gdbserver} to debug emacs with an argument of foo.txt, and to
+communicate with @value{GDBN} via /dev/com1. @command{gdbserver} now waits patiently for the
+host @value{GDBN} to communicate with it.
+
+To use a TCP connection, you could say:
+
+@smallexample
+target> gdbserver host:2345 emacs foo.txt
+@end smallexample
+
+This says pretty much the same thing as the last example, except that we are
+going to communicate with the host @value{GDBN} via TCP. The `host:2345' argument means
+that we are expecting to see a TCP connection from `host' to local TCP port
+2345. (Currently, the `host' part is ignored.) You can choose any number you
+want for the port number as long as it does not conflict with any existing TCP
+ports on the target system. This same port number must be used in the host
+@value{GDBN}s `target remote' command, which will be described shortly. Note that if
+you chose a port number that conflicts with another service, @command{gdbserver} will
+print an error message and exit.
+
+On some targets, @command{gdbserver} can also attach to running programs.
+This is accomplished via the --attach argument. The syntax is:
+
+@smallexample
+target> gdbserver COMM --attach PID
+@end smallexample
+
+PID is the process ID of a currently running process. It isn't
+necessary to point @command{gdbserver} at a binary for the running process.
+
+@ifclear man
+@subheading Usage (host side)
+@end ifclear
+@ifset man
+Usage (host side):
+@end ifset
+
+You need an unstripped copy of the target program on your host system, since
+@value{GDBN} needs to examine it's symbol tables and such. Start up @value{GDBN} as you normally
+would, with the target program as the first argument. (You may need to use the
+--baud option if the serial line is running at anything except 9600 baud.)
+Ie: `gdb TARGET-PROG', or `gdb --baud BAUD TARGET-PROG'. After that, the only
+new command you need to know about is `target remote'. It's argument is either
+a device name (usually a serial device, like `/dev/ttyb'), or a HOST:PORT
+descriptor. For example:
+
+@smallexample
+(gdb) target remote /dev/ttyb
+@end smallexample
+
+communicates with the server via serial line /dev/ttyb, and:
+
+@smallexample
+(gdb) target remote the-target:2345
+@end smallexample
+
+communicates via a TCP connection to port 2345 on host `the-target', where
+you previously started up @command{gdbserver} with the same port number. Note that for
+TCP connections, you must start up @command{gdbserver} prior to using the `target remote'
+command, otherwise you may get an error that looks something like
+`Connection refused'.
+@c man end
+
+@c man begin OPTIONS gdbserver
+You have to supply the name of the program to debug
+and the tty to communicate on; the remote @value{GDBN} will do everything else.
+Any remaining arguments will be passed to the program verbatim.
+@c man end
+
+@c man begin SEEALSO gdbserver
+@ifset man
+The full documentation for @value{GDBN} is maintained as a Texinfo manual.
+If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo
+documentation are properly installed at your site, the command
+
+@smallexample
+info gdb
+@end smallexample
+
+should give you access to the complete manual.
+
+@cite{Using GDB: A Guide to the GNU Source-Level Debugger},
+Richard M. Stallman and Roland H. Pesch, July 1991.
+@end ifset
+@c man end
+
+@node gdbinit man
@heading gdbinit
@c man title gdbinit GDB initialization scripts
+@format
@c man begin SYNOPSIS gdbinit
-@table @env
@ifset SYSTEM_GDBINIT
-@itemx @value{SYSTEM_GDBINIT}
+@value{SYSTEM_GDBINIT}
@end ifset
-@itemx ~/.gdbinit
-@itemx ./.gdbinit
-@end table
+
+~/.gdbinit
+
+./.gdbinit
@c man end
+@end format
@c man begin DESCRIPTION gdbinit
These files contain @value{GDBN} commands to automatically execute during
@value{GDBN} startup. The lines of contents are canned sequences of commands,
-described in the @value{GDBN} manual in node @code{Sequences}, accessible by
-shell command @code{info -f gdb -n Sequences}.
+described in
+@ifset man
+the @value{GDBN} manual in node @code{Sequences}
+-- shell command @code{info -f gdb -n Sequences}.
+@end ifset
+@ifclear man
+@ref{Sequences}.
+@end ifclear
-Please read more in the @value{GDBN} manual in node @code{Startup},
-accessible by shell command @code{info -f gdb -n Startup}.
+Please read more in
+@ifset man
+the @value{GDBN} manual in node @code{Startup}
+-- shell command @code{info -f gdb -n Startup}.
+@end ifset
+@ifclear man
+@ref{Startup}.
+@end ifclear
@table @env
@ifset SYSTEM_GDBINIT
@item @value{SYSTEM_GDBINIT}
@end ifset
@ifclear SYSTEM_GDBINIT
-@item (not enabled during @value{GDBN} compilation with @code{--with-system-gdbinit})
+@item (not enabled with @code{--with-system-gdbinit} during compilation)
@end ifclear
System-wide initialization file. It is executed unless user specified
@value{GDBN} option @code{-nx} or @code{-n}.
-See more in the @value{GDBN} manual in node @code{System-wide configuration},
-accessible by shell command @code{info -f gdb -n 'System-wide configuration'}.
+See more in
+@ifset man
+the @value{GDBN} manual in node @code{System-wide configuration}
+-- shell command @code{info -f gdb -n 'System-wide configuration'}.
+@end ifset
+@ifclear man
+@ref{System-wide configuration}.
+@end ifclear
@item ~/.gdbinit
User initialization file. It is executed unless user specified
@@ -41655,17 +42046,37 @@ User initialization file. It is executed unless user specified
@item ./.gdbinit
Initialization file for current directory. It may need to be enabled with
@value{GDBN} security command @code{set auto-load local-gdbinit}.
-See more in the @value{GDBN} manual in node @code{Init File in the Current
-Directory} - shell command
-@code{info -f gdb -n 'Init File in the Current Directory'}.
+See more in
+@ifset man
+the @value{GDBN} manual in node @code{Init File in the Current Directory}
+-- shell command @code{info -f gdb -n 'Init File in the Current Directory'}.
+@end ifset
+@ifclear man
+@ref{Init File in the Current Directory}.
+@end ifclear
@end table
@c man end
-@ignore
@c man begin SEEALSO gdbinit
+@ifset man
gdb(1), @code{info -f gdb -n Startup}
+
+The full documentation for @value{GDBN} is maintained as a Texinfo manual.
+If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo
+documentation are properly installed at your site, the command
+
+@smallexample
+info gdb
+@end smallexample
+
+should give you access to the complete manual.
+
+@cite{Using GDB: A Guide to the GNU Source-Level Debugger},
+Richard M. Stallman and Roland H. Pesch, July 1991.
+@end ifset
@c man end
-@end ignore
+
+@include gpl.texi
@node GNU Free Documentation License
@appendix GNU Free Documentation License
diff --git a/gdb/gdb.1 b/gdb/gdb.1
deleted file mode 100644
index ec6c02a..0000000
--- a/gdb/gdb.1
+++ /dev/null
@@ -1,403 +0,0 @@
-.\" Copyright (C) 1991-2013 Free Software Foundation, Inc.
-.\" See section COPYING for conditions for redistribution
-.\" $Id$
-.TH gdb 1 "22may2002" "GNU Tools" "GNU Tools"
-.SH NAME
-gdb \- The GNU Debugger
-.SH SYNOPSIS
-.na
-.TP
-.B gdb
-.RB "[\|" \-help "\|]"
-.RB "[\|" \-nh "\|]"
-.RB "[\|" \-nx "\|]"
-.RB "[\|" \-q "\|]"
-.RB "[\|" \-batch "\|]"
-.RB "[\|" \-cd=\c
-.I dir\c
-\|]
-.RB "[\|" \-f "\|]"
-.RB "[\|" "\-b\ "\c
-.IR bps "\|]"
-.RB "[\|" "\-tty="\c
-.IR dev "\|]"
-.RB "[\|" "\-s "\c
-.I symfile\c
-\&\|]
-.RB "[\|" "\-e "\c
-.I prog\c
-\&\|]
-.RB "[\|" "\-se "\c
-.I prog\c
-\&\|]
-.RB "[\|" "\-c "\c
-.I core\c
-\&\|]
-.RB "[\|" "\-x "\c
-.I file\c
-\&\|]
-.RB "[\|" "\-ex "\c
-.I cmd\c
-\&\|]
-.RB "[\|" "\-d "\c
-.I dir\c
-\&\|]
-.RB "[\|" \c
-.I prog\c
-.RB "[\|" \c
-.IR core \||\| procID\c
-\&\|]\&\|]
-.ad b
-.SH DESCRIPTION
-The purpose of a debugger such as GDB is to allow you to see what is
-going on ``inside'' another program while it executes\(em\&or what another
-program was doing at the moment it crashed.
-
-GDB can do four main kinds of things (plus other things in support of
-these) to help you catch bugs in the act:
-
-.TP
-\ \ \ \(bu
-Start your program, specifying anything that might affect its behavior.
-
-.TP
-\ \ \ \(bu
-Make your program stop on specified conditions.
-
-.TP
-\ \ \ \(bu
-Examine what has happened, when your program has stopped.
-
-.TP
-\ \ \ \(bu
-Change things in your program, so you can experiment with correcting the
-effects of one bug and go on to learn about another.
-.PP
-
-You can use GDB to debug programs written in C, C++, and Modula-2.
-Fortran support will be added when a GNU Fortran compiler is ready.
-
-GDB is invoked with the shell command \c
-.B gdb\c
-\&. Once started, it reads
-commands from the terminal until you tell it to exit with the GDB
-command \c
-.B quit\c
-\&. You can get online help from \c
-.B gdb\c
-\& itself
-by using the command \c
-.B help\c
-\&.
-
-You can run \c
-.B gdb\c
-\& with no arguments or options; but the most
-usual way to start GDB is with one argument or two, specifying an
-executable program as the argument:
-.sp
-.br
-gdb\ program
-.br
-.sp
-
-You can also start with both an executable program and a core file specified:
-.sp
-.br
-gdb\ program\ core
-.br
-.sp
-
-You can, instead, specify a process ID as a second argument, if you want
-to debug a running process:
-.sp
-.br
-gdb\ program\ 1234
-.br
-.sp
-
-would attach GDB to process \c
-.B 1234\c
-\& (unless you also have a file
-named `\|\c
-.B 1234\c
-\&\|'; GDB does check for a core file first).
-
-Here are some of the most frequently needed GDB commands:
-.TP
-.B break \fR[\|\fIfile\fB:\fR\|]\fIfunction
-\&
-Set a breakpoint at \c
-.I function\c
-\& (in \c
-.I file\c
-\&).
-.TP
-.B run \fR[\|\fIarglist\fR\|]
-Start your program (with \c
-.I arglist\c
-\&, if specified).
-.TP
-.B bt
-Backtrace: display the program stack.
-.TP
-.BI print " expr"\c
-\&
-Display the value of an expression.
-.TP
-.B c
-Continue running your program (after stopping, e.g. at a breakpoint).
-.TP
-.B next
-Execute next program line (after stopping); step \c
-.I over\c
-\& any
-function calls in the line.
-.TP
-.B edit \fR[\|\fIfile\fB:\fR\|]\fIfunction
-look at the program line where it is presently stopped.
-.TP
-.B list \fR[\|\fIfile\fB:\fR\|]\fIfunction
-type the text of the program in the vicinity of where it is presently stopped.
-.TP
-.B step
-Execute next program line (after stopping); step \c
-.I into\c
-\& any
-function calls in the line.
-.TP
-.B help \fR[\|\fIname\fR\|]
-Show information about GDB command \c
-.I name\c
-\&, or general information
-about using GDB.
-.TP
-.B quit
-Exit from GDB.
-.PP
-For full details on GDB, see \c
-.I
-Using GDB: A Guide to the GNU Source-Level Debugger\c
-\&, by Richard M. Stallman and Roland H. Pesch. The same text is available online
-as the \c
-.B gdb\c
-\& entry in the \c
-.B info\c
-\& program.
-.SH OPTIONS
-Any arguments other than options specify an executable
-file and core file (or process ID); that is, the first argument
-encountered with no
-associated option flag is equivalent to a `\|\c
-.B \-se\c
-\&\|' option, and the
-second, if any, is equivalent to a `\|\c
-.B \-c\c
-\&\|' option if it's the name of a file. Many options have
-both long and short forms; both are shown here. The long forms are also
-recognized if you truncate them, so long as enough of the option is
-present to be unambiguous. (If you prefer, you can flag option
-arguments with `\|\c
-.B +\c
-\&\|' rather than `\|\c
-.B \-\c
-\&\|', though we illustrate the
-more usual convention.)
-
-All the options and command line arguments you give are processed
-in sequential order. The order makes a difference when the
-`\|\c
-.B \-x\c
-\&\|' option is used.
-
-.TP
-.B \-help
-.TP
-.B \-h
-List all options, with brief explanations.
-
-.TP
-.BI "\-symbols=" "file"\c
-.TP
-.BI "\-s " "file"\c
-\&
-Read symbol table from file \c
-.I file\c
-\&.
-
-.TP
-.B \-write
-Enable writing into executable and core files.
-
-.TP
-.BI "\-exec=" "file"\c
-.TP
-.BI "\-e " "file"\c
-\&
-Use file \c
-.I file\c
-\& as the executable file to execute when
-appropriate, and for examining pure data in conjunction with a core
-dump.
-
-.TP
-.BI "\-se=" "file"\c
-\&
-Read symbol table from file \c
-.I file\c
-\& and use it as the executable
-file.
-
-.TP
-.BI "\-core=" "file"\c
-.TP
-.BI "\-c " "file"\c
-\&
-Use file \c
-.I file\c
-\& as a core dump to examine.
-
-.TP
-.BI "\-command=" "file"\c
-.TP
-.BI "\-x " "file"\c
-\&
-Execute GDB commands from file \c
-.I file\c
-\&.
-
-.TP
-.BI "\-ex " "command"\c
-\&
-Execute given GDB \c
-.I command\c
-\&.
-
-.TP
-.BI "\-directory=" "directory"\c
-.TP
-.BI "\-d " "directory"\c
-\&
-Add \c
-.I directory\c
-\& to the path to search for source files.
-.PP
-
-.TP
-.B \-nh
-Do not execute commands from ~/.gdbinit.
-
-.TP
-.B \-nx
-.TP
-.B \-n
-Do not execute commands from any `\|\c
-.B .gdbinit\c
-\&\|' initialization files.
-
-
-.TP
-.B \-quiet
-.TP
-.B \-q
-``Quiet''. Do not print the introductory and copyright messages. These
-messages are also suppressed in batch mode.
-
-.TP
-.B \-batch
-Run in batch mode. Exit with status \c
-.B 0\c
-\& after processing all the command
-files specified with `\|\c
-.B \-x\c
-\&\|' (and `\|\c
-.B .gdbinit\c
-\&\|', if not inhibited).
-Exit with nonzero status if an error occurs in executing the GDB
-commands in the command files.
-
-Batch mode may be useful for running GDB as a filter, for example to
-download and run a program on another computer; in order to make this
-more useful, the message
-.sp
-.br
-Program\ exited\ normally.
-.br
-.sp
-
-(which is ordinarily issued whenever a program running under GDB control
-terminates) is not issued when running in batch mode.
-
-.TP
-.BI "\-cd=" "directory"\c
-\&
-Run GDB using \c
-.I directory\c
-\& as its working directory,
-instead of the current directory.
-
-.TP
-.B \-fullname
-.TP
-.B \-f
-Emacs sets this option when it runs GDB as a subprocess. It tells GDB
-to output the full file name and line number in a standard,
-recognizable fashion each time a stack frame is displayed (which
-includes each time the program stops). This recognizable format looks
-like two `\|\c
-.B \032\c
-\&\|' characters, followed by the file name, line number
-and character position separated by colons, and a newline. The
-Emacs-to-GDB interface program uses the two `\|\c
-.B \032\c
-\&\|' characters as
-a signal to display the source code for the frame.
-
-.TP
-.BI "\-b " "bps"\c
-\&
-Set the line speed (baud rate or bits per second) of any serial
-interface used by GDB for remote debugging.
-
-.TP
-.BI "\-tty=" "device"\c
-\&
-Run using \c
-.I device\c
-\& for your program's standard input and output.
-.PP
-
-.SH "SEE ALSO"
-The full documentation for
-.B gdb
-is maintained as a Texinfo manual. If the
-.B info
-and
-.B gdb
-programs and GDB's Texinfo documentation are properly installed at
-your site, the command
-.IP
-.B info gdb
-.PP
-should give you access to the complete manual.
-
-.I
-Using GDB: A Guide to the GNU Source-Level Debugger\c
-, Richard M. Stallman and Roland H. Pesch, July 1991.
-.SH COPYING
-Copyright (c) 1991, 2010 Free Software Foundation, Inc.
-.PP
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-.PP
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-.PP
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 08db2cc..ef839d3 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -252,8 +252,6 @@ install-only:
fi; \
$(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir); \
$(INSTALL_PROGRAM) gdbserver$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT); \
- $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(man1dir); \
- $(INSTALL_DATA) $(srcdir)/gdbserver.1 $(DESTDIR)$(man1dir)/$$n.1
@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
uninstall: force
diff --git a/gdb/gdbserver/gdbserver.1 b/gdb/gdbserver/gdbserver.1
deleted file mode 100644
index 59ed0bb..0000000
--- a/gdb/gdbserver/gdbserver.1
+++ /dev/null
@@ -1,116 +0,0 @@
-.\" Copyright (C) 1993-2013 Free Software Foundation, Inc.
-.\" See section COPYING for conditions for redistribution
-.TH gdbserver 1 "2 November 1993" "Cygnus Support" "GNU Development Tools"
-.SH NAME
-gdbserver \- Remote Server for the GNU Debugger
-.SH SYNOPSIS
-.na
-.TP
-.B gdbserver
-.RB tty
-.RB prog
-.RB "[\|" args... "\|]"
-.PP
-.B gdbserver
-.RB tty
-.B --attach
-.RB PID
-.ad b
-.SH DESCRIPTION
-GDBSERVER is a program that allows you to run GDB on a different machine
-than the one which is running the program being debugged.
-
-Usage (server (target) side):
-
-First, you need to have a copy of the program you want to debug put onto
-the target system. The program can be stripped to save space if needed, as
-GDBserver doesn't care about symbols. All symbol handling is taken care of by
-the GDB running on the host system.
-
-To use the server, you log on to the target system, and run the `gdbserver'
-program. You must tell it (a) how to communicate with GDB, (b) the name of
-your program, and (c) its arguments. The general syntax is:
-
- target> gdbserver COMM PROGRAM [ARGS ...]
-
-For example, using a serial port, you might say:
-
- target> gdbserver /dev/com1 emacs foo.txt
-
-This tells gdbserver to debug emacs with an argument of foo.txt, and to
-communicate with GDB via /dev/com1. Gdbserver now waits patiently for the
-host GDB to communicate with it.
-
-To use a TCP connection, you could say:
-
- target> gdbserver host:2345 emacs foo.txt
-
-This says pretty much the same thing as the last example, except that we are
-going to communicate with the host GDB via TCP. The `host:2345' argument means
-that we are expecting to see a TCP connection from `host' to local TCP port
-2345. (Currently, the `host' part is ignored.) You can choose any number you
-want for the port number as long as it does not conflict with any existing TCP
-ports on the target system. This same port number must be used in the host
-GDBs `target remote' command, which will be described shortly. Note that if
-you chose a port number that conflicts with another service, gdbserver will
-print an error message and exit.
-
-On some targets, gdbserver can also attach to running programs.
-This is accomplished via the --attach argument. The syntax is:
-
- target> gdbserver COMM --attach PID
-
-PID is the process ID of a currently running process. It isn't
-necessary to point gdbserver at a binary for the running process.
-
-Usage (host side):
-
-You need an unstripped copy of the target program on your host system, since
-GDB needs to examine it's symbol tables and such. Start up GDB as you normally
-would, with the target program as the first argument. (You may need to use the
---baud option if the serial line is running at anything except 9600 baud.)
-Ie: `gdb TARGET-PROG', or `gdb --baud BAUD TARGET-PROG'. After that, the only
-new command you need to know about is `target remote'. It's argument is either
-a device name (usually a serial device, like `/dev/ttyb'), or a HOST:PORT
-descriptor. For example:
-
- (gdb) target remote /dev/ttyb
-
-communicates with the server via serial line /dev/ttyb, and:
-
- (gdb) target remote the-target:2345
-
-communicates via a TCP connection to port 2345 on host `the-target', where
-you previously started up gdbserver with the same port number. Note that for
-TCP connections, you must start up gdbserver prior to using the `target remote'
-command, otherwise you may get an error that looks something like
-`Connection refused'.
-.SH OPTIONS
-You have to supply the name of the program to debug
-and the tty to communicate on; the remote GDB will do everything else.
-Any remaining arguments will be passed to the program verbatim.
-.SH "SEE ALSO"
-.RB "`\|" gdb "\|'"
-entry in
-.B info\c
-\&;
-.I
-Using GDB: A Guide to the GNU Source-Level Debugger\c
-, Richard M. Stallman and Roland H. Pesch, July 1991.
-.SH COPYING
-Copyright (c) 1993 Free Software Foundation, Inc.
-.PP
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-.PP
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-.PP
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1
2013-04-05 17:50 ` Jan Kratochvil
@ 2013-04-05 16:33 ` Jan Kratochvil
2013-04-05 18:13 ` [doc patch] gdb.1: Add -p PID Jan Kratochvil
2013-04-05 18:29 ` [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1 Eli Zaretskii
2 siblings, 0 replies; 24+ messages in thread
From: Jan Kratochvil @ 2013-04-05 16:33 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: tromey, gdb-patches
On Fri, 05 Apr 2013 17:01:01 +0200, Jan Kratochvil wrote:
> Sending FYI, I will check it in without further comments.
And here is an incremental form.
Jan
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index eebfc85..2f9c68a 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -41650,10 +41650,10 @@ Change things in your program, so you can experiment with correcting the
effects of one bug and go on to learn about another.
@end itemize
-You can use @value{GDBN} to debug programs written in C, C++, and Modula-2.
+You can use @value{GDBN} to debug programs written in C, C@t{++}, and Modula-2.
Fortran support will be added when a GNU Fortran compiler is ready.
-GDB is invoked with the shell command @code{gdb}. Once started, it reads
+@value{GDBN} is invoked with the shell command @code{gdb}. Once started, it reads
commands from the terminal until you tell it to exit with the @value{GDBN}
command @code{quit}. You can get online help from @value{GDBN} itself
by using the command @code{help}.
@@ -41679,6 +41679,7 @@ to debug a running process:
gdb program 1234
@end smallexample
+@noindent
would attach @value{GDBN} to process @code{1234} (unless you also have a file
named @file{1234}; @value{GDBN} does check for a core file first).
@@ -41811,6 +41812,7 @@ more useful, the message
Program exited normally.
@end smallexample
+@noindent
(which is ordinarily issued whenever a program running under @value{GDBN} control
terminates) is not issued when running in batch mode.
@@ -41848,6 +41850,7 @@ documentation are properly installed at your site, the command
info gdb
@end smallexample
+@noindent
should give you access to the complete manual.
@cite{Using GDB: A Guide to the GNU Source-Level Debugger},
@@ -41888,18 +41891,24 @@ program. You must tell it (a) how to communicate with @value{GDBN}, (b) the nam
your program, and (c) its arguments. The general syntax is:
@smallexample
-target> gdbserver COMM PROGRAM [ARGS ...]
+target> gdbserver @var{comm} @var{program} [@var{args} ...]
@end smallexample
For example, using a serial port, you might say:
@smallexample
+@ifset man
+@c @file would wrap it as F</dev/com1>.
target> gdbserver /dev/com1 emacs foo.txt
+@end ifset
+@ifclear man
+target> gdbserver @file{/dev/com1} emacs foo.txt
+@end ifclear
@end smallexample
-This tells @command{gdbserver} to debug emacs with an argument of foo.txt, and to
-communicate with @value{GDBN} via /dev/com1. @command{gdbserver} now waits patiently for the
-host @value{GDBN} to communicate with it.
+This tells @command{gdbserver} to debug emacs with an argument of foo.txt, and
+to communicate with @value{GDBN} via @file{/dev/com1}. @command{gdbserver} now
+waits patiently for the host @value{GDBN} to communicate with it.
To use a TCP connection, you could say:
@@ -41908,23 +41917,23 @@ target> gdbserver host:2345 emacs foo.txt
@end smallexample
This says pretty much the same thing as the last example, except that we are
-going to communicate with the host @value{GDBN} via TCP. The `host:2345' argument means
-that we are expecting to see a TCP connection from `host' to local TCP port
-2345. (Currently, the `host' part is ignored.) You can choose any number you
+going to communicate with the @code{host} @value{GDBN} via TCP. The @code{host:2345} argument means
+that we are expecting to see a TCP connection from @code{host} to local TCP port
+2345. (Currently, the @code{host} part is ignored.) You can choose any number you
want for the port number as long as it does not conflict with any existing TCP
ports on the target system. This same port number must be used in the host
-@value{GDBN}s `target remote' command, which will be described shortly. Note that if
+@value{GDBN}s @code{target remote} command, which will be described shortly. Note that if
you chose a port number that conflicts with another service, @command{gdbserver} will
print an error message and exit.
On some targets, @command{gdbserver} can also attach to running programs.
-This is accomplished via the --attach argument. The syntax is:
+This is accomplished via the @option{--attach} argument. The syntax is:
@smallexample
-target> gdbserver COMM --attach PID
+target> gdbserver @var{comm} --attach @var{pid}
@end smallexample
-PID is the process ID of a currently running process. It isn't
+@var{pid} is the process ID of a currently running process. It isn't
necessary to point @command{gdbserver} at a binary for the running process.
@ifclear man
@@ -41937,22 +41946,30 @@ Usage (host side):
You need an unstripped copy of the target program on your host system, since
@value{GDBN} needs to examine it's symbol tables and such. Start up @value{GDBN} as you normally
would, with the target program as the first argument. (You may need to use the
---baud option if the serial line is running at anything except 9600 baud.)
-Ie: `gdb TARGET-PROG', or `gdb --baud BAUD TARGET-PROG'. After that, the only
-new command you need to know about is `target remote'. It's argument is either
-a device name (usually a serial device, like `/dev/ttyb'), or a HOST:PORT
+@option{--baud} option if the serial line is running at anything except 9600 baud.)
+That is @code{gdb TARGET-PROG}, or @code{gdb --baud BAUD TARGET-PROG}. After that, the only
+new command you need to know about is @code{target remote}. It's argument is either
+a device name (usually a serial device, like @file{/dev/ttyb}), or a @code{HOST:PORT}
descriptor. For example:
@smallexample
+@ifset man
+@c @file would wrap it as F</dev/ttyb>.
(gdb) target remote /dev/ttyb
+@end ifset
+@ifclear man
+(gdb) target remote @file{/dev/ttyb}
+@end ifclear
@end smallexample
-communicates with the server via serial line /dev/ttyb, and:
+@noindent
+communicates with the server via serial line @file{/dev/ttyb}, and:
@smallexample
(gdb) target remote the-target:2345
@end smallexample
+@noindent
communicates via a TCP connection to port 2345 on host `the-target', where
you previously started up @command{gdbserver} with the same port number. Note that for
TCP connections, you must start up @command{gdbserver} prior to using the `target remote'
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1
2013-04-05 13:03 ` Eli Zaretskii
@ 2013-04-05 17:50 ` Jan Kratochvil
2013-04-05 16:33 ` Jan Kratochvil
` (2 more replies)
0 siblings, 3 replies; 24+ messages in thread
From: Jan Kratochvil @ 2013-04-05 17:50 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: tromey, gdb-patches
On Thu, 04 Apr 2013 20:11:29 +0200, Eli Zaretskii wrote:
> > +@c man begin SYNOPSIS gdb
> > +gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}]
> > +[@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}]
> > +[@option{-b}@w{ }@var{bps}]
> > + [@option{-tty=}@var{dev}] [@option{-s} @var{symfile}]
> > +[@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}]
> > +[@option{-c}@w{ }@var{core}] [@option{-x}@w{ }@var{cmds}]
> > + [@option{-d}@w{ }@var{dir}] [@var{prog}|@var{core}|@var{procID}]
> > +@c man end
>
> Why are the options formatted in such a strange way -- some lines
> indented, others not? The original man page has them all aligned
> nicely after formatting:
>
> SYNOPSIS
> gdb [-help] [-nx] [-q] [-batch] [-cd=dir] [-f] [-b bps] [-tty=dev]
> [-s symfile] [-e prog] [-se prog] [-c core] [-x file] [-ex cmd]
> [-d dir] [prog[core|procID]]
cd gdb/doc;make gdb.1;nroff -man gdb.1|less -r
SYNOPSIS
gdb [-help] [-nh] [-nx] [-q] [-batch] [-cd=dir] [-f] [-b bps]
[-tty=dev] [-s symfile] [-e prog] [-se prog] [-c core] [-x cmds]
[-d dir] [prog|core|procID]
The formatting is kept for the man page but it looks weird in the .texinfo
source. It is because I tried to keep the .texinfo source <= 80 columns,
I believe you do not prefer an equivalent .texinfo form (174 columns):
@c man begin SYNOPSIS gdb
gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}] [@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}] [@option{-b}@w{ }@var{bps}]
[@option{-tty=}@var{dev}] [@option{-s} @var{symfile}] [@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}] [@option{-c}@w{ }@var{core}] [@option{-x}@w{ }@var{cmds}]
[@option{-d}@w{ }@var{dir}] [@var{prog}|@var{core}|@var{procID}]
@c man end
> > +Fortran support will be added when a GNU Fortran compiler is ready.
>
> This list of languages is outdated, right?
+
> > +@smallexample
> > +gdb program 1234
> > +@end smallexample
>
> Should we mention "gdb -p PID" as well?
Yes but that is unrelated to this patch which does only the technical
conversion. OK, going to post a second patch for these.
> > +@smallexample
> > +target> gdbserver /dev/com1 emacs foo.txt
> > +@end smallexample
>
> /dev/com1 should be in @file or @code.
It wraps it for man as F</dev/com1> or C</dev/com1>. So I made there two
forms for man/non-man. But FYI gdb.texinfo elsewhere for example already
contains:
@smallexample
tty /dev/ttyb
@end smallexample
> > +This tells @command{gdbserver} to debug emacs with an argument of foo.txt, and to
> > +communicate with @value{GDBN} via /dev/com1. @command{gdbserver} now waits patiently for the
>
> Likewise here.
I used @file here unconditionally as it should not be confusing here.
> > +This says pretty much the same thing as the last example, except that we are
> > +going to communicate with the host @value{GDBN} via TCP. The `host:2345' argument means
> > +that we are expecting to see a TCP connection from `host' to local TCP port
> > +2345. (Currently, the `host' part is ignored.) You can choose any number you
> > +want for the port number as long as it does not conflict with any existing TCP
> > +ports on the target system. This same port number must be used in the host
> > +@value{GDBN}s `target remote' command, which will be described shortly. Note that if
> > +you chose a port number that conflicts with another service, @command{gdbserver} will
> > +print an error message and exit.
>
> `host', `target' etc. should be @code instead (and no quotes).
Done, it was not trivial, if you want to re-review it.
> > +Ie: `gdb TARGET-PROG', or `gdb --baud BAUD TARGET-PROG'. After that, the only
> ^^
> > +new command you need to know about is `target remote'. It's argument is either
> > +a device name (usually a serial device, like `/dev/ttyb'), or a HOST:PORT
> > +descriptor. For example:
>
> "That is" ("Ie" doesn't look right at the beginning of a sentence).
> Also, @code instead of quotes around commands and /dev/ttyb.
I have used @file for /dev/ttyb, you suggested @file for /dev/com1 above.
Sending FYI, I will check it in without further comments.
Thanks,
Jan
gdb/
2013-04-04 Jan Kratochvil <jan.kratochvil@redhat.com>
Convert man pages to texinfo, new gdbinit.5 texinfo page.
* Makefile.in (gdb.z): Remove.
(install-only): Remove $(man1dir) and gdb.1 installation.
* gdb.1: Remove.
gdb/gdbserver/
2013-04-04 Jan Kratochvil <jan.kratochvil@redhat.com>
* Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
installation.
* gdbserver.1: Remove.
gdb/doc/
2013-04-04 Jan Kratochvil <jan.kratochvil@redhat.com>
Convert man pages to texinfo, new gdbinit.5 texinfo page.
* Makefile.in (mandir, man1dir, man5dir, SYSTEM_GDBINIT, MANCONF,
(TEXI2POD, POD2MAN1, POD2MAN5, MAN1S, MAN5S, MANS, man): New.
(diststuff): Add man.
(install-man, install-man1, install-man5, uninstall-man, uninstall-man1)
(uninstall-man5): New.
(STAGESTUFF): Add *.1 and *.5.
(GDBvn.texi): Add SYSTEM_GDBINIT.
(gdb.1, gdbserver.1, gdbinit.5): New.
(maintainer-clean realclean): Add $(MANS).
(install): Add install-man.
(uninstall): Add uninstall-man.
* gdb.texinfo (@include gdb-cfg.texi): Wrap it by @c man begin INCLUDE.
(@copying): Wrap it by @c man begin COPYRIGHT.
(Top): Add Man Pages.
(Man Pages, gdb man, gdbserver man, gdbinit man): New.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 47b4338..9a0a624 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1019,11 +1019,6 @@ check//%: force
info install-info clean-info dvi pdf install-pdf html install-html: force
@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
-gdb.z:gdb.1
- nroff -man $(srcdir)/gdb.1 | col -b > gdb.t
- pack gdb.t ; rm -f gdb.t
- mv gdb.t.z gdb.z
-
# Traditionally "install" depends on "all". But it may be useful
# not to; for example, if the user has made some trivial change to a
# source file and doesn't care about rebuilding or just wants to save the
@@ -1043,10 +1038,6 @@ install-only: $(CONFIG_INSTALL)
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
$(INSTALL_PROGRAM) gdb$(EXEEXT) \
$(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
- $(SHELL) $(srcdir)/../mkinstalldirs \
- $(DESTDIR)$(man1dir) ; \
- $(INSTALL_DATA) $(srcdir)/gdb.1 \
- $(DESTDIR)$(man1dir)/$$transformed_name.1 ; \
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \
$(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h
@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index 7da67c6..b016740 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -26,6 +26,9 @@ datarootdir = @datarootdir@
docdir = @docdir@
pdfdir = @pdfdir@
htmldir = @htmldir@
+mandir = @mandir@
+man1dir = $(mandir)/man1
+man5dir = $(mandir)/man5
SHELL = @SHELL@
@@ -35,6 +38,8 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
+SYSTEM_GDBINIT = @SYSTEM_GDBINIT@
+
mkinstalldirs = $(SHELL) $(srcdir)/../../mkinstalldirs
# main GDB source directory
@@ -160,6 +165,22 @@ ANNOTATE_DOC_FILES = \
$(ANNOTATE_DOC_SOURCE_INCLUDES) \
$(ANNOTATE_DOC_BUILD_INCLUDES)
+# Options to extract the man page from gdb.texinfo
+MANCONF = -Dman
+
+TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl \
+ $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS)
+
+POD2MAN1 = pod2man --center="GNU Development Tools" \
+ --release="gdb-$(VERSION)" --section=1
+POD2MAN5 = pod2man --center="GNU Development Tools" \
+ --release="gdb-$(VERSION)" --section=5
+
+# List of man pages generated from gdb.texi
+MAN1S = gdb.1 gdbserver.1
+MAN5S = gdbinit.5
+MANS = $(MAN1S) $(MAN5S)
+
#### Host, target, and site specific Makefile fragments come in here.
###
@@ -170,8 +191,9 @@ dvi: gdb.dvi gdbint.dvi stabs.dvi refcard.dvi annotate.dvi
ps: gdb.ps gdbint.ps stabs.ps refcard.ps annotate.ps
html: $(HTMLFILES)
pdf: $(PDFFILES)
+man: $(MANS)
all-doc: info dvi ps # pdf
-diststuff: info
+diststuff: info man
rm -f gdb-cfg.texi GDBvn.texi
install-info: $(INFO_DEPS)
@@ -242,7 +264,49 @@ install-pdf: $(PDFFILES)
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
done
-STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi *.pdf
+install-man: install-man1 install-man5
+
+install-man1: $(MAN1S)
+ test -z "$(man1dir)" || $(mkinstalldirs) "$(DESTDIR)$(man1dir)"
+ @list='$(MANS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=`echo $$p | sed -e 's|^.*/||'`; \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man1dir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(man1dir)/$$f"; \
+ done
+
+install-man5: $(MAN5S)
+ test -z "$(man5dir)" || $(mkinstalldirs) "$(DESTDIR)$(man5dir)"
+ @list='$(MANS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=`echo $$p | sed -e 's|^.*/||'`; \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man5dir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(man5dir)/$$f"; \
+ done
+
+uninstall-man: uninstall-man1 uninstall-man5
+
+uninstall-man1:
+ @test -n "$(man1dir)" || exit 0; \
+ files=`{ l2='$(MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+
+uninstall-man5:
+ @test -n "$(man5dir)" || exit 0; \
+ files=`{ l2='$(MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.5[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man5dir)" && rm -f $$files; }
+
+STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi *.pdf *.1 *.5
# Copy the object files from a particular stage into a subdirectory.
stage1: force
@@ -313,6 +377,9 @@ GDBvn.texi : ${gdbdir}/version.in
if test -z "$(READLINE_TEXI_INCFLAG)"; then \
echo "@set SYSTEM_READLINE" >> ./GDBvn.new; \
fi
+ if [ -n "$(SYSTEM_GDBINIT)" ]; then \
+ echo "@set SYSTEM_GDBINIT $(SYSTEM_GDBINIT)" >> ./GDBvn.new; \
+ fi
mv GDBvn.new GDBvn.texi
# Updated atomically
@@ -523,6 +590,28 @@ annotate.info: $(ANNOTATE_DOC_FILES)
annotate/index.html: $(ANNOTATE_DOC_FILES)
$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/annotate.texinfo
+# Man pages
+gdb.1: $(GDB_DOC_FILES)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dgdb < gdb.texinfo > gdb.pod
+ -($(POD2MAN1) gdb.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f gdb.pod
+
+gdbserver.1: $(GDB_DOC_FILES)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dgdbserver < gdb.texinfo > gdbserver.pod
+ -($(POD2MAN1) gdbserver.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f gdbserver.pod
+
+gdbinit.5: $(GDB_DOC_FILES)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dgdbinit < gdb.texinfo > gdbinit.pod
+ -($(POD2MAN5) gdbinit.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f gdbinit.pod
+
force:
Makefile: Makefile.in $(host_makefile_frag) ../config.status
@@ -551,8 +640,8 @@ distclean: clean
# "clean" or "distclean". Use maintainer-clean to remove them.
maintainer-clean realclean: distclean
- rm -f GDBvn.texi *.info* *.dvi *.ps *.html *.pdf
+ rm -f GDBvn.texi *.info* *.dvi *.ps *.html *.pdf $(MANS)
-install: install-info
+install: install-info install-man
-uninstall: uninstall-info
+uninstall: uninstall-info uninstall-man
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 8ae7259..2f9c68a 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -6,7 +6,9 @@
@c of @set vars. However, you can override filename with makeinfo -o.
@setfilename gdb.info
@c
+@c man begin INCLUDE
@include gdb-cfg.texi
+@c man end
@c
@settitle Debugging with @value{GDBN}
@setchapternewpage odd
@@ -46,6 +48,7 @@
@end direntry
@copying
+@c man begin COPYRIGHT
Copyright @copyright{} 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
@@ -58,6 +61,7 @@ and with the Back-Cover Texts as in (a) below.
(a) The FSF's Back-Cover Text is: ``You are free to copy and modify
this GNU Manual. Buying copies from GNU Press supports the FSF in
developing GNU and promoting software freedom.''
+@c man end
@end copying
@ifnottex
@@ -179,6 +183,7 @@ software in general. We will miss him.
the operating system
* Trace File Format:: GDB trace file format
* Index Section Format:: .gdb_index section format
+* Man Pages:: Manual pages
* Copying:: GNU General Public License says
how you can copy and share GDB
* GNU Free Documentation License:: The license for this documentation
@@ -41597,6 +41602,497 @@ switch (die->tag)
@}
@end smallexample
+@node Man Pages
+@appendix Manual pages
+@cindex Man pages
+
+@menu
+* gdb man:: The GNU Debugger man page
+* gdbserver man:: Remote Server for the GNU Debugger man page
+* gdbinit man:: gdbinit scripts
+@end menu
+
+@node gdb man
+@heading gdb man
+
+@c man title gdb The GNU Debugger
+
+@c man begin SYNOPSIS gdb
+gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}]
+[@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}]
+[@option{-b}@w{ }@var{bps}]
+ [@option{-tty=}@var{dev}] [@option{-s} @var{symfile}]
+[@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}]
+[@option{-c}@w{ }@var{core}] [@option{-x}@w{ }@var{cmds}]
+ [@option{-d}@w{ }@var{dir}] [@var{prog}|@var{core}|@var{procID}]
+@c man end
+
+@c man begin DESCRIPTION gdb
+The purpose of a debugger such as @value{GDBN} is to allow you to see what is
+going on ``inside'' another program while it executes -- or what another
+program was doing at the moment it crashed.
+
+@value{GDBN} can do four main kinds of things (plus other things in support of
+these) to help you catch bugs in the act:
+
+@itemize @bullet
+@item
+Start your program, specifying anything that might affect its behavior.
+
+@item
+Make your program stop on specified conditions.
+
+@item
+Examine what has happened, when your program has stopped.
+
+@item
+Change things in your program, so you can experiment with correcting the
+effects of one bug and go on to learn about another.
+@end itemize
+
+You can use @value{GDBN} to debug programs written in C, C@t{++}, and Modula-2.
+Fortran support will be added when a GNU Fortran compiler is ready.
+
+@value{GDBN} is invoked with the shell command @code{gdb}. Once started, it reads
+commands from the terminal until you tell it to exit with the @value{GDBN}
+command @code{quit}. You can get online help from @value{GDBN} itself
+by using the command @code{help}.
+
+You can run @code{gdb} with no arguments or options; but the most
+usual way to start @value{GDBN} is with one argument or two, specifying an
+executable program as the argument:
+
+@smallexample
+gdb program
+@end smallexample
+
+You can also start with both an executable program and a core file specified:
+
+@smallexample
+gdb program core
+@end smallexample
+
+You can, instead, specify a process ID as a second argument, if you want
+to debug a running process:
+
+@smallexample
+gdb program 1234
+@end smallexample
+
+@noindent
+would attach @value{GDBN} to process @code{1234} (unless you also have a file
+named @file{1234}; @value{GDBN} does check for a core file first).
+
+Here are some of the most frequently needed @value{GDBN} commands:
+
+@c pod2man highlights the right hand side of the @item lines.
+@table @env
+@item break [@var{file}:]@var{functiop}
+Set a breakpoint at @var{function} (in @var{file}).
+
+@item run [@var{arglist}]
+Start your program (with @var{arglist}, if specified).
+
+@item bt
+Backtrace: display the program stack.
+
+@item print @var{expr}
+Display the value of an expression.
+
+@item c
+Continue running your program (after stopping, e.g. at a breakpoint).
+
+@item next
+Execute next program line (after stopping); step @emph{over} any
+function calls in the line.
+
+@item edit [@var{file}:]@var{function}
+look at the program line where it is presently stopped.
+
+@item list [@var{file}:]@var{function}
+type the text of the program in the vicinity of where it is presently stopped.
+
+@item step
+Execute next program line (after stopping); step @emph{into} any
+function calls in the line.
+
+@item help [@var{name}]
+Show information about @value{GDBN} command @var{name}, or general information
+about using @value{GDBN}.
+
+@item quit
+Exit from @value{GDBN}.
+@end table
+
+@ifset man
+For full details on @value{GDBN},
+see @cite{Using GDB: A Guide to the GNU Source-Level Debugger},
+by Richard M. Stallman and Roland H. Pesch. The same text is available online
+as the @code{gdb} entry in the @code{info} program.
+@end ifset
+@c man end
+
+@c man begin OPTIONS gdb
+Any arguments other than options specify an executable
+file and core file (or process ID); that is, the first argument
+encountered with no
+associated option flag is equivalent to a @option{-se} option, and the second,
+if any, is equivalent to a @option{-c} option if it's the name of a file.
+Many options have
+both long and short forms; both are shown here. The long forms are also
+recognized if you truncate them, so long as enough of the option is
+present to be unambiguous. (If you prefer, you can flag option
+arguments with @option{+} rather than @option{-}, though we illustrate the
+more usual convention.)
+
+All the options and command line arguments you give are processed
+in sequential order. The order makes a difference when the @option{-x}
+option is used.
+
+@table @env
+@item -help
+@itemx -h
+List all options, with brief explanations.
+
+@item -symbols=@var{file}
+@itemx -s @var{file}
+Read symbol table from file @var{file}.
+
+@item -write
+Enable writing into executable and core files.
+
+@item -exec=@var{file}
+@itemx -e @var{file}
+Use file @var{file} as the executable file to execute when
+appropriate, and for examining pure data in conjunction with a core
+dump.
+
+@item -se=@var{file}
+Read symbol table from file @var{file} and use it as the executable
+file.
+
+@item -core=@var{file}
+@itemx -c @var{file}
+Use file @var{file} as a core dump to examine.
+
+@item -command=@var{file}
+@itemx -x @var{file}
+Execute @value{GDBN} commands from file @var{file}.
+
+@item -ex @var{command}
+Execute given @value{GDBN} @var{command}.
+
+@item -directory=@var{directory}
+@itemx -d @var{directory}
+Add @var{directory} to the path to search for source files.
+
+@item -nh
+Do not execute commands from @file{~/.gdbinit}.
+
+@item -nx
+@itemx -n
+Do not execute commands from any @file{.gdbinit} initialization files.
+
+@item -quiet
+@itemx -q
+``Quiet''. Do not print the introductory and copyright messages. These
+messages are also suppressed in batch mode.
+
+@item -batch
+Run in batch mode. Exit with status @code{0} after processing all the command
+files specified with @option{-x} (and @file{.gdbinit}, if not inhibited).
+Exit with nonzero status if an error occurs in executing the @value{GDBN}
+commands in the command files.
+
+Batch mode may be useful for running @value{GDBN} as a filter, for example to
+download and run a program on another computer; in order to make this
+more useful, the message
+
+@smallexample
+Program exited normally.
+@end smallexample
+
+@noindent
+(which is ordinarily issued whenever a program running under @value{GDBN} control
+terminates) is not issued when running in batch mode.
+
+@item -cd=@var{directory}
+Run @value{GDBN} using @var{directory} as its working directory,
+instead of the current directory.
+
+@item -fullname
+@itemx -f
+Emacs sets this option when it runs @value{GDBN} as a subprocess. It tells
+@value{GDBN} to output the full file name and line number in a standard,
+recognizable fashion each time a stack frame is displayed (which
+includes each time the program stops). This recognizable format looks
+like two @samp{\032} characters, followed by the file name, line number
+and character position separated by colons, and a newline. The
+Emacs-to-@value{GDBN} interface program uses the two @samp{\032}
+characters as a signal to display the source code for the frame.
+
+@item -b @var{bps}
+Set the line speed (baud rate or bits per second) of any serial
+interface used by @value{GDBN} for remote debugging.
+
+@item -tty=@var{device}
+Run using @var{device} for your program's standard input and output.
+@end table
+@c man end
+
+@c man begin SEEALSO gdb
+@ifset man
+The full documentation for @value{GDBN} is maintained as a Texinfo manual.
+If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo
+documentation are properly installed at your site, the command
+
+@smallexample
+info gdb
+@end smallexample
+
+@noindent
+should give you access to the complete manual.
+
+@cite{Using GDB: A Guide to the GNU Source-Level Debugger},
+Richard M. Stallman and Roland H. Pesch, July 1991.
+@end ifset
+@c man end
+
+@node gdbserver man
+@heading gdbserver man
+
+@c man title gdbserver Remote Server for the GNU Debugger
+@format
+@c man begin SYNOPSIS gdbserver
+gdbserver @var{tty} @var{prog} [@var{args}@dots{}]
+
+gdbserver @var{tty} --attach @var{PID}
+@c man end
+@end format
+
+@c man begin DESCRIPTION gdbserver
+@command{gdbserver} is a program that allows you to run @value{GDBN} on a different machine
+than the one which is running the program being debugged.
+
+@ifclear man
+@subheading Usage (server (target) side)
+@end ifclear
+@ifset man
+Usage (server (target) side):
+@end ifset
+
+First, you need to have a copy of the program you want to debug put onto
+the target system. The program can be stripped to save space if needed, as
+@command{gdbserver} doesn't care about symbols. All symbol handling is taken care of by
+the @value{GDBN} running on the host system.
+
+To use the server, you log on to the target system, and run the @command{gdbserver}
+program. You must tell it (a) how to communicate with @value{GDBN}, (b) the name of
+your program, and (c) its arguments. The general syntax is:
+
+@smallexample
+target> gdbserver @var{comm} @var{program} [@var{args} ...]
+@end smallexample
+
+For example, using a serial port, you might say:
+
+@smallexample
+@ifset man
+@c @file would wrap it as F</dev/com1>.
+target> gdbserver /dev/com1 emacs foo.txt
+@end ifset
+@ifclear man
+target> gdbserver @file{/dev/com1} emacs foo.txt
+@end ifclear
+@end smallexample
+
+This tells @command{gdbserver} to debug emacs with an argument of foo.txt, and
+to communicate with @value{GDBN} via @file{/dev/com1}. @command{gdbserver} now
+waits patiently for the host @value{GDBN} to communicate with it.
+
+To use a TCP connection, you could say:
+
+@smallexample
+target> gdbserver host:2345 emacs foo.txt
+@end smallexample
+
+This says pretty much the same thing as the last example, except that we are
+going to communicate with the @code{host} @value{GDBN} via TCP. The @code{host:2345} argument means
+that we are expecting to see a TCP connection from @code{host} to local TCP port
+2345. (Currently, the @code{host} part is ignored.) You can choose any number you
+want for the port number as long as it does not conflict with any existing TCP
+ports on the target system. This same port number must be used in the host
+@value{GDBN}s @code{target remote} command, which will be described shortly. Note that if
+you chose a port number that conflicts with another service, @command{gdbserver} will
+print an error message and exit.
+
+On some targets, @command{gdbserver} can also attach to running programs.
+This is accomplished via the @option{--attach} argument. The syntax is:
+
+@smallexample
+target> gdbserver @var{comm} --attach @var{pid}
+@end smallexample
+
+@var{pid} is the process ID of a currently running process. It isn't
+necessary to point @command{gdbserver} at a binary for the running process.
+
+@ifclear man
+@subheading Usage (host side)
+@end ifclear
+@ifset man
+Usage (host side):
+@end ifset
+
+You need an unstripped copy of the target program on your host system, since
+@value{GDBN} needs to examine it's symbol tables and such. Start up @value{GDBN} as you normally
+would, with the target program as the first argument. (You may need to use the
+@option{--baud} option if the serial line is running at anything except 9600 baud.)
+That is @code{gdb TARGET-PROG}, or @code{gdb --baud BAUD TARGET-PROG}. After that, the only
+new command you need to know about is @code{target remote}. It's argument is either
+a device name (usually a serial device, like @file{/dev/ttyb}), or a @code{HOST:PORT}
+descriptor. For example:
+
+@smallexample
+@ifset man
+@c @file would wrap it as F</dev/ttyb>.
+(gdb) target remote /dev/ttyb
+@end ifset
+@ifclear man
+(gdb) target remote @file{/dev/ttyb}
+@end ifclear
+@end smallexample
+
+@noindent
+communicates with the server via serial line @file{/dev/ttyb}, and:
+
+@smallexample
+(gdb) target remote the-target:2345
+@end smallexample
+
+@noindent
+communicates via a TCP connection to port 2345 on host `the-target', where
+you previously started up @command{gdbserver} with the same port number. Note that for
+TCP connections, you must start up @command{gdbserver} prior to using the `target remote'
+command, otherwise you may get an error that looks something like
+`Connection refused'.
+@c man end
+
+@c man begin OPTIONS gdbserver
+You have to supply the name of the program to debug
+and the tty to communicate on; the remote @value{GDBN} will do everything else.
+Any remaining arguments will be passed to the program verbatim.
+@c man end
+
+@c man begin SEEALSO gdbserver
+@ifset man
+The full documentation for @value{GDBN} is maintained as a Texinfo manual.
+If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo
+documentation are properly installed at your site, the command
+
+@smallexample
+info gdb
+@end smallexample
+
+should give you access to the complete manual.
+
+@cite{Using GDB: A Guide to the GNU Source-Level Debugger},
+Richard M. Stallman and Roland H. Pesch, July 1991.
+@end ifset
+@c man end
+
+@node gdbinit man
+@heading gdbinit
+
+@c man title gdbinit GDB initialization scripts
+
+@format
+@c man begin SYNOPSIS gdbinit
+@ifset SYSTEM_GDBINIT
+@value{SYSTEM_GDBINIT}
+@end ifset
+
+~/.gdbinit
+
+./.gdbinit
+@c man end
+@end format
+
+@c man begin DESCRIPTION gdbinit
+These files contain @value{GDBN} commands to automatically execute during
+@value{GDBN} startup. The lines of contents are canned sequences of commands,
+described in
+@ifset man
+the @value{GDBN} manual in node @code{Sequences}
+-- shell command @code{info -f gdb -n Sequences}.
+@end ifset
+@ifclear man
+@ref{Sequences}.
+@end ifclear
+
+Please read more in
+@ifset man
+the @value{GDBN} manual in node @code{Startup}
+-- shell command @code{info -f gdb -n Startup}.
+@end ifset
+@ifclear man
+@ref{Startup}.
+@end ifclear
+
+@table @env
+@ifset SYSTEM_GDBINIT
+@item @value{SYSTEM_GDBINIT}
+@end ifset
+@ifclear SYSTEM_GDBINIT
+@item (not enabled with @code{--with-system-gdbinit} during compilation)
+@end ifclear
+System-wide initialization file. It is executed unless user specified
+@value{GDBN} option @code{-nx} or @code{-n}.
+See more in
+@ifset man
+the @value{GDBN} manual in node @code{System-wide configuration}
+-- shell command @code{info -f gdb -n 'System-wide configuration'}.
+@end ifset
+@ifclear man
+@ref{System-wide configuration}.
+@end ifclear
+
+@item ~/.gdbinit
+User initialization file. It is executed unless user specified
+@value{GDBN} options @code{-nx}, @code{-n} or @code{-nh}.
+
+@item ./.gdbinit
+Initialization file for current directory. It may need to be enabled with
+@value{GDBN} security command @code{set auto-load local-gdbinit}.
+See more in
+@ifset man
+the @value{GDBN} manual in node @code{Init File in the Current Directory}
+-- shell command @code{info -f gdb -n 'Init File in the Current Directory'}.
+@end ifset
+@ifclear man
+@ref{Init File in the Current Directory}.
+@end ifclear
+@end table
+@c man end
+
+@c man begin SEEALSO gdbinit
+@ifset man
+gdb(1), @code{info -f gdb -n Startup}
+
+The full documentation for @value{GDBN} is maintained as a Texinfo manual.
+If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo
+documentation are properly installed at your site, the command
+
+@smallexample
+info gdb
+@end smallexample
+
+should give you access to the complete manual.
+
+@cite{Using GDB: A Guide to the GNU Source-Level Debugger},
+Richard M. Stallman and Roland H. Pesch, July 1991.
+@end ifset
+@c man end
+
@include gpl.texi
@node GNU Free Documentation License
diff --git a/gdb/gdb.1 b/gdb/gdb.1
deleted file mode 100644
index ec6c02a..0000000
--- a/gdb/gdb.1
+++ /dev/null
@@ -1,403 +0,0 @@
-.\" Copyright (C) 1991-2013 Free Software Foundation, Inc.
-.\" See section COPYING for conditions for redistribution
-.\" $Id$
-.TH gdb 1 "22may2002" "GNU Tools" "GNU Tools"
-.SH NAME
-gdb \- The GNU Debugger
-.SH SYNOPSIS
-.na
-.TP
-.B gdb
-.RB "[\|" \-help "\|]"
-.RB "[\|" \-nh "\|]"
-.RB "[\|" \-nx "\|]"
-.RB "[\|" \-q "\|]"
-.RB "[\|" \-batch "\|]"
-.RB "[\|" \-cd=\c
-.I dir\c
-\|]
-.RB "[\|" \-f "\|]"
-.RB "[\|" "\-b\ "\c
-.IR bps "\|]"
-.RB "[\|" "\-tty="\c
-.IR dev "\|]"
-.RB "[\|" "\-s "\c
-.I symfile\c
-\&\|]
-.RB "[\|" "\-e "\c
-.I prog\c
-\&\|]
-.RB "[\|" "\-se "\c
-.I prog\c
-\&\|]
-.RB "[\|" "\-c "\c
-.I core\c
-\&\|]
-.RB "[\|" "\-x "\c
-.I file\c
-\&\|]
-.RB "[\|" "\-ex "\c
-.I cmd\c
-\&\|]
-.RB "[\|" "\-d "\c
-.I dir\c
-\&\|]
-.RB "[\|" \c
-.I prog\c
-.RB "[\|" \c
-.IR core \||\| procID\c
-\&\|]\&\|]
-.ad b
-.SH DESCRIPTION
-The purpose of a debugger such as GDB is to allow you to see what is
-going on ``inside'' another program while it executes\(em\&or what another
-program was doing at the moment it crashed.
-
-GDB can do four main kinds of things (plus other things in support of
-these) to help you catch bugs in the act:
-
-.TP
-\ \ \ \(bu
-Start your program, specifying anything that might affect its behavior.
-
-.TP
-\ \ \ \(bu
-Make your program stop on specified conditions.
-
-.TP
-\ \ \ \(bu
-Examine what has happened, when your program has stopped.
-
-.TP
-\ \ \ \(bu
-Change things in your program, so you can experiment with correcting the
-effects of one bug and go on to learn about another.
-.PP
-
-You can use GDB to debug programs written in C, C++, and Modula-2.
-Fortran support will be added when a GNU Fortran compiler is ready.
-
-GDB is invoked with the shell command \c
-.B gdb\c
-\&. Once started, it reads
-commands from the terminal until you tell it to exit with the GDB
-command \c
-.B quit\c
-\&. You can get online help from \c
-.B gdb\c
-\& itself
-by using the command \c
-.B help\c
-\&.
-
-You can run \c
-.B gdb\c
-\& with no arguments or options; but the most
-usual way to start GDB is with one argument or two, specifying an
-executable program as the argument:
-.sp
-.br
-gdb\ program
-.br
-.sp
-
-You can also start with both an executable program and a core file specified:
-.sp
-.br
-gdb\ program\ core
-.br
-.sp
-
-You can, instead, specify a process ID as a second argument, if you want
-to debug a running process:
-.sp
-.br
-gdb\ program\ 1234
-.br
-.sp
-
-would attach GDB to process \c
-.B 1234\c
-\& (unless you also have a file
-named `\|\c
-.B 1234\c
-\&\|'; GDB does check for a core file first).
-
-Here are some of the most frequently needed GDB commands:
-.TP
-.B break \fR[\|\fIfile\fB:\fR\|]\fIfunction
-\&
-Set a breakpoint at \c
-.I function\c
-\& (in \c
-.I file\c
-\&).
-.TP
-.B run \fR[\|\fIarglist\fR\|]
-Start your program (with \c
-.I arglist\c
-\&, if specified).
-.TP
-.B bt
-Backtrace: display the program stack.
-.TP
-.BI print " expr"\c
-\&
-Display the value of an expression.
-.TP
-.B c
-Continue running your program (after stopping, e.g. at a breakpoint).
-.TP
-.B next
-Execute next program line (after stopping); step \c
-.I over\c
-\& any
-function calls in the line.
-.TP
-.B edit \fR[\|\fIfile\fB:\fR\|]\fIfunction
-look at the program line where it is presently stopped.
-.TP
-.B list \fR[\|\fIfile\fB:\fR\|]\fIfunction
-type the text of the program in the vicinity of where it is presently stopped.
-.TP
-.B step
-Execute next program line (after stopping); step \c
-.I into\c
-\& any
-function calls in the line.
-.TP
-.B help \fR[\|\fIname\fR\|]
-Show information about GDB command \c
-.I name\c
-\&, or general information
-about using GDB.
-.TP
-.B quit
-Exit from GDB.
-.PP
-For full details on GDB, see \c
-.I
-Using GDB: A Guide to the GNU Source-Level Debugger\c
-\&, by Richard M. Stallman and Roland H. Pesch. The same text is available online
-as the \c
-.B gdb\c
-\& entry in the \c
-.B info\c
-\& program.
-.SH OPTIONS
-Any arguments other than options specify an executable
-file and core file (or process ID); that is, the first argument
-encountered with no
-associated option flag is equivalent to a `\|\c
-.B \-se\c
-\&\|' option, and the
-second, if any, is equivalent to a `\|\c
-.B \-c\c
-\&\|' option if it's the name of a file. Many options have
-both long and short forms; both are shown here. The long forms are also
-recognized if you truncate them, so long as enough of the option is
-present to be unambiguous. (If you prefer, you can flag option
-arguments with `\|\c
-.B +\c
-\&\|' rather than `\|\c
-.B \-\c
-\&\|', though we illustrate the
-more usual convention.)
-
-All the options and command line arguments you give are processed
-in sequential order. The order makes a difference when the
-`\|\c
-.B \-x\c
-\&\|' option is used.
-
-.TP
-.B \-help
-.TP
-.B \-h
-List all options, with brief explanations.
-
-.TP
-.BI "\-symbols=" "file"\c
-.TP
-.BI "\-s " "file"\c
-\&
-Read symbol table from file \c
-.I file\c
-\&.
-
-.TP
-.B \-write
-Enable writing into executable and core files.
-
-.TP
-.BI "\-exec=" "file"\c
-.TP
-.BI "\-e " "file"\c
-\&
-Use file \c
-.I file\c
-\& as the executable file to execute when
-appropriate, and for examining pure data in conjunction with a core
-dump.
-
-.TP
-.BI "\-se=" "file"\c
-\&
-Read symbol table from file \c
-.I file\c
-\& and use it as the executable
-file.
-
-.TP
-.BI "\-core=" "file"\c
-.TP
-.BI "\-c " "file"\c
-\&
-Use file \c
-.I file\c
-\& as a core dump to examine.
-
-.TP
-.BI "\-command=" "file"\c
-.TP
-.BI "\-x " "file"\c
-\&
-Execute GDB commands from file \c
-.I file\c
-\&.
-
-.TP
-.BI "\-ex " "command"\c
-\&
-Execute given GDB \c
-.I command\c
-\&.
-
-.TP
-.BI "\-directory=" "directory"\c
-.TP
-.BI "\-d " "directory"\c
-\&
-Add \c
-.I directory\c
-\& to the path to search for source files.
-.PP
-
-.TP
-.B \-nh
-Do not execute commands from ~/.gdbinit.
-
-.TP
-.B \-nx
-.TP
-.B \-n
-Do not execute commands from any `\|\c
-.B .gdbinit\c
-\&\|' initialization files.
-
-
-.TP
-.B \-quiet
-.TP
-.B \-q
-``Quiet''. Do not print the introductory and copyright messages. These
-messages are also suppressed in batch mode.
-
-.TP
-.B \-batch
-Run in batch mode. Exit with status \c
-.B 0\c
-\& after processing all the command
-files specified with `\|\c
-.B \-x\c
-\&\|' (and `\|\c
-.B .gdbinit\c
-\&\|', if not inhibited).
-Exit with nonzero status if an error occurs in executing the GDB
-commands in the command files.
-
-Batch mode may be useful for running GDB as a filter, for example to
-download and run a program on another computer; in order to make this
-more useful, the message
-.sp
-.br
-Program\ exited\ normally.
-.br
-.sp
-
-(which is ordinarily issued whenever a program running under GDB control
-terminates) is not issued when running in batch mode.
-
-.TP
-.BI "\-cd=" "directory"\c
-\&
-Run GDB using \c
-.I directory\c
-\& as its working directory,
-instead of the current directory.
-
-.TP
-.B \-fullname
-.TP
-.B \-f
-Emacs sets this option when it runs GDB as a subprocess. It tells GDB
-to output the full file name and line number in a standard,
-recognizable fashion each time a stack frame is displayed (which
-includes each time the program stops). This recognizable format looks
-like two `\|\c
-.B \032\c
-\&\|' characters, followed by the file name, line number
-and character position separated by colons, and a newline. The
-Emacs-to-GDB interface program uses the two `\|\c
-.B \032\c
-\&\|' characters as
-a signal to display the source code for the frame.
-
-.TP
-.BI "\-b " "bps"\c
-\&
-Set the line speed (baud rate or bits per second) of any serial
-interface used by GDB for remote debugging.
-
-.TP
-.BI "\-tty=" "device"\c
-\&
-Run using \c
-.I device\c
-\& for your program's standard input and output.
-.PP
-
-.SH "SEE ALSO"
-The full documentation for
-.B gdb
-is maintained as a Texinfo manual. If the
-.B info
-and
-.B gdb
-programs and GDB's Texinfo documentation are properly installed at
-your site, the command
-.IP
-.B info gdb
-.PP
-should give you access to the complete manual.
-
-.I
-Using GDB: A Guide to the GNU Source-Level Debugger\c
-, Richard M. Stallman and Roland H. Pesch, July 1991.
-.SH COPYING
-Copyright (c) 1991, 2010 Free Software Foundation, Inc.
-.PP
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-.PP
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-.PP
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 08db2cc..ef839d3 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -252,8 +252,6 @@ install-only:
fi; \
$(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir); \
$(INSTALL_PROGRAM) gdbserver$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT); \
- $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(man1dir); \
- $(INSTALL_DATA) $(srcdir)/gdbserver.1 $(DESTDIR)$(man1dir)/$$n.1
@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
uninstall: force
diff --git a/gdb/gdbserver/gdbserver.1 b/gdb/gdbserver/gdbserver.1
deleted file mode 100644
index 59ed0bb..0000000
--- a/gdb/gdbserver/gdbserver.1
+++ /dev/null
@@ -1,116 +0,0 @@
-.\" Copyright (C) 1993-2013 Free Software Foundation, Inc.
-.\" See section COPYING for conditions for redistribution
-.TH gdbserver 1 "2 November 1993" "Cygnus Support" "GNU Development Tools"
-.SH NAME
-gdbserver \- Remote Server for the GNU Debugger
-.SH SYNOPSIS
-.na
-.TP
-.B gdbserver
-.RB tty
-.RB prog
-.RB "[\|" args... "\|]"
-.PP
-.B gdbserver
-.RB tty
-.B --attach
-.RB PID
-.ad b
-.SH DESCRIPTION
-GDBSERVER is a program that allows you to run GDB on a different machine
-than the one which is running the program being debugged.
-
-Usage (server (target) side):
-
-First, you need to have a copy of the program you want to debug put onto
-the target system. The program can be stripped to save space if needed, as
-GDBserver doesn't care about symbols. All symbol handling is taken care of by
-the GDB running on the host system.
-
-To use the server, you log on to the target system, and run the `gdbserver'
-program. You must tell it (a) how to communicate with GDB, (b) the name of
-your program, and (c) its arguments. The general syntax is:
-
- target> gdbserver COMM PROGRAM [ARGS ...]
-
-For example, using a serial port, you might say:
-
- target> gdbserver /dev/com1 emacs foo.txt
-
-This tells gdbserver to debug emacs with an argument of foo.txt, and to
-communicate with GDB via /dev/com1. Gdbserver now waits patiently for the
-host GDB to communicate with it.
-
-To use a TCP connection, you could say:
-
- target> gdbserver host:2345 emacs foo.txt
-
-This says pretty much the same thing as the last example, except that we are
-going to communicate with the host GDB via TCP. The `host:2345' argument means
-that we are expecting to see a TCP connection from `host' to local TCP port
-2345. (Currently, the `host' part is ignored.) You can choose any number you
-want for the port number as long as it does not conflict with any existing TCP
-ports on the target system. This same port number must be used in the host
-GDBs `target remote' command, which will be described shortly. Note that if
-you chose a port number that conflicts with another service, gdbserver will
-print an error message and exit.
-
-On some targets, gdbserver can also attach to running programs.
-This is accomplished via the --attach argument. The syntax is:
-
- target> gdbserver COMM --attach PID
-
-PID is the process ID of a currently running process. It isn't
-necessary to point gdbserver at a binary for the running process.
-
-Usage (host side):
-
-You need an unstripped copy of the target program on your host system, since
-GDB needs to examine it's symbol tables and such. Start up GDB as you normally
-would, with the target program as the first argument. (You may need to use the
---baud option if the serial line is running at anything except 9600 baud.)
-Ie: `gdb TARGET-PROG', or `gdb --baud BAUD TARGET-PROG'. After that, the only
-new command you need to know about is `target remote'. It's argument is either
-a device name (usually a serial device, like `/dev/ttyb'), or a HOST:PORT
-descriptor. For example:
-
- (gdb) target remote /dev/ttyb
-
-communicates with the server via serial line /dev/ttyb, and:
-
- (gdb) target remote the-target:2345
-
-communicates via a TCP connection to port 2345 on host `the-target', where
-you previously started up gdbserver with the same port number. Note that for
-TCP connections, you must start up gdbserver prior to using the `target remote'
-command, otherwise you may get an error that looks something like
-`Connection refused'.
-.SH OPTIONS
-You have to supply the name of the program to debug
-and the tty to communicate on; the remote GDB will do everything else.
-Any remaining arguments will be passed to the program verbatim.
-.SH "SEE ALSO"
-.RB "`\|" gdb "\|'"
-entry in
-.B info\c
-\&;
-.I
-Using GDB: A Guide to the GNU Source-Level Debugger\c
-, Richard M. Stallman and Roland H. Pesch, July 1991.
-.SH COPYING
-Copyright (c) 1993 Free Software Foundation, Inc.
-.PP
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-.PP
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-.PP
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [doc patch] gdb.1: Add -p PID
2013-04-05 17:50 ` Jan Kratochvil
2013-04-05 16:33 ` Jan Kratochvil
@ 2013-04-05 18:13 ` Jan Kratochvil
2013-04-05 18:40 ` Eli Zaretskii
2013-04-05 18:29 ` [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1 Eli Zaretskii
2 siblings, 1 reply; 24+ messages in thread
From: Jan Kratochvil @ 2013-04-05 18:13 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: tromey, gdb-patches
On Fri, 05 Apr 2013 17:01:01 +0200, Jan Kratochvil wrote:
> > > +Fortran support will be added when a GNU Fortran compiler is ready.
> >
> > This list of languages is outdated, right?
> +
> > > +@smallexample
> > > +gdb program 1234
> > > +@end smallexample
> >
> > Should we mention "gdb -p PID" as well?
>
> Yes but that is unrelated to this patch which does only the technical
> conversion. OK, going to post a second patch for these.
Here.
Thanks,
jan
gdb/doc/
2013-04-04 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.texinfo (gdb man): Mention option -p. Include Fortran to
the list of supported languages.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 2f9c68a..08c708b 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -41623,8 +41623,9 @@ gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}]
[@option{-b}@w{ }@var{bps}]
[@option{-tty=}@var{dev}] [@option{-s} @var{symfile}]
[@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}]
-[@option{-c}@w{ }@var{core}] [@option{-x}@w{ }@var{cmds}]
- [@option{-d}@w{ }@var{dir}] [@var{prog}|@var{core}|@var{procID}]
+[@option{-c}@w{ }@var{core}] [@option{-p}@w{ }@var{procID}]
+ [@option{-x}@w{ }@var{cmds}] [@option{-d}@w{ }@var{dir}]
+[@var{prog}|@var{prog} @var{procID}|@var{prog} @var{core}]
@c man end
@c man begin DESCRIPTION gdb
@@ -41650,8 +41651,8 @@ Change things in your program, so you can experiment with correcting the
effects of one bug and go on to learn about another.
@end itemize
-You can use @value{GDBN} to debug programs written in C, C@t{++}, and Modula-2.
-Fortran support will be added when a GNU Fortran compiler is ready.
+You can use @value{GDBN} to debug programs written in C, C@t{++}, Fortran and
+Modula-2.
@value{GDBN} is invoked with the shell command @code{gdb}. Once started, it reads
commands from the terminal until you tell it to exit with the @value{GDBN}
@@ -41677,11 +41678,13 @@ to debug a running process:
@smallexample
gdb program 1234
+gdb -p 1234
@end smallexample
@noindent
would attach @value{GDBN} to process @code{1234} (unless you also have a file
named @file{1234}; @value{GDBN} does check for a core file first).
+With option @option{-p} you can omit the @var{program} filename.
Here are some of the most frequently needed @value{GDBN} commands:
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1
2013-04-05 17:50 ` Jan Kratochvil
2013-04-05 16:33 ` Jan Kratochvil
2013-04-05 18:13 ` [doc patch] gdb.1: Add -p PID Jan Kratochvil
@ 2013-04-05 18:29 ` Eli Zaretskii
2013-04-05 19:06 ` Jan Kratochvil
2 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2013-04-05 18:29 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: tromey, gdb-patches
> Date: Fri, 5 Apr 2013 17:01:01 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: tromey@redhat.com, gdb-patches@sourceware.org
>
> On Thu, 04 Apr 2013 20:11:29 +0200, Eli Zaretskii wrote:
> > > +@c man begin SYNOPSIS gdb
> > > +gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}]
> > > +[@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}]
> > > +[@option{-b}@w{ }@var{bps}]
> > > + [@option{-tty=}@var{dev}] [@option{-s} @var{symfile}]
> > > +[@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}]
> > > +[@option{-c}@w{ }@var{core}] [@option{-x}@w{ }@var{cmds}]
> > > + [@option{-d}@w{ }@var{dir}] [@var{prog}|@var{core}|@var{procID}]
> > > +@c man end
> >
> > Why are the options formatted in such a strange way -- some lines
> > indented, others not? The original man page has them all aligned
> > nicely after formatting:
> >
> > SYNOPSIS
> > gdb [-help] [-nx] [-q] [-batch] [-cd=dir] [-f] [-b bps] [-tty=dev]
> > [-s symfile] [-e prog] [-se prog] [-c core] [-x file] [-ex cmd]
> > [-d dir] [prog[core|procID]]
>
> cd gdb/doc;make gdb.1;nroff -man gdb.1|less -r
> SYNOPSIS
> gdb [-help] [-nh] [-nx] [-q] [-batch] [-cd=dir] [-f] [-b bps]
> [-tty=dev] [-s symfile] [-e prog] [-se prog] [-c core] [-x cmds]
> [-d dir] [prog|core|procID]
>
> The formatting is kept for the man page but it looks weird in the .texinfo
> source. It is because I tried to keep the .texinfo source <= 80 columns,
> I believe you do not prefer an equivalent .texinfo form (174 columns):
No, of course not. But if you use @verbatim..@end verbatim around
this block, you can simply format the text exactly as you want it in
the produced formats, and makeinfo will not fill or reindent that
text.
> Sending FYI, I will check it in without further comments.
Please go ahead after using @verbatim as suggested above, this is fine
otherwise.
Thanks.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [doc patch] gdb.1: Add -p PID
2013-04-05 18:13 ` [doc patch] gdb.1: Add -p PID Jan Kratochvil
@ 2013-04-05 18:40 ` Eli Zaretskii
2013-04-06 9:01 ` [commit] " Jan Kratochvil
0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2013-04-05 18:40 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: tromey, gdb-patches
> Date: Fri, 5 Apr 2013 17:18:28 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: tromey@redhat.com, gdb-patches@sourceware.org
>
> On Fri, 05 Apr 2013 17:01:01 +0200, Jan Kratochvil wrote:
> > > > +Fortran support will be added when a GNU Fortran compiler is ready.
> > >
> > > This list of languages is outdated, right?
> > +
> > > > +@smallexample
> > > > +gdb program 1234
> > > > +@end smallexample
> > >
> > > Should we mention "gdb -p PID" as well?
> >
> > Yes but that is unrelated to this patch which does only the technical
> > conversion. OK, going to post a second patch for these.
>
> Here.
Fine with me, thanks.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1
2013-04-05 18:29 ` [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1 Eli Zaretskii
@ 2013-04-05 19:06 ` Jan Kratochvil
2013-04-05 19:43 ` Eli Zaretskii
0 siblings, 1 reply; 24+ messages in thread
From: Jan Kratochvil @ 2013-04-05 19:06 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: tromey, gdb-patches
On Fri, 05 Apr 2013 17:23:07 +0200, Eli Zaretskii wrote:
> > On Thu, 04 Apr 2013 20:11:29 +0200, Eli Zaretskii wrote:
> > > > +@c man begin SYNOPSIS gdb
> > > > +gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}]
> > > > +[@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}]
> > > > +[@option{-b}@w{ }@var{bps}]
> > > > + [@option{-tty=}@var{dev}] [@option{-s} @var{symfile}]
> > > > +[@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}]
> > > > +[@option{-c}@w{ }@var{core}] [@option{-x}@w{ }@var{cmds}]
> > > > + [@option{-d}@w{ }@var{dir}] [@var{prog}|@var{core}|@var{procID}]
> > > > +@c man end
[...]
> No, of course not. But if you use @verbatim..@end verbatim around
> this block, you can simply format the text exactly as you want it in
> the produced formats, and makeinfo will not fill or reindent that
> text.
But with @verbatim I cannot use various highlighting with the @option or @var
keywords. I want the highlighting both for info and for man.
And putting @verbatim into it as is the info viewer then displays:
File: gdb.info, Node: gdb man, Next: gdbserver man, Up: Man Pages
gdb man
=======
gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}]
[@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}]
[@option{-b}@w{ }@var{bps}]
...
Thanks,
Jan
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1
2013-04-05 19:06 ` Jan Kratochvil
@ 2013-04-05 19:43 ` Eli Zaretskii
2013-04-06 6:47 ` Jan Kratochvil
0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2013-04-05 19:43 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: tromey, gdb-patches
> Date: Fri, 5 Apr 2013 17:30:12 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: tromey@redhat.com, gdb-patches@sourceware.org
>
> On Fri, 05 Apr 2013 17:23:07 +0200, Eli Zaretskii wrote:
> > > On Thu, 04 Apr 2013 20:11:29 +0200, Eli Zaretskii wrote:
> > > > > +@c man begin SYNOPSIS gdb
> > > > > +gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}]
> > > > > +[@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}]
> > > > > +[@option{-b}@w{ }@var{bps}]
> > > > > + [@option{-tty=}@var{dev}] [@option{-s} @var{symfile}]
> > > > > +[@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}]
> > > > > +[@option{-c}@w{ }@var{core}] [@option{-x}@w{ }@var{cmds}]
> > > > > + [@option{-d}@w{ }@var{dir}] [@var{prog}|@var{core}|@var{procID}]
> > > > > +@c man end
> [...]
> > No, of course not. But if you use @verbatim..@end verbatim around
> > this block, you can simply format the text exactly as you want it in
> > the produced formats, and makeinfo will not fill or reindent that
> > text.
>
> But with @verbatim I cannot use various highlighting with the @option or @var
> keywords. I want the highlighting both for info and for man.
>
> And putting @verbatim into it as is the info viewer then displays:
>
> File: gdb.info, Node: gdb man, Next: gdbserver man, Up: Man Pages
>
> gdb man
> =======
>
> gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}]
> [@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}]
> [@option{-b}@w{ }@var{bps}]
> ...
Right, forgot about that, sorry. How about this:
@c man begin SYNOPSIS gdb
@quotation
gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}] [@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}]@*
@w{ }[@option{-b}@w{ }@var{bps}] [@option{-tty=}@var{dev}] [@option{-s} @var{symfile}] [@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}]@*
@w{ }[@option{-c}@w{ }@var{core}] [@option{-x}@w{ }@var{cmds}] [@option{-d}@w{ }@var{dir}] [@var{prog}|@var{core}|@var{procID}]@*
@end quotation
@c man end
It looks good in Info, but I didn't try the other formats.
On second thought, this is even better, I think:
@c man begin SYNOPSIS gdb
@example
gdb [-help] [-nx] [-q] [-batch] [-cd=@var{dir}] [-f] [-b bps] [-tty=@var{dev}]
[-s @var{symfile}] [-e @var{prog}] [-se @var{prog}] [-c @var{core}] [-x @var{file}] [-ex @var{cmd}]
[-d @var{dir}] [@var{prog}[@var{core}|@var{procID}]]
@end example
@c man end
WDYT?
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1
2013-04-05 19:43 ` Eli Zaretskii
@ 2013-04-06 6:47 ` Jan Kratochvil
2013-04-06 6:54 ` Eli Zaretskii
0 siblings, 1 reply; 24+ messages in thread
From: Jan Kratochvil @ 2013-04-06 6:47 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: tromey, gdb-patches
On Fri, 05 Apr 2013 20:28:21 +0200, Eli Zaretskii wrote:
> It looks good in Info, but I didn't try the other formats.
It's all not that simple I really spent *a lot* of time trying a combination
which is acceptable for both info and man (+briefly checked PDF)
The man output can be tested with:
make gdb.1;nroff -man gdb.1|less -r
> @c man begin SYNOPSIS gdb
> @quotation
> gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}] [@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}]@*
> @w{ }[@option{-b}@w{ }@var{bps}] [@option{-tty=}@var{dev}] [@option{-s} @var{symfile}] [@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}]@*
> @w{ }[@option{-c}@w{ }@var{core}] [@option{-x}@w{ }@var{cmds}] [@option{-d}@w{ }@var{dir}] [@var{prog}|@var{core}|@var{procID}]@*
> @end quotation
> @c man end
./../../etc/texi2pod.pl:
@end quotation without @quotation at line 41625
One has to use:
------------------------------------------------------------------------------
@c man begin SYNOPSIS gdb
@quotation
gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}] [@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}]@*
@w{ }[@option{-b}@w{ }@var{bps}] [@option{-tty=}@var{dev}] [@option{-s} @var{symfile}] [@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}]@*
@w{ }[@option{-c}@w{ }@var{core}] [@option{-x}@w{ }@var{cmds}] [@option{-d}@w{ }@var{dir}] [@var{prog} [@var{core}]|@var{procID}]
@end quotation
@c man end
------------------------------------------------------------------------------
but then the man page is not right:
------------------------------------------------------------------------------
SYNOPSIS
gdb [-help] [-nh] [-nx] [-q] [-batch] [-cd=dir] [-f] [-b bps]
[-tty=dev] [-s symfile] [-e prog] [-se prog] [-c core] [-x cmds]
[-d dir] [prog [core]|procID]
------------------------------------------------------------------------------
> On second thought, this is even better, I think:
>
> @c man begin SYNOPSIS gdb
> @example
> gdb [-help] [-nx] [-q] [-batch] [-cd=@var{dir}] [-f] [-b bps] [-tty=@var{dev}]
> [-s @var{symfile}] [-e @var{prog}] [-se @var{prog}] [-c @var{core}] [-x @var{file}] [-ex @var{cmd}]
> [-d @var{dir}] [@var{prog}[@var{core}|@var{procID}]]
> @end example
> @c man end
Again the man output is unusable:
------------------------------------------------------------------------------
NAME
gdb - The GNU Debugger
SYNOPSIS
gdb [-help] [-nx] [-q] [-batch] [-cd=<dir>] [-f] [-b bps] [-tty=<dev>]
[-s <symfile>] [-e <prog>] [-se <prog>] [-c <core>] [-x <file>] [-ex <cmd>]
[-d <dir>] [<prog>[<core>|<procID>]]
DESCRIPTION
The purpose of a debugger such as GDB is to allow you to see what is
------------------------------------------------------------------------------
I find it relatively good this way (with some minor adjustments to do)::
------------------------------------------------------------------------------
@c man begin SYNOPSIS gdb
gdb [-help] [-nx] [-q] [-batch] [-cd=@var{dir}] [-f] [-b bps] [-tty=@var{dev}]
[-s @var{symfile}] [-e @var{prog}] [-se @var{prog}] [-c @var{core}] [-x @var{file}] [-ex @var{cmd}]
[-d @var{dir}] [@var{prog}[@var{core}|@var{procID}]]
@c man end
------------------------------------------------------------------------------
NAME
gdb - The GNU Debugger
SYNOPSIS
gdb [-help] [-nx] [-q] [-batch] [-cd=I<dir>] [-f] [-b bps] [-tty=I<dev>]
[-s I<symfile>] [-e I<prog>] [-se I<prog>] [-c I<core>] [-x I<file>] [-ex I<cmd>]
[-d I<dir>] [I<prog>[I<core>|I<procID>]]
DESCRIPTION
The purpose of a debugger such as GDB is to allow you to see what is
------------------------------------------------------------------------------
But I found the initial indentation of "gdb" one space right is too disturbing
in the man page.
Therefore do you find acceptable the initial form I posted?
------------------------------------------------------------------------------
@c man begin SYNOPSIS gdb
gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}]
[@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}]
[@option{-b}@w{ }@var{bps}]
[@option{-tty=}@var{dev}] [@option{-s} @var{symfile}]
[@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}]
[@option{-c}@w{ }@var{core}] [@option{-x}@w{ }@var{cmds}]
[@option{-d}@w{ }@var{dir}] [@var{prog} [@var{core}]|@var{procID}]
@c man end
------------------------------------------------------------------------------
gdb - The GNU Debugger
SYNOPSIS
gdb [-help] [-nh] [-nx] [-q] [-batch] [-cd=dir] [-f] [-b bps]
[-tty=dev] [-s symfile] [-e prog] [-se prog] [-c core] [-x cmds]
[-d dir] [prog|core|procID]
DESCRIPTION
The purpose of a debugger such as GDB is to allow you to see what is
------------------------------------------------------------------------------
Thanks,
Jan
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1
2013-04-06 6:47 ` Jan Kratochvil
@ 2013-04-06 6:54 ` Eli Zaretskii
2013-04-06 8:45 ` [commit] " Jan Kratochvil
0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2013-04-06 6:54 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: tromey, gdb-patches
> Date: Fri, 5 Apr 2013 21:42:55 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: tromey@redhat.com, gdb-patches@sourceware.org
>
> Therefore do you find acceptable the initial form I posted?
>
> ------------------------------------------------------------------------------
> @c man begin SYNOPSIS gdb
> gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}]
> [@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}]
> [@option{-b}@w{ }@var{bps}]
> [@option{-tty=}@var{dev}] [@option{-s} @var{symfile}]
> [@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}]
> [@option{-c}@w{ }@var{core}] [@option{-x}@w{ }@var{cmds}]
> [@option{-d}@w{ }@var{dir}] [@var{prog} [@var{core}]|@var{procID}]
> @c man end
> ------------------------------------------------------------------------------
> gdb - The GNU Debugger
>
> SYNOPSIS
> gdb [-help] [-nh] [-nx] [-q] [-batch] [-cd=dir] [-f] [-b bps]
> [-tty=dev] [-s symfile] [-e prog] [-se prog] [-c core] [-x cmds]
> [-d dir] [prog|core|procID]
>
> DESCRIPTION
> The purpose of a debugger such as GDB is to allow you to see what is
> ------------------------------------------------------------------------------
Go for it.
Thanks.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [commit] [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1
2013-04-06 6:54 ` Eli Zaretskii
@ 2013-04-06 8:45 ` Jan Kratochvil
0 siblings, 0 replies; 24+ messages in thread
From: Jan Kratochvil @ 2013-04-06 8:45 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: tromey, gdb-patches
On Fri, 05 Apr 2013 21:51:11 +0200, Eli Zaretskii wrote:
> Go for it.
Checked in:
http://sourceware.org/ml/gdb-cvs/2013-04/msg00056.html
Thanks,
Jan
^ permalink raw reply [flat|nested] 24+ messages in thread
* [commit] [doc patch] gdb.1: Add -p PID
2013-04-05 18:40 ` Eli Zaretskii
@ 2013-04-06 9:01 ` Jan Kratochvil
0 siblings, 0 replies; 24+ messages in thread
From: Jan Kratochvil @ 2013-04-06 9:01 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: tromey, gdb-patches
On Fri, 05 Apr 2013 18:08:21 +0200, Eli Zaretskii wrote:
> Fine with me, thanks.
Checked in:
http://sourceware.org/ml/gdb-cvs/2013-04/msg00057.html
Thanks,
Jan
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2013-04-05 20:03 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-11 20:14 [patch+doc] New gdbinit.5 man page Jan Kratochvil
2013-02-12 16:11 ` Eli Zaretskii
2013-02-12 16:22 ` Jan Kratochvil
2013-02-12 21:20 ` Tom Tromey
2013-02-13 17:42 ` Eli Zaretskii
2013-02-19 16:28 ` Jan Kratochvil
2013-02-19 18:03 ` Eli Zaretskii
2013-02-20 8:44 ` Jan Kratochvil
2013-02-20 19:26 ` Eli Zaretskii
2013-04-04 22:09 ` [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1 Jan Kratochvil
2013-04-05 11:47 ` Eli Zaretskii
2013-04-05 13:03 ` Jan Kratochvil
2013-04-05 13:03 ` Eli Zaretskii
2013-04-05 17:50 ` Jan Kratochvil
2013-04-05 16:33 ` Jan Kratochvil
2013-04-05 18:13 ` [doc patch] gdb.1: Add -p PID Jan Kratochvil
2013-04-05 18:40 ` Eli Zaretskii
2013-04-06 9:01 ` [commit] " Jan Kratochvil
2013-04-05 18:29 ` [patchv2+doc] New gdbinit.5 man page + converted gdb.1+gdbserver.1 Eli Zaretskii
2013-04-05 19:06 ` Jan Kratochvil
2013-04-05 19:43 ` Eli Zaretskii
2013-04-06 6:47 ` Jan Kratochvil
2013-04-06 6:54 ` Eli Zaretskii
2013-04-06 8:45 ` [commit] " Jan Kratochvil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox