public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Robert Rossi <bob@brasko.net>
To: Pedro Alves <palves@redhat.com>
Cc: Andrew Burgess <andrew.burgess@embecosm.com>,
	gdb@sourceware.org,  Marc Khouzam <marc.khouzam@ericsson.com>
Subject: Re: source annotation now prints source line
Date: Sat, 4 May 2024 16:09:45 -0400	[thread overview]
Message-ID: <CA+L9Jkh28L==sf7=4Gs1AJuL2TCzVqWb4gJ3P-qpUzymc3rEjg@mail.gmail.com> (raw)
In-Reply-To: <6f609020-19f6-3e47-3c3f-f268e4600b43@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3068 bytes --]

Sorry to respond to an ancient thread. I thought the context might be
helpful.

I've been happily using the mi new-ui feature from gdb in cgdb for quite a
while.
Occasionally, I get people unhappy with gdb printing code out to the
console when stepping through code.

Here is an example,
https://github.com/cgdb/cgdb/issues/336
Here is another example,
https://github.com/cgdb/cgdb/issues/223

In the past, it was expressed by Pedro (i believe) that this was a feature.
You can see from the requests some people do not want to see the code in
the console.
That's because they already see it more clearly in the code view.

Can we consider disabling this behavior or making it optional somehow?
Thoughts?

Thanks,
Bob Rossi

On Mon, Mar 15, 2021 at 9:10 AM Pedro Alves <palves@redhat.com> wrote:

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

  reply	other threads:[~2024-05-04 20:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-04 23:54 Bob Rossi
2020-04-14 11:23 ` Bob Rossi
2020-04-14 12:17   ` Andrew Burgess
2020-04-14 12:57     ` Andrew Burgess
2020-04-15  2:13     ` Bob Rossi
2020-04-16 17:41       ` Andrew Burgess
2021-03-13 17:01         ` Bob Rossi
2021-03-15 13:10           ` Pedro Alves
2024-05-04 20:09             ` Robert Rossi [this message]
2024-05-05 15:36               ` Robert Rossi
2024-05-05 16:06                 ` Eli Zaretskii

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+L9Jkh28L==sf7=4Gs1AJuL2TCzVqWb4gJ3P-qpUzymc3rEjg@mail.gmail.com' \
    --to=bob@brasko.net \
    --cc=andrew.burgess@embecosm.com \
    --cc=gdb@sourceware.org \
    --cc=marc.khouzam@ericsson.com \
    --cc=palves@redhat.com \
    /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).