public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug tui/17849] New: Showing local variables in gdb tui window
@ 2015-01-17 17:41 hlin117 at gmail dot com
  2015-07-02 14:11 ` [Bug tui/17849] " palves at redhat dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: hlin117 at gmail dot com @ 2015-01-17 17:41 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=17849

            Bug ID: 17849
           Summary: Showing local variables in gdb tui window
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: tui
          Assignee: unassigned at sourceware dot org
          Reporter: hlin117 at gmail dot com

Created attachment 8068
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8068&action=edit
An image of lldb's gui, while a program is running.

In gdb, a user could input `info locals` to show the current local variables,
but it would be convenient if in tui mode, we could see the local variables in
a separate window. 

Furthermore, it would be convenient if a user could see the attributes of an
object, if an object is a local variable.

lldb somewhat already implements this feature, when you run lldb's gui. lldb's
gui is not officially documented, nor is it the main focus of lldb's
production. However, some of the functionality is there, and it would be nice
if gdb implemented this functionality as well.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug tui/17849] Showing local variables in gdb tui window
  2015-01-17 17:41 [Bug tui/17849] New: Showing local variables in gdb tui window hlin117 at gmail dot com
@ 2015-07-02 14:11 ` palves at redhat dot com
  2021-03-14 17:44 ` paulbuxton.mail at googlemail dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: palves at redhat dot com @ 2015-07-02 14:11 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=17849

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |palves at redhat dot com

--- Comment #1 from Pedro Alves <palves at redhat dot com> ---
Agreed.  There's lot of neat stuff we could do with the TUI, but, as always, it
takes someone motivated enough to go and do it.  *hint, hint*

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug tui/17849] Showing local variables in gdb tui window
  2015-01-17 17:41 [Bug tui/17849] New: Showing local variables in gdb tui window hlin117 at gmail dot com
  2015-07-02 14:11 ` [Bug tui/17849] " palves at redhat dot com
@ 2021-03-14 17:44 ` paulbuxton.mail at googlemail dot com
  2021-03-14 18:53 ` tromey at sourceware dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paulbuxton.mail at googlemail dot com @ 2021-03-14 17:44 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=17849

Paul Buxton <paulbuxton.mail at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |paulbuxton.mail@googlemail.
                   |                            |com

--- Comment #6 from Paul Buxton <paulbuxton.mail at googlemail dot com> ---
I have just implemented this as a python plugin here.
https://github.com/buxtonpaul/gdbwatches
This implements both local variable watching, as well as expressions.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug tui/17849] Showing local variables in gdb tui window
  2015-01-17 17:41 [Bug tui/17849] New: Showing local variables in gdb tui window hlin117 at gmail dot com
  2015-07-02 14:11 ` [Bug tui/17849] " palves at redhat dot com
  2021-03-14 17:44 ` paulbuxton.mail at googlemail dot com
@ 2021-03-14 18:53 ` tromey at sourceware dot org
  2021-03-15  7:56 ` paulbuxton.mail at googlemail dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tromey at sourceware dot org @ 2021-03-14 18:53 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=17849

--- Comment #7 from Tom Tromey <tromey at sourceware dot org> ---
There's also this thread
https://sourceware.org/pipermail/gdb-patches/2021-March/176816.html

It would be great to compare the two.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug tui/17849] Showing local variables in gdb tui window
  2015-01-17 17:41 [Bug tui/17849] New: Showing local variables in gdb tui window hlin117 at gmail dot com
                   ` (2 preceding siblings ...)
  2021-03-14 18:53 ` tromey at sourceware dot org
@ 2021-03-15  7:56 ` paulbuxton.mail at googlemail dot com
  2021-03-17 17:11 ` ssbssa at sourceware dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paulbuxton.mail at googlemail dot com @ 2021-03-15  7:56 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=17849

--- Comment #8 from Paul Buxton <paulbuxton.mail at googlemail dot com> ---
Doh!
Pipped to the post by a week! :-)

It looks like Hannes implementation is much more complete and polished.
Mine was mostly just a weekend experiment. I do think there is value in
having a variables window 'disconnected' from display behaviour though. My
watches window (which might be confusingly named) maintains it's own list
of statements to parse_and_eval. If others think this is worthwhile I would
be happy to update it and send it in for contribution?

Paul


