* GUD/GDB in emacs
@ 2008-07-16 22:42 Richard G Riley
2008-07-16 23:57 ` Nick Roberts
[not found] ` <mailman.14873.1216252651.18990.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 6+ messages in thread
From: Richard G Riley @ 2008-07-16 22:42 UTC (permalink / raw)
To: help-gnu-emacs
When using GUD, can one embed a dereference into one of the panes?
Currently I can only see *p, for example, if I make it a watch point and
enable the speedbar which is a horrendous waste of screen real
estate. Sure I can "display *p" in the *gud* buffer but thats pretty
horrible since it all scrolls past. Any hints or tips and/or references
to good GUD tutorials appreciated.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GUD/GDB in emacs
2008-07-16 22:42 GUD/GDB in emacs Richard G Riley
@ 2008-07-16 23:57 ` Nick Roberts
[not found] ` <mailman.14873.1216252651.18990.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 6+ messages in thread
From: Nick Roberts @ 2008-07-16 23:57 UTC (permalink / raw)
To: Richard G Riley; +Cc: help-gnu-emacs
> When using GUD, can one embed a dereference into one of the panes?
I'm not sure what you mean exactly. Maybe expand a node in situ in the
locals buffer, for example.
> Currently I can only see *p, for example, if I make it a watch point and
> enable the speedbar which is a horrendous waste of screen real
> estate.
If ECB gets integrated into Emacs, I plan to use tree-buffer.el for watch
expressions instead of the speedbar but I think that they will always need
their own buffer.
> Sure I can "display *p" in the *gud* buffer but thats pretty
> horrible since it all scrolls past. Any hints or tips and/or references
> to good GUD tutorials appreciated.
I think some debuggers use tooltips to expand expressions but I'm not sure
how that works.
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GUD/GDB in emacs
[not found] ` <mailman.14873.1216252651.18990.help-gnu-emacs@gnu.org>
@ 2008-07-17 0:11 ` Richard G Riley
2008-07-17 20:46 ` Nick Roberts
[not found] ` <mailman.14905.1216329307.18990.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 6+ messages in thread
From: Richard G Riley @ 2008-07-17 0:11 UTC (permalink / raw)
To: help-gnu-emacs
Nick Roberts <nickrob@snap.net.nz> writes:
> > When using GUD, can one embed a dereference into one of the panes?
>
> I'm not sure what you mean exactly. Maybe expand a node in situ in the
> locals buffer, for example.
That would seem the obvious solution and is the case in other IDEs. e.g
you see "p" in the locals (where p is a pointer to a struct for example)
and then can see the struct by double clicking it for example. Pretty
much what the speedbar does but without the speed bar. (As an aside, if
I mouseclick 2 on a local in the locals buffer then its added to the
speedbar as a watch - it would be more consistent I think if "watch p"
from the gdb command line also did the same if the speedbar is in use,
what do you think?).
>
> > Currently I can only see *p, for example, if I make it a watch point and
> > enable the speedbar which is a horrendous waste of screen real
> > estate.
>
> If ECB gets integrated into Emacs, I plan to use tree-buffer.el for watch
> expressions instead of the speedbar but I think that they will always need
> their own buffer.
A tree view would be nice in the locals pane or a special watch pane.
>
> > Sure I can "display *p" in the *gud* buffer but thats pretty
> > horrible since it all scrolls past. Any hints or tips and/or references
> > to good GUD tutorials appreciated.
>
> I think some debuggers use tooltips to expand expressions but I'm not sure
> how that works.
Some do, but they are not convenient or "static" enough. If I have a
pointer in a loop and step around the loop I would like, reasonably
enough I think, to see the pointed to structure change as "p" changes or
its dereferenced contents change. Certainly a tooltip is not the best
for a struct of more than one or two elements.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GUD/GDB in emacs
2008-07-17 0:11 ` Richard G Riley
@ 2008-07-17 20:46 ` Nick Roberts
[not found] ` <mailman.14905.1216329307.18990.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 6+ messages in thread
From: Nick Roberts @ 2008-07-17 20:46 UTC (permalink / raw)
To: Richard G Riley; +Cc: help-gnu-emacs
> > I'm not sure what you mean exactly. Maybe expand a node in situ in the
> > locals buffer, for example.
>
> That would seem the obvious solution and is the case in other IDEs. e.g
> you see "p" in the locals (where p is a pointer to a struct for example)
> and then can see the struct by double clicking it for example. Pretty
> much what the speedbar does but without the speed bar.
I think Insight does this but ISTR Totalview uses a separate frame. Expanding
in situ makes it harder to find the other locals. In fact I'm thinking of
using a separate frame for each watch expression, something which isn't really
possible with the speedbar. This would be helpful for arrays and large
structures.
> (As an aside, if
> I mouseclick 2 on a local in the locals buffer then its added to the
> speedbar as a watch - it would be more consistent I think if "watch p"
> from the gdb command line also did the same if the speedbar is in use,
> what do you think?).
The GDB command "watch" means something else (it sets watchpoint, rather than
creating a "watch expression"). Watch expressions are created using something
GDB calls "Variable Objects" and they are created using GDB/MI commands
intended for the frontend only. I'm not sure that there is much benefit in
making this functionality available to the command line. Note if you want
to supply an argument for a watch expression, you can do C-u C-c C-w from the
GUD buffer or C-u C-x C-a C-w from any other.
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GUD/GDB in emacs
[not found] ` <mailman.14905.1216329307.18990.help-gnu-emacs@gnu.org>
@ 2008-07-18 8:30 ` Richard G Riley
2008-07-19 2:03 ` Nick Roberts
0 siblings, 1 reply; 6+ messages in thread
From: Richard G Riley @ 2008-07-18 8:30 UTC (permalink / raw)
To: help-gnu-emacs
Nick Roberts <nickrob@snap.net.nz> writes:
> > > I'm not sure what you mean exactly. Maybe expand a node in situ in the
> > > locals buffer, for example.
> >
> > That would seem the obvious solution and is the case in other IDEs. e.g
> > you see "p" in the locals (where p is a pointer to a struct for example)
> > and then can see the struct by double clicking it for example. Pretty
> > much what the speedbar does but without the speed bar.
>
>
> I think Insight does this but ISTR Totalview uses a separate frame.
> Expanding
I'm not familiar with these things. They are Emacs packages?
> in situ makes it harder to find the other locals. In fact I'm
> thinking of
Expand, shrink. They only impede if you expand them. If you expand them
they are expanded for a reason generally. But as you point out below the
vocab we are using (because of what is there) can confuse us. "Watch" in
this case is the only apparent way to expand a pointer to a struct. We
should really just be discussing how to view a dereferenced pointer -
DDD does this quite nicely. But being an Emacs convert it would be nice
to have the same, or similar, in the GUD interface.
> using a separate frame for each watch expression, something which isn't really
> possible with the speedbar. This would be helpful for arrays and large
> structures.
A separate frame for each expression would be a collossal waste of
screen real estate and possibly worse than the current speed bar
implementation IMO.
>
> > (As an aside, if
> > I mouseclick 2 on a local in the locals buffer then its added to the
> > speedbar as a watch - it would be more consistent I think if "watch p"
> > from the gdb command line also did the same if the speedbar is in use,
> > what do you think?).
>
>
> The GDB command "watch" means something else (it sets watchpoint, rather than
> creating a "watch expression"). Watch expressions are created using something
> GDB calls "Variable Objects" and they are created using GDB/MI commands
> intended for the frontend only. I'm not sure that there is much benefit in
> making this functionality available to the command line. Note if you want
> to supply an argument for a watch expression, you can do C-u C-c C-w from the
> GUD buffer or C-u C-x C-a C-w from any other.
I think I agree that yes, this is how it is at the moment. I'm just
getting familiar with it but the bottom line, for me, is that the
inability to easily see the contents of a pointed to struct (and I am
admittedly talking C here), is a major limitation in the otherwise
excellent emacs interface to GDB.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GUD/GDB in emacs
2008-07-18 8:30 ` Richard G Riley
@ 2008-07-19 2:03 ` Nick Roberts
0 siblings, 0 replies; 6+ messages in thread
From: Nick Roberts @ 2008-07-19 2:03 UTC (permalink / raw)
To: Richard G Riley; +Cc: help-gnu-emacs
Richard G Riley writes:
> Nick Roberts <nickrob@snap.net.nz> writes:
>
> > > > I'm not sure what you mean exactly. Maybe expand a node in situ in the
> > > > locals buffer, for example.
> > >
> > > That would seem the obvious solution and is the case in other IDEs. e.g
> > > you see "p" in the locals (where p is a pointer to a struct for example)
> > > and then can see the struct by double clicking it for example. Pretty
> > > much what the speedbar does but without the speed bar.
> >
> >
> > I think Insight does this but ISTR Totalview uses a separate frame.
> > Expanding
>
> I'm not familiar with these things. They are Emacs packages?
No, they're debuggers.
> > in situ makes it harder to find the other locals. In fact I'm
> > thinking of
>
> Expand, shrink. They only impede if you expand them. If you expand them
> they are expanded for a reason generally. But as you point out below the
> vocab we are using (because of what is there) can confuse us. "Watch" in
> this case is the only apparent way to expand a pointer to a struct. We
> should really just be discussing how to view a dereferenced pointer -
> DDD does this quite nicely. But being an Emacs convert it would be nice
> to have the same, or similar, in the GUD interface.
I've not used DDD much but I found the data window (= watch expressions?)
awkward. You can view structures in the GUD buffer with "set print pretty"
and the "print" command (also on the tool bar and C-x C-a C-p).
> > using a separate frame for each watch expression, something which isn't
> > really possible with the speedbar. This would be helpful for arrays and
> > large structures.
>
> A separate frame for each expression would be a collossal waste of
> screen real estate and possibly worse than the current speed bar
> implementation IMO.
As you say, they only impede if you expand them. Data structures can be large
and need their own frame/window. It would also be a way to limit the number
of children that need to be created.
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-07-19 2:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-16 22:42 GUD/GDB in emacs Richard G Riley
2008-07-16 23:57 ` Nick Roberts
[not found] ` <mailman.14873.1216252651.18990.help-gnu-emacs@gnu.org>
2008-07-17 0:11 ` Richard G Riley
2008-07-17 20:46 ` Nick Roberts
[not found] ` <mailman.14905.1216329307.18990.help-gnu-emacs@gnu.org>
2008-07-18 8:30 ` Richard G Riley
2008-07-19 2:03 ` Nick Roberts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).