Discussion:
[Bug tui/18932] New: list command doesn't work in TUI any more
ssbssa at yahoo dot de
2015-09-07 17:02:39 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=18932

Bug ID: 18932
Summary: list command doesn't work in TUI any more
Product: gdb
Version: 7.10
Status: NEW
Severity: normal
Priority: P2
Component: tui
Assignee: unassigned at sourceware dot org
Reporter: ssbssa at yahoo dot de
Target Milestone: ---

Before (up to 7.9) the list command updated the source window contents.
Now it returns to the current frame position.

On the other hand the frame command without argument now doesn't move to the
current frame position any more.

I'm pretty sure it started from this commit:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;f=gdb/tui/tui-hooks.c;h=0986c744dfecb8177de90020646090e9ed23cfe7

When setting a breakpoint at tui_before_prompt() you see that the list command
actually does work, but tui_refresh_frame_and_register_information() then
immediately jumps back to the current frame position.
--
You are receiving this mail because:
You are on the CC list for the bug.
ssbssa at yahoo dot de
2015-09-07 17:04:36 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=18932

Domani Hannes <ssbssa at yahoo dot de> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |ssbssa at yahoo dot de
--
You are receiving this mail because:
You are on the CC list for the bug.
mrfirmware at gmail dot com
2016-07-05 21:00:02 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=18932

Mark Odell <mrfirmware at gmail dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |mrfirmware at gmail dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-02 23:09:08 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=18932

Tom Tromey <tromey at sourceware dot org> changed:

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

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
The way that list interfaces with the TUI is pretty convoluted.
While some other CLI commands have some "if TUI" logic, list
just works the usual way and then relies on the TUI's ui-out
object to understand "fullname"; see tui_ui_out::do_field_string.

Anyway that code just calls tui_show_source, so perhaps that
could just set a flag somewhere.

This doesn't seem hard but I wonder how the TUI would know to
revert to ordinary behavior on stepping.

Perhaps the TUI needs to track the frame id and line number and
then only update the source window when this changes?
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-03 07:05:20 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=18932

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
I wrote a simple patch for this but while playing with it, I noticed
there isn't a good way to get back to the current PC's source.

FWIW my patch is also incomplete because it doesn't properly
track inferior switches.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-08 14:23:50 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=18932

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
I suppose the previous status quo was that there was no way
to get back, either, and you can just do the "up;down" thing.
I've updated my patch to track inferior changes and I'll send it soon.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-08 14:41:56 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=18932

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |tromey at sourceware dot org
--
You are receiving this mail because:
You are on the CC list for the bug.
ssbssa at yahoo dot de
2018-09-08 21:54:48 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=18932

--- Comment #4 from Hannes Domani <ssbssa at yahoo dot de> ---
(In reply to Tom Tromey from comment #3)
Post by tromey at sourceware dot org
I suppose the previous status quo was that there was no way
to get back, either, and you can just do the "up;down" thing.
I always used "frame" to get back.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-08 21:39:09 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=18932

--- Comment #5 from Tom Tromey <tromey at sourceware dot org> ---
(In reply to Hannes Domani from comment #4)
Post by ssbssa at yahoo dot de
I always used "frame" to get back.
Thanks for mentioning that!
I tried it and it does not work with my patch.
So I think there's still a bit of work to do.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-09 03:41:07 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=18932

--- Comment #6 from Tom Tromey <tromey at sourceware dot org> ---
I looked into this a bit and if plain "frame" worked before, I have
no idea how. A lot of this code is really roundabout, so I wouldn't be
surprised if there was some back door I haven't found yet.
It's much more tempting to me to just put a TUI case directly
in the "frame" command. For one thing it would be simpler to
understand. Even a new observer would be better than the way
"list" works.

I'm going to ask others for input before starting down this route though.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...