This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
MI command -stack-list-locals
- From: Nick Roberts <nick at nick dot uklinux dot net>
- To: gdb at sources dot redhat dot com
- Date: Thu, 6 Nov 2003 22:04:22 +0000
- Subject: MI command -stack-list-locals
As part of the transition from annotations to GDB/MI in Emacs, I would like
to extend the MI command -stack-list-locals.
Insight appears to display watch expressions and local variables in the same
way, where the values of arrays and structures can be expanded or contracted
with a mouse click. Perhaps it creates variable objects for both. GDB/MI,
however, either prints just the names of the locals, or their names and all
of their values i.e. entire structures and arrays. This can be a nuisance
with large arrays or structures and I would like to extend -stack-list-locals
to do the following:
1) Display the name and value for simple data types.
2) Display the name and type for complex data types.
e.g with the local variables:
int i, m[10];
struct {
int j;
int k;
} values;
the output for "-stack-list-locals 2", say, would be:
^done,locals=[{name="i",value="5"},
{name="m",type="int [10]"}
{name="values",type="struct {...}"}]
Then the user could examine an array or structure in more detail by creating a
variable object for it (through a mouse click on its name). Currently, I use
the speedbar for watch expressions and Emacs only allows there to be one. This
means that watch expressions and (expanded/contracted) local variables must
share it.
As this modification to -stack-list-locals won't be easy for me to implement,
I am looking for some reassurance that such a change, subject to the usual
requirements, would be accepted.
Nick http://www.nick.uklinux.net