CGDB 0.7.0 released

163 views
Skip to first unread message

Bob Rossi

unread,
Mar 22, 2017, 9:19:55 AM3/22/17
to cgdb
cgdb-0.7.0 Released
-------------------

This release of CGDB contains many new features and bug fixes.

Many of these features would not have occurred with out the important
contributions from Michael Sartain. Thanks Michael!

Downloading:

Go to http://cgdb.github.io/ for download link and instructions.

This new version contains the following changes:

cgdb-0.7.0 (03/21/2017)

* Remove help2man dependency. CGDB has a good info page which
should suffice.

* The hlsearch option has been added to CGDB. This improves the
searching and displaying of searching functionality within CGDB.
By default the option is off. When enabled, and there exists a
previous search, CGDB will display the search results using
the Search highlighting group. The IncSearch highlighting group
is used to display the active search. The hlsearch option
highlights previous searches in the source window, the gdb window
when in scroll mode and the file dialog window.

* CGDB now supports showing assembly code! By default, CGDB will
display source code when it is available and assembly code
when no source code is available. The option 'set disasm'
allows you to show mixed source/assembly when both are available.

* Add support to enable/disable showing assembly code in CGDB.
The default is disabled. The 'set disasm' enables showing
mixed assembly mode by default. See the documentation for more
information.

* Add the :logo command to cgdb. This tells CGDB to display a logo
in the source window.

* Add an initial Rust syntax highlighter.

* Support vi type <digit>j and <digit>k motions. Previously only
typing j or k with out a number was supported.

* Add support for marks. m[a-z] will set a local file mark and
m[A-Z] will set a global mark. '[a-z] will jump to the
corresponding local mark and '[A-Z] will jump to the corresponding
global mark. As an added bonus '' will jump to the last jump location
and '. will jump to the last executing line.
The showmarks option was introduced to show the marks in the source
window. It defaults to true. You can disable the viewing of marks
using 'set noshowmarks'.

* Add support to enable or disable color in the source window.
The default is enabled. See the documentation for more information.

* Add support for showing colors in the debug window. If gdb or the
program being debugged output an ansi escape code representing color,
https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
then CGDB will display the corresponding color instead of the escape
code. This option is configurable with the set debugwincolor option.

* Add the winminwidth option to CGDB. It controls the minimum width
that a window can be resized. It corresponds to the winminheight
option. This was introduced now that CGDB can have vertically split
windows.

* Add support for vertical or horizontal splitting of the CGDB/GDB
windows. Thanks to Daniel Cohen for the original implementation
of this idea! You can change the window orientation by using the
command 'set winsplitorientation=horizontal or vertical'.
horizontal is the default orientation. Type Ctrl-w to switch between
vertical and horizontal viewing.

* Remove the TTY mode and TTY window from CGDB. This previously allowed
you to send input to the program being debugged through the TTY
window in CGDB. It is better for the user to run their program in
one terminal and attach to it with CGDB from another terminal in
order to get terminal input and terminal output working correctly.

* Add the -w command line option to CGDB. It directs CGDB to wait
to start until either a debugger is attached to it, or until a key
is written to it's stdin. This helps simplify debugging CGDB itself.

* Added GDB scroll mode in addition to the existing GDB command mode.
To enter scroll mode, type 'page up' when in GDB mode and to exit
type 'q', 'i' or 'Enter'. In scroll mode, you can scroll through
the GDB output. You can also search the GDB output with the /, ?, n
and N keys. Marks are also supported. You can set a mark by typing
m[a-z] and you can jump to a mark by typing '[a-z]. See the
documentation for more details.

* Extended support for the G command when in CGDB mode. The new supported
syntax is [<number>]G, allowing users to jump to a specific line within
the source file, rather than just the end of the source file. This is
identical to the :<number> command.

* Added support for 'executinglinedisplay' and 'selectedlinedisplay'
configuration options. See documentation for full explanation.
This allows you to configure how CGDB displays both the currently
executing line and the currently selected line.
The default for executing line is set to longarrow.
The default for selected line is set to block.

The 'arrowstyle' option has been deprecated (but still supported)
and users should use the 'executinglinedisplay' option instead.

* CGDB now only supports ncurses. Support for curses was removed.
The curses support was previously very out of date and untested.
If curses support is needed, please let us know.


Enjoy,
The CGDB Team

Paul Mason

