public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Lancelot SIX <lancelot.six@amd.com>, gdb-patches@sourceware.org
Cc: lsix@lancelotsix.com
Subject: Re: [PATCH v2] gdb/gcore: interrupt all threads before generating the corefile
Date: Tue, 8 Nov 2022 14:01:21 +0000	[thread overview]
Message-ID: <91a96187-48fd-4823-6b82-dbf8e8f70bce@palves.net> (raw)
In-Reply-To: <20221017134335.385594-1-lancelot.six@amd.com>

Hi Lancelot,

On 2022-10-17 2:43 p.m., Lancelot SIX via Gdb-patches wrote:

> --- /dev/null
> +++ b/gdb/testsuite/gdb.base/gcore-nonstop.exp
> @@ -0,0 +1,73 @@
> +# Copyright 2022 Free Software Foundation, Inc.
> +
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; either version 3 of the License, or
> +# (at your option) any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.
> +
> +# This testcase checks that when in non-stop mode with some threads running
> +# the gcore command can interrupt all threads, generate a core dump and
> +# restart threads as required.
> +
> +standard_testfile
> +
> +if { [prepare_for_testing "failed to prepare" \
> +	${testfile} ${srcfile} {threads debug}] } {
> +    return
> +}
> +
> +gdb_test_no_output "set non-stop on"

Let's please make this testcase work with --target_board=native-extended-gdbserver.

As is, it will most certainly fail because this is too late to enable non-stop mode.

Most tests address this by appending the set command to GDBFLAGS, like this from
gdb.threads/interrupt-while-step-over.exp:

    save_vars { GDBFLAGS } {
        append GDBFLAGS " -ex \"set non-stop on\""
        clean_restart $binfile
    }

Otherwise LGTM.

Pedro Alves

  parent reply	other threads:[~2022-11-08 14:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17 13:43 Lancelot SIX
2022-11-01 14:44 ` [PING][PATCH " Lancelot SIX
2022-11-08 14:01 ` Pedro Alves [this message]
2022-11-09 18:53   ` [PATCH " Lancelot SIX

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=91a96187-48fd-4823-6b82-dbf8e8f70bce@palves.net \
    --to=pedro@palves.net \
    --cc=gdb-patches@sourceware.org \
    --cc=lancelot.six@amd.com \
    --cc=lsix@lancelotsix.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).