This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] New test+use texinfo @click - @HAVE_MAKEINFO_CLICK@ [Re: doc build failure (Re: [patch 04/12] entryval#3: Virtual tail call frames)]


On Mon, 10 Oct 2011 17:51:00 +0200, Pedro Alves wrote:
> The "doesn't justify the extra maintenance burden" is always a valid
> excuse.  But if you and Eli think it justifies it, go for it.

Attached.  In info document it looks the same, in PDF it looks very similar.


Thanks,
Jan


gdb/
2011-10-10  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Fix compatibility with texinfo versions older than 4.12.
	* configure: Regenerate.
	* configure.ac (HAVE_MAKEINFO_CLICK): New test for AC_SUBST.

gdb/doc/
2011-10-10  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Fix compatibility with texinfo versions older than 4.12.
	* Makefile.in (MAKEINFO): Add @HAVE_MAKEINFO_CLICK@.
	* gdb.texinfo (Tail Call Frames): Convert @arrow{} to @click, when possible.
	Make the conversion conditional on HAVE_MAKEINFO_CLICK, using variables
	CALLSEQ1A, CALLSEQ1B, CALLSEQ2A and CALLSEQ2B.

--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -2179,6 +2179,20 @@ dnl  At the moment, we just assume it's UTF-8.
 AC_DEFINE(GDB_DEFAULT_HOST_CHARSET, "UTF-8",
           [Define to be a string naming the default host character set.])
 
+AC_CACHE_CHECK([whether makeinfo supports @click], gdb_cv_have_makeinfo_click,
+  [echo '@clicksequence{a @click{} b}' >conftest.texinfo
+  if makeinfo conftest.texinfo >&5 2>&5; then
+    gdb_cv_have_makeinfo_click=yes
+  else
+    gdb_cv_have_makeinfo_click=no
+  fi])
+if test x"$gdb_cv_have_makeinfo_click" = xyes; then
+  HAVE_MAKEINFO_CLICK="-DHAVE_MAKEINFO_CLICK"
+else
+  HAVE_MAKEINFO_CLICK=""
+fi
+AC_SUBST(HAVE_MAKEINFO_CLICK)
+
 AC_OUTPUT(Makefile .gdbinit:gdbinit.in doc/Makefile gnulib/Makefile data-directory/Makefile,
 [
 case x$CONFIG_HEADERS in
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -45,7 +45,7 @@ gdbdir = $(srcdir)/..
 TEXIDIR=${gdbdir}/../texinfo
 
 # where to find makeinfo, preferably one designed for texinfo-2
-MAKEINFO=makeinfo
+MAKEINFO=makeinfo @HAVE_MAKEINFO_CLICK@
 
 MAKEHTML = $(MAKEINFO) --html 
 MAKEHTMLFLAGS =
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -9789,11 +9789,24 @@ tailcall: reduced: 0x4004d2(a) |
 #2  0x0000000000400395 in main () at t.c:9
 @end smallexample
 
-Frames #0 and #2 are real, #1 is a virtual tail call frame.  The code can have
-possible execution paths
-@code{main@arrow{}a@arrow{}b@arrow{}c@arrow{}d@arrow{}f} or
-@code{main@arrow{}a@arrow{}b@arrow{}e@arrow{}f}, @value{GDBN} cannot find which
-one from the inferior state.
+@set CALLSEQ1A @code{main@value{ARROW}a@value{ARROW}b@value{ARROW}c@value{ARROW}d@value{ARROW}f}
+@set CALLSEQ2A @code{main@value{ARROW}a@value{ARROW}b@value{ARROW}e@value{ARROW}f}
+
+@c Convert CALLSEQ#A to CALLSEQ#B depending on HAVE_MAKEINFO_CLICK.
+@ifset HAVE_MAKEINFO_CLICK
+@set ARROW @click{}
+@set CALLSEQ1B @clicksequence{@value{CALLSEQ1A}}
+@set CALLSEQ2B @clicksequence{@value{CALLSEQ2A}}
+@end ifset
+@ifclear HAVE_MAKEINFO_CLICK
+@set ARROW ->
+@set CALLSEQ1B @value{CALLSEQ1A}
+@set CALLSEQ2B @value{CALLSEQ2A}
+@end ifclear
+
+Frames #0 and #2 are real, #1 is a virtual tail call frame.
+The code can have possible execution paths @value{CALLSEQ1B} or
+@value{CALLSEQ2B}, @value{GDBN} cannot find which one from the inferior state.
 
 @code{initial:} state shows some random possible calling sequence @value{GDBN}
 has found.  It then finds another possible calling sequcen - that one is


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]