On Sun, Mar 14, 2021 at 6:53 PM tromey at sourceware dot org <
sourceware-bugzilla@sourceware.org> wrote:

> https://sourceware.org/bugzilla/show_bug.cgi?id=17849
>
> --- Comment #7 from Tom Tromey <tromey at sourceware dot org> ---
> There's also this thread
> https://sourceware.org/pipermail/gdb-patches/2021-March/176816.html
>
> It would be great to compare the two.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug tui/17849] Showing local variables in gdb tui window
  2015-01-17 17:41 [Bug tui/17849] New: Showing local variables in gdb tui window hlin117 at gmail dot com
                   ` (3 preceding siblings ...)
  2021-03-15  7:56 ` paulbuxton.mail at googlemail dot com
@ 2021-03-17 17:11 ` ssbssa at sourceware dot org
  2023-06-17 17:41 ` tromey at sourceware dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ssbssa at sourceware dot org @ 2021-03-17 17:11 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=17849

Hannes Domani <ssbssa at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ssbssa at sourceware dot org

--- Comment #9 from Hannes Domani <ssbssa at sourceware dot org> ---
(In reply to Paul Buxton from comment #8)
> It looks like Hannes implementation is much more complete and polished.
> Mine was mostly just a weekend experiment. I do think there is value in
> having a variables window 'disconnected' from display behaviour though. My
> watches window (which might be confusingly named) maintains it's own list
> of statements to parse_and_eval. If others think this is worthwhile I would
> be happy to update it and send it in for contribution?

At first I also didn't use the display variables, and instead had a 'watch'
window, and corresponding commands 'watch-add' and 'watch-del', very similar to
yours.
The main reason I changed this to the display variables was that you don't need
to remember new commands.
Also, the display command knows which frame an expression belongs to.

But it would be easy to re-add the watch window, I just need to derive it from
the VariableWindow class, containing a variables() function which returns the
statements+values.
I already had this kind of stuff in mind, in case someone wanted multiple watch
windows, or other custom variable windows (like if you are in a python frame,
show the local python variables).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug tui/17849] Showing local variables in gdb tui window
  2015-01-17 17:41 [Bug tui/17849] New: Showing local variables in gdb tui window hlin117 at gmail dot com
                   ` (4 preceding siblings ...)
  2021-03-17 17:11 ` ssbssa at sourceware dot org
@ 2023-06-17 17:41 ` tromey at sourceware dot org
  2023-06-18  6:59 ` paulbuxton.mail at googlemail dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tromey at sourceware dot org @ 2023-06-17 17:41 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=17849

--- Comment #10 from Tom Tromey <tromey at sourceware dot org> ---
What's the state of this patch?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug tui/17849] Showing local variables in gdb tui window
  2015-01-17 17:41 [Bug tui/17849] New: Showing local variables in gdb tui window hlin117 at gmail dot com
                   ` (5 preceding siblings ...)
  2023-06-17 17:41 ` tromey at sourceware dot org
@ 2023-06-18  6:59 ` paulbuxton.mail at googlemail dot com
  2023-11-03 17:52 ` paulbuxton.mail at googlemail dot com
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paulbuxton.mail at googlemail dot com @ 2023-06-18  6:59 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=17849

--- Comment #11 from Paul Buxton <paulbuxton.mail at googlemail dot com> ---
I had stopped looking as I thought Hannes patch covered the functionality
already. I will try and have a look in the next week or so.


On Sat, Jun 17, 2023 at 6:41 PM tromey at sourceware dot org <
sourceware-bugzilla@sourceware.org> wrote:

> https://sourceware.org/bugzilla/show_bug.cgi?id=17849
>
> --- Comment #10 from Tom Tromey <tromey at sourceware dot org> ---
> What's the state of this patch?
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug tui/17849] Showing local variables in gdb tui window
  2015-01-17 17:41 [Bug tui/17849] New: Showing local variables in gdb tui window hlin117 at gmail dot com
                   ` (6 preceding siblings ...)
  2023-06-18  6:59 ` paulbuxton.mail at googlemail dot com