unread,
Mar 23, 2017, 5:25:40 AM3/23/17
to cgdb
What if I want to start the program from the debugger and step through it from the start?

On Wednesday, 22 March 2017 13:19:55 UTC, Bob Rossi wrote:
cgdb-0.7.0 Released
-------------------

Bob Rossi

unread,
Mar 23, 2017, 10:55:40 AM3/23/17
to cgdb-...@googlegroups.com
On Thu, Mar 23, 2017 at 02:25:39AM -0700, Paul Mason wrote:
> What if I want to start the program from the debugger and step through it
> from the start?

It's a valid point. It might have been premature to remove this
functionality with out a replacement. However, it really simplified
the user interface (with the vertically split windows) to no longer
consider the additional TTY window. We also beefed up the gdb window
functionality, leaving the TTY window behind a bit.

My thinking was that we would come up with a much better solution
to the problem. I'd like to actively work on this and get it into
another release as soon as possible.

I have a few ideas and am open to other ideas as well.

* (simple) a mode to toggle the gdb window to visually show that the
next characters typed will go to the debugged program instead of gdb
* A mode to start debugging your program in one window, and let the
cgdb interface move to another window. This is how valgrind works
and it uses gdbserver to accomplish it's goal
* A more advanced mode similar to gdb tui. Have cgdb figure out when
the debugged program is running, and give it the terminal instead.
This approach would be hard to get right (multi threading etc) and
their are times when it's nice to have the cgdb window even when
the debugged program is running.
* A full fledged debugged program window similar to the TTY window
The reason I dislike this approach is because many programs use the
terminal window similar to cgdb. I don't plan on adding terminal
emulation to the TTY window, so it will only ever work for some
circumstances, unlike the solutions above.

Other thoughts?

Thanks,
Bob Rossi

> On Wednesday, 22 March 2017 13:19:55 UTC, Bob Rossi wrote:
> >
> > cgdb-0.7.0 Released
> > -------------------
> >
> > * Remove the TTY mode and TTY window from CGDB. This previously allowed
> > you to send input to the program being debugged through the TTY
> > window in CGDB. It is better for the user to run their program in
> > one terminal and attach to it with CGDB from another terminal in
> > order to get terminal input and terminal output working correctly.
> >
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups "cgdb" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cgdb-users+...@googlegroups.com.
> To post to this group, send email to cgdb-...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/cgdb-users/e9dc61c2-a424-494a-915e-d177ac26b1e6%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Robert Rossi

unread,
Apr 6, 2017, 7:50:44 PM4/6/17
to cgdb
On Thu, Mar 23, 2017 at 10:55 AM, Bob Rossi <b...@brasko.net> wrote:
On Thu, Mar 23, 2017 at 02:25:39AM -0700, Paul Mason wrote:
> What if I want to start the program from the debugger and step through it
> from the start?

It's a valid point.

Hi Paul,

I put together a very small patch that might help resolve this issue.

Basically, when debugging, if you are in the gdb window, you can toggle between
sending characters to gdb or to the debugged program. I've got the toggle
character set to ctrl-w for now just for my testing.

This gets the simple case working again. Would something like this work for you?

I'm currently struggling with the best way to indicate to the user what mode they
are in. It's really easy to write to many characters to the debugged program
accidentally.

Thanks,
Bob Rossi

Thomas Goodfellow

unread,
Apr 8, 2017, 4:07:24 AM4/8/17
to cgdb-...@googlegroups.com
Hi Bob

Instead of a toggle, how about explicit keys to enter
send-to-debugged-program state and to enter send-to-gdb state. That
way the user can get into the habit of starting input with the
appropriate state selection key, without needing to worry about which
state is currently active.

Cheers,
Tom
> --
> You received this message because you are subscribed to the Google Groups
> "cgdb" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cgdb-users+...@googlegroups.com.
> To post to this group, send email to cgdb-...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/cgdb-users/CA%2BL9JkjHL%3DbME38PQsBaTLB9pmsZTvoDogX88eXphCwZs7FmHA%40mail.gmail.com.

William.Leo

unread,
Apr 10, 2017, 10:59:34 PM4/10/17
to cgdb
great, so many exciting changes in 0.7

在 2017年3月22日星期三 UTC+8下午9:19:55,Bob Rossi写道:
Reply all
Reply to author
Forward
Message has been deleted
0 new messages