public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] PR gdb/30219: Clear sync_quit_force_run in quit_force
Date: Fri, 24 Mar 2023 14:59:15 -0700	[thread overview]
Message-ID: <20230324145915.13b88ab8@f37-zws-nv> (raw)
In-Reply-To: <9bf423f6-bea3-6b0e-3052-596de36d4a5e@polymtl.ca>

On Thu, 23 Mar 2023 11:26:56 -0400
Simon Marchi <simon.marchi@polymtl.ca> wrote:

> > diff --git a/gdb/annotate.c b/gdb/annotate.c
> > index 60fe6ccd5c2..36efce1af7c 100644
> > --- a/gdb/annotate.c
> > +++ b/gdb/annotate.c
> > @@ -282,6 +282,13 @@ annotate_quit (void)
> >      printf_unfiltered (("\n\032\032quit\n"));
> >  }
> >  
> > +void
> > +annotate_forced_quit (void)
> > +{
> > +  if (annotation_level > 1)
> > +    printf_unfiltered (("\n\032\032forced-quit\n"));  
> 
> Hmm, this in a new annotation?  In theory, this would need to be
> documented, to have a NEWS entry, etc.  And then frontends using
> annotations would need to be updated to use that.  We don't really want
> that, if possible, given annotations are obsolete.
> 
> Would it work to display the "quit" annotation (the one printed by
> annotate_quit)?  The doc [1] says, for that annotation:
> 
>   This annotation occurs right before GDB responds to an interrupt. 
> 
> and:
> 
>   Quit and error annotations indicate that any annotations which GDB was
>   in the middle of may end abruptly. For example, if a
>   value-history-begin annotation is followed by a error, one cannot
>   expect to receive the matching value-history-end.
> 
> I think it also works in the forced quit case.  The execution of
> whatever thing was going on is interrupted, just like in the regular
> quit case, it just happens that GDB also happens to exit after that.
> 
> [1] https://sourceware.org/gdb/onlinedocs/annotate.html#Errors

I agree.  I've prepared a v2 patch which I'll send shortly.

Kevin


  reply	other threads:[~2023-03-24 21:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 23:18 Kevin Buettner
2023-03-23 15:26 ` Simon Marchi
2023-03-24 21:59   ` Kevin Buettner [this message]
2023-03-24 22:07 ` [PATCH v2] " Kevin Buettner
2023-03-27 15:24   ` Simon Marchi

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=20230324145915.13b88ab8@f37-zws-nv \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /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).