GDB and new-ui mi
Robert Rossi
bob@brasko.net
Fri Jan 29 03:02:03 GMT 2021
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
More information about the Gdb
mailing list