]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Support dynamically computed convenience variables in get_internalvar_integer
authorHannes Domani <ssbssa@yahoo.de>
Tue, 12 Dec 2023 14:53:12 +0000 (15:53 +0100)
committerHannes Domani <ssbssa@yahoo.de>
Tue, 12 Dec 2023 14:53:12 +0000 (15:53 +0100)
commit52e0b52e6f2dc1dc5a7b95740d22fd616241db67
tree49d9ae9071c9205acafc1148c5acafc4cde5b1ea
parent0804d18a023575ec65e5139703f600fcb0391c89
Support dynamically computed convenience variables in get_internalvar_integer

When using $_thread in info threads to showonly the current thread,
you get this error:
```
(gdb) info thread $_thread
Convenience variable must have integer value.
Args must be numbers or '$' variables.
```

It's because $_thread is a dynamically computed convenience
variable, which isn't supported yet by get_internalvar_integer.

Now the output looks like this:
```
(gdb) info threads $_thread
  Id   Target Id           Frame
* 1    Thread 10640.0x2680 main () at C:/src/repos/binutils-gdb.git/gdb/testsuite/gdb.base/gdbvars.c:21
```

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=17600
Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.base/gdbvars.exp
gdb/thread.c
gdb/value.c