aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc/gdb.texinfo
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2019-03-30 12:58:33 +0300
committerEli Zaretskii <eliz@gnu.org>2019-03-30 12:58:33 +0300
commit7734102d6d8b5a0ccea166f8e944f84dc896b9ae (patch)
treed5badcb54e32b5979a785ef7ead0254d5fc2658d /gdb/doc/gdb.texinfo
parentc6f03bce79fd93f152749e2a299a03ab78421f5f (diff)
downloadgdb-7734102d6d8b5a0ccea166f8e944f84dc896b9ae.zip
gdb-7734102d6d8b5a0ccea166f8e944f84dc896b9ae.tar.gz
gdb-7734102d6d8b5a0ccea166f8e944f84dc896b9ae.tar.bz2
Introduce new convenience variables $_gdb_major and $_gdb_minor
gdb/ChangeLog: 2019-03-30 Eli Zaretskii <eliz@gnu.org> * NEWS: Announce $_gdb_major and $_gdb_minor. * top.c (init_gdb_version_vars): New function. (gdb_init): Call init_gdb_version_vars. gdb/testsuite/ChangeLog: 2019-03-30 Simon Marchi <simark@simark.ca> * gdb.base/default.exp: Add values for $_gdb_major and $_gdb_minor. gdb/doc/ChangeLog: 2019-03-30 Eli Zaretskii <eliz@gnu.org> * gdb.texinfo (Convenience Vars): Document $_gdb_major and $_gdb_minor.
Diffstat (limited to 'gdb/doc/gdb.texinfo')
-rw-r--r--gdb/doc/gdb.texinfo13
1 files changed, 12 insertions, 1 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 4c1d5e8..bb958cf 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -11197,7 +11197,7 @@ For example, it will be empty before you execute the @code{run} command.
@vindex $_tlb@r{, convenience variable}
The variable @code{$_tlb} is automatically set when debugging
applications running on MS-Windows in native mode or connected to
-gdbserver that supports the @code{qGetTIBAddr} request.
+gdbserver that supports the @code{qGetTIBAddr} request.
@xref{General Query Packets}.
This variable contains the address of the thread information block.
@@ -11211,6 +11211,17 @@ The thread number of the current thread. @xref{thread numbers}.
@item $_gthread
The global number of the current thread. @xref{global thread numbers}.
+@item $_gdb_major
+@itemx $_gdb_minor
+@vindex $_gdb_major@r{, convenience variable}
+@vindex $_gdb_minor@r{, convenience variable}
+The major and minor version numbers of the running @value{GDBN}.
+Development snapshots and pretest versions have their minor version
+incremented by one; thus, @value{GDBN} pretest 9.11.90 will produce
+the value 12 for @code{$_gdb_minor}. These variables allow you to
+write scripts that work with different versions of @value{GDBN}
+without errors caused by features unavailable in some of those
+versions.
@end table
@node Convenience Funs