Skip to content

Jumpy output #178

@stefanct

Description

@stefanct

As briefly discussed in #59 and #174 the unsteadiness of the output due to dynamically resized panes and the unavoidable output of gdb is a PITA when single-stepping and staring at e.g. variable numbers while they are jumping up and down a few lines.

The only known way to get rid of the Output/messages pane (where messages from GDBs interactive console are printed) - without patching GDB directly - is to use a separate terminal window for dashboard's output via the dashboard -output command. Setting this up for every session is tedious so I automated it:

An additional GDB init script launches a dedicated terminal window automatically by GDB at startup (and cleaned up when it shuts down too). This window is resized to my taste (resized to half the monitor width and snapped to the right) and focus is given back to the window where GDB was launched initially. In a more generic solution the window geometry should probably be configurable including the actual terminal application to use. (The latter is not as easy as one would hope for.) The implementation relies on the wmctrl binary for some of the X11-related operations that I could not implement via xlib or GDK (I tried but this hack took me already waaaaay longer than I would have liked).

Additionally, the script sets a GDB convenience variable named tty to the pty slave (aka PTS) of the new terminal. This variable can then be used as argument to the dashboard -output command (which I do in my "theme"/dashboard customization script). A small change is needed to .gdbinit itself to make this working because the current gdb-dashboard code cannot handle GDB convenience variables. In my hack this functionality is added to the -output command only but it might prove beneficial in other commands as well if there is the need to communicate between scripts (thus I have not submitted it as merge request).

All of the above allows us to keep interacting with GDB's console as before but shows the dashboard output in a distinct window where all the other panes reside. All remaining jumpiness of these panes is due to the lack of fixed- or minimum-sized gdb-dashboard panes whose implementation I hope to motivate a bit with this report ;)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions