Consider the following gdb commands that output the same text string.
(gdb) print foo
(gdb) python print(gdb.lookup_symbol('foo'))
In this case gdb.lookup_symbol()
returns a gdb.Value()
instance as expected, and the stringification of it is equivalent to the default gdb stringification.
But now consider the following equivalent case:
(gdb) print *&foo
The *&
is a noop, but trying to use gdb.lookup_symbol('*&foo')
does not work. So my question is whether it is possible to make use of gdb's command line dereferencing parser from python, and then get a gdb.Value
in return?