read VARIABLE_STRING and "BytesAt" via GDB API
... instead of executing multiple user commands and parse/concat their output
This removes a bunch of rather complex code and heavily improves the time for this part, which is of course quite relative; on a fast machine my benchmarking which uses
begin = time.time()
code
print ("var lookup took", time.time() - begin)
I've got down from 0.14-0.18 seconds to 0.0004-0.0006.
Tested on RHEL7 with GDB 7.6 and 9.2 and python2.7 and on CentOS7 with those and with python 3.6.
Edited by Simon Sobisch