public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Pedro Alves <pedro@palves.net>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Make GDBserver abort on internal error in development mode
Date: Sat, 25 Jun 2022 09:27:13 -0400	[thread overview]
Message-ID: <5c9c20f8-2d67-17a8-9d29-65c3a42ecde5@simark.ca> (raw)
In-Reply-To: <20220624132645.1117504-1-pedro@palves.net>

On 2022-06-24 09:26, Pedro Alves wrote:
> Currently, if GDBserver hits some internal assertion, it exits with
> error status, instead of aborting.  This makes it harder to debug
> GDBserver, as you can't just debug a core file if GDBserver fails an
> assertion.  I've had to hack the code to make GDBserver abort to debug
> something several times before.
> 
> I believe the reason it exits instead of aborting, is to prevent
> potentially littering the filesystem of smaller embedded targets with
> core files.  I think I recall Daniel Jacobowitz once saying that many
> years ago, but I can't be sure.  Anyhow, that seems reasonable to me.

Thanks for mentioning this, I was going to ask "why don't we just abort
all the time".  On non-embedded targets it could be useful to abort,
since it triggers the various distros error reporting tool (like ABRT on
Red Hat), and make reporting crashes easier.  But the embedded target
case also makes sense.  Your patch LGTM, it's a good change on its own.
If someone wants to add a --make-gdbserver-abort-on-internal-error
configure switch later (and convince distros to use it), I'd be ok with
that.

Simon

  reply	other threads:[~2022-06-25 13:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24 13:26 Pedro Alves
2022-06-25 13:27 ` Simon Marchi [this message]
2022-06-27 12:06 ` Andrew Burgess

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=5c9c20f8-2d67-17a8-9d29-65c3a42ecde5@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    /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).