public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Robert Rossi <bob@brasko.net>
To: GDB Development <gdb@sourceware.org>
Subject: GDB and new-ui mi
Date: Thu, 28 Jan 2021 22:02:03 -0500	[thread overview]
Message-ID: <CA+L9Jkis425odOJtgA9A6q9DRc5cqZkTfhsYCKU-_KB5Ru6kjg@mail.gmail.com> (raw)

Hi,

CGDB is working reasonably well using the gdb new-ui changes.
This was a very clever improvement to gdb. Thanks.

A typical IDE allows users to run commands, often in the form of buttons
for "Run", "Next", "Step", etc.

I tried to implement that feature in CGDB and I don't really love the way
it came out.

The user has the following at the gdb console,
  (gdb) b main
  Breakpoint 1 at 0x4006c0: file test.cpp, line 42.
  (gdb) <cursor here>

When they hit <F5>, to say 'run', i send -exec-run to the new-ui mi pty.
Then the gdb console looks like,
  (gdb) b main
  Breakpoint 1 at 0x4006c0: file test.cpp, line 42.
  (gdb)
  Breakpoint 1, main (argc=1, argv=0x7fffffffdea8) at test.cpp:42
  42      {
  <cursor here>
This doesn't look good.

This is what the user is accustomed to, if they only use the console,
  (gdb) b main
  Breakpoint 1 at 0x4006c0: file test.cpp, line 42.
  (gdb) r
  Starting program: /home/bob/rcs/git/cgdb/master/build-new-ui/test_driver

  Breakpoint 1, main (argc=1, argv=0x7fffffffdea8) at test.cpp:42
  42      {
  (gdb) <cursor here>
Wonderful!

Is there anyway to have the ide <f5> use case behave as if the user typed
at the console?

For the record, I also tried sending "run" to the gdb console, and that
works ok, however,
if the user already had some text on the console, then this fails pretty
quickly.

Thanks,
Bob Rossi

                 reply	other threads:[~2021-01-29  3:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+L9Jkis425odOJtgA9A6q9DRc5cqZkTfhsYCKU-_KB5Ru6kjg@mail.gmail.com \
    --to=bob@brasko.net \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).