@ 2023-11-03 17:52 ` paulbuxton.mail at googlemail dot com
  2023-11-11 16:41 ` tromey at sourceware dot org
  2023-11-11 22:45 ` ssbssa at sourceware dot org
  9 siblings, 0 replies; 11+ messages in thread
From: paulbuxton.mail at googlemail dot com @ 2023-11-03 17:52 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=17849

--- Comment #12 from Paul Buxton <paulbuxton.mail at googlemail dot com> ---
Ok finally got around to checking things out. It looks like Hannes series
of patches were not merged, not sure why?

If the locals/watched  support is something that is still of interest I can
checkout the source and test my code to see if it still works and then
figure out the proper format/location to submit it as a patch.

Paul



On Sun, Jun 18, 2023 at 7:59 AM Paul Buxton <paulbuxton.mail@googlemail.com>
wrote:

> I had stopped looking as I thought Hannes patch covered the functionality
> already. I will try and have a look in the next week or so.
>
>
> On Sat, Jun 17, 2023 at 6:41 PM tromey at sourceware dot org <
> sourceware-bugzilla@sourceware.org> wrote:
>
>> https://sourceware.org/bugzilla/show_bug.cgi?id=17849
>>
>> --- Comment #10 from Tom Tromey <tromey at sourceware dot org> ---
>> What's the state of this patch?
>>
>> --
>> You are receiving this mail because:
>> You are on the CC list for the bug.
>
>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug tui/17849] Showing local variables in gdb tui window
  2015-01-17 17:41 [Bug tui/17849] New: Showing local variables in gdb tui window hlin117 at gmail dot com
                   ` (7 preceding siblings ...)
  2023-11-03 17:52 ` paulbuxton.mail at googlemail dot com
@ 2023-11-11 16:41 ` tromey at sourceware dot org
  2023-11-11 22:45 ` ssbssa at sourceware dot org
  9 siblings, 0 replies; 11+ messages in thread
From: tromey at sourceware dot org @ 2023-11-11 16:41 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=17849

--- Comment #13 from Tom Tromey <tromey at sourceware dot org> ---
(In reply to Paul Buxton from comment #12)

> Ok finally got around to checking things out. It looks like Hannes series
> of patches were not merged, not sure why?

Not sure.  IIRC there were some review comments?

> If the locals/watched  support is something that is still of interest I can
> checkout the source and test my code to see if it still works and then
> figure out the proper format/location to submit it as a patch.

I took a quick look at your code.
I'm not sure about using 'info locals' to make the output.
It could be done in a more "programmatic" way using some
infrastructure in the new DAP code -- inspecting scopes,
using pretty-printers, etc.

Another thought is whether the TUI can/should hook into the
existing "display" mechanism so that displays are routed to
a window.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug tui/17849] Showing local variables in gdb tui window
  2015-01-17 17:41 [Bug tui/17849] New: Showing local variables in gdb tui window hlin117 at gmail dot com
                   ` (8 preceding siblings ...)
  2023-11-11 16:41 ` tromey at sourceware dot org
@ 2023-11-11 22:45 ` ssbssa at sourceware dot org
  9 siblings, 0 replies; 11+ messages in thread
From: ssbssa at sourceware dot org @ 2023-11-11 22:45 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=17849

--- Comment #14 from Hannes Domani <ssbssa at sourceware dot org> ---
(In reply to Tom Tromey from comment #13)
> (In reply to Paul Buxton from comment #12)
> 
> > Ok finally got around to checking things out. It looks like Hannes series
> > of patches were not merged, not sure why?
> 
> Not sure.  IIRC there were some review comments?

Since there was no more feedback, I gave up after this ping for the v2:
https://sourceware.org/pipermail/gdb-patches/2021-June/180484.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2023-11-11 22:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-17 17:41 [Bug tui/17849] New: Showing local variables in gdb tui window hlin117 at gmail dot com
2015-07-02 14:11 ` [Bug tui/17849] " palves at redhat dot com
2021-03-14 17:44 ` paulbuxton.mail at googlemail dot com
2021-03-14 18:53 ` tromey at sourceware dot org
2021-03-15  7:56 ` paulbuxton.mail at googlemail dot com
2021-03-17 17:11 ` ssbssa at sourceware dot org
2023-06-17 17:41 ` tromey at sourceware dot org
2023-06-18  6:59 ` paulbuxton.mail at googlemail dot com
2023-11-03 17:52 ` paulbuxton.mail at googlemail dot com
2023-11-11 16:41 ` tromey at sourceware dot org
2023-11-11 22:45 ` ssbssa at sourceware dot org

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).