Add a new $_inferior convenience variable
authorPedro Alves <palves@redhat.com>
Wed, 13 Jan 2016 10:56:05 +0000 (10:56 +0000)
committerPedro Alves <palves@redhat.com>
Wed, 13 Jan 2016 10:56:05 +0000 (10:56 +0000)
commite3940304fe75c91f99e260a89fe8c45ece7e373f
tree676ba36c91a97c1c80964bc8ef566d1cc424b4bb
parenta911d87ad714cbfbbc5c5752cb8b445a7e70196c
Add a new $_inferior convenience variable

Like $_thread, but holds the current inferior number.

gdb/ChangeLog:
2016-01-13  Pedro Alves  <palves@redhat.com>

* NEWS: Mention $_inferior.
* inferior.c (inferior_id_make_value): New.
(inferior_funcs): New.
(_initialize_inferior): Create $_inferior variable.

gdb/testsuite/ChangeLog:
2016-01-13  Pedro Alves  <palves@redhat.com>

* gdb.base/default.exp: Expect $_inferior as well.
* gdb.multi/base.exp: Test $_inferior.

gdb/doc/ChangeLog:
2016-01-13  Pedro Alves  <palves@redhat.com>

* gdb.texinfo (Inferiors and Programs): Document the $_inferior
convenience variable.
(Convenience Vars): Likewise.
gdb/ChangeLog
gdb/NEWS
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/inferior.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/default.exp
gdb/testsuite/gdb.multi/base.exp