source annotation now prints source line
Pedro Alves
palves@redhat.com
Mon Mar 15 13:10:46 GMT 2021
On 13/03/21 17:01, Bob Rossi wrote:
> On Thu, Apr 16, 2020 at 06:41:28PM +0100, Andrew Burgess wrote:
>> I'll take a look to see if there's a good way to give you the
>> functionality you're looking for and close the bugs off.
>
> Thank you for doing this Andrew, I appreciate it.
>
> Ironically, I just upgraded CGDB to no longer use annotations.
> I'm moved it from annotations to gdb/mi, in the same way that
> Eclipse uses MI, by using the new-ui feature of gdb. Now i see the
> source linse are still visible in the console. gdb doesn't know
> to not show them in this mode.
>
> To recap,
> - cgdb using annotations does not show code in console
> - cgdb using mi using new-ui does show code in console
> - gdb tui does not show code in console
> - eclipse probably shows code in console, as it uses mi and new-ui
>
> Would it be to much to ask that if new-ui is being used, that we
> assume a front end is being used, and not display the code in the console?
>
> I've CC'd Pedro and Marc as I believe they may be the relevant people to
> have an opinion on how this would impact eclipse.
>
A driving idea behind the new-ui work was that the CLI running inside
the console window would work exactly like a GDB running on a terminal.
It should be possible even to start a GDB on a terminal, and then spawn a
separate Eclipse GUI connected to the GDB running on the terminal, still outside
Eclipse, like a "launch-gui" command or some such written in python that
would spawn eclipse and have it connect to gdb with new-ui. I don't know whether
anyone ever implemented this in Eclipse, but it was a consideration in the
original design. It isn't clear to me that in this scenario you would not want
print the source line in the console. I think I would want it.
Also, while the new-ui feature was originally designed alongside Eclipse, it has
potential for more usecases. A secondary MI channel could not be displaying any
GUI at all, for example.
I think that if you want to make GDB not print source lines, then that should
be a separate option.
Thanks,
Pedro Alves
More information about the Gdb
mailing list