Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* MI command -stack-list-locals
@ 2003-11-06 21:11 Nick Roberts
  2003-11-14  0:19 ` Jason Molenda
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Roberts @ 2003-11-06 21:11 UTC (permalink / raw)
  To: gdb


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-11-17 21:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-06 21:11 MI command -stack-list-locals Nick Roberts
2003-11-14  0:19 ` Jason Molenda
2003-11-14 23:17   ` Nick Roberts
2003-11-17 20:39     ` Alain Magloire
2003-11-17 21:12       ` Jason Molenda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox