public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* GDB and new-ui mi
@ 2021-01-29  3:02 Robert Rossi
  0 siblings, 0 replies; only message in thread
From: Robert Rossi @ 2021-01-29  3:02 UTC (permalink / raw)
  To: GDB Development

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-29  3:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-29  3:02 GDB and new-ui mi Robert Rossi

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