aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorLancelot SIX <lsix@lancelotsix.com>2021-01-06 20:58:04 +0000
committerLancelot SIX <lsix@lancelotsix.com>2021-02-02 22:37:39 +0000
commit2e3773ff548f068bddfc6d060524730fcf6823a1 (patch)
tree977640ce31c5cc8c14afb91955cecdb47ba4bc8f /gdb/doc
parente0bd9202fb13262101550d788db536ad5ca55c26 (diff)
downloadfsf-binutils-gdb-2e3773ff548f068bddfc6d060524730fcf6823a1.zip
fsf-binutils-gdb-2e3773ff548f068bddfc6d060524730fcf6823a1.tar.gz
fsf-binutils-gdb-2e3773ff548f068bddfc6d060524730fcf6823a1.tar.bz2
Inferior without argument prints detail of current inferior.
This patch makes the inferior command display information about the current inferior when called with no argument. This behavior is similar to the one of the thread command. Before patch: (gdb) info inferior Num Description Connection Executable * 1 process 19221 1 (native) /home/lsix/tmp/a.out 2 process 19239 1 (native) /home/lsix/tmp/a.out (gdb) inferior 2 [Switching to inferior 2 [process 19239] (/home/lsix/tmp/a.out)] [Switching to thread 2.1 (process 19239)] #0 0x0000000000401146 in main () (gdb) inferior Argument required (expression to compute). After patch: (gdb) info inferior Num Description Connection Executable * 1 process 18699 1 (native) /home/lsix/tmp/a.out 2 process 18705 1 (native) /home/lsix/tmp/a.out (gdb) inferior 2 [Switching to inferior 2 [process 18705] (/home/lsix/tmp/a.out)] [Switching to thread 2.1 (process 18705)] #0 0x0000000000401146 in main () (gdb) inferior [Current inferior is 2 [process 18705] (/home/lsix/tmp/a.out)] gdb/doc/ChangeLog: * gdb.texinfo (Inferiors Connections and Programs): Document the inferior command when used without argument. gdb/ChangeLog: * NEWS: Add entry for the behavior change of the inferior command. * inferior.c (inferior_command): When no argument is given to the inferior command, display info about the currently selected inferior. gdb/testsuite/ChangeLog: * gdb.base/inferior-noarg.c: New test. * gdb.base/inferior-noarg.exp: New test.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdb.texinfo16
2 files changed, 21 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 2d6517d..7b21966 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2021-02-02 Lancelot SIX <lsix@lancelotsix.com>
+
+ * gdb.texinfo (Inferiors Connections and Programs): Document the
+ inferior command when used without argument.
+
2021-01-27 Tom Tromey <tromey@adacore.com>
* gdb.texinfo (Auto-loading extensions): Remove extraneous space.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 84243a7..174fd6d 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -3118,6 +3118,22 @@ For example,
2 process 2307 2 (extended-remote host:10000) hello
@end smallexample
+To get informations about the current inferior, use @code{inferior}:
+
+@table @code
+@kindex inferior
+@item inferior
+Shows information about the current inferior.
+
+For example,
+@end table
+@c end table here to get a little more width for example
+
+@smallexample
+(@value{GDBP}) inferior
+[Current inferior is 1 [process 3401] (helloworld)]
+@end smallexample
+
To find out what open target connections exist at any moment, use
@w{@code{info connections}}: