From: Pedro Alves <palves@redhat.com>
To: Antoine Tremblay <antoine.tremblay@ericsson.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix failure to detach if threads exit while detaching on linux
Date: Fri, 03 Jun 2016 11:43:00 -0000 [thread overview]
Message-ID: <eec651c9-0916-be62-5822-6486209423e2@redhat.com> (raw)
In-Reply-To: <1464876960-23372-1-git-send-email-antoine.tremblay@ericsson.com>
On 06/02/2016 03:16 PM, Antoine Tremblay wrote:
> gdb/ChangeLog:
>
> * inf-ptrace.c: include nat/linux-procfs.h.
> (inf_ptrace_detach): Report an error only if the thread is not gone.
Can't do this. inf-ptrace.c is a shared file used by non-Linux ports too.
> * gdb.threads/detach-gone-thread.c: New file.
> * gdb.threads/detach-gone-thread.ex: New test.
Typo: ".ex". Say "New file" for that one too.
> + _exit(0);
Space before parenthesis.
> +{
> + pthread_t threads[256];
> + int res;
> + int i;
> +
> + pthread_barrier_init (&barrier, NULL, 257);
> +
> + for (i = 0; i < 256; i++)
Please add:
#define NTHREADS 256
and thus write:
pthread_t threads[NTHREADS];
int res;
int i;
pthread_barrier_init (&barrier, NULL, NTHREADS + 1);
for (i = 0; i < NTHREADS; i++)
> +
> +if $use_gdb_stub {
Do this at the top, and call the new use_gdb_stub procedure instead:
if [use_gdb_stub] {
> + # This test is about testing detaching from a process,
> + # so it doesn't make sense to run it if the target is stub-like.
> + unsupported "This test is not supported for GDB stub targets."
But in any case, I'm not so sure about this. Stub targets can
detach too. What problem did you find that needed this?
Thanks,
Pedro Alves
next prev parent reply other threads:[~2016-06-03 11:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 14:16 Antoine Tremblay
2016-06-03 11:43 ` Pedro Alves [this message]
2016-06-03 11:55 ` Antoine Tremblay
2016-06-03 12:05 ` Pedro Alves
2016-06-03 14:49 ` [PATCH v2] " Antoine Tremblay
2016-06-03 15:16 ` Pedro Alves
2016-06-03 15:32 ` Antoine Tremblay
2016-06-03 15:45 ` Pedro Alves
2016-06-03 15:59 ` Antoine Tremblay
2016-06-03 16:21 ` Pedro Alves
2016-06-03 16:43 ` [PATCH v3] " Antoine Tremblay
2016-06-03 19:15 ` Pedro Alves
2016-06-03 19:32 ` Antoine Tremblay
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=eec651c9-0916-be62-5822-6486209423e2@redhat.com \
--to=palves@redhat.com \
--cc=antoine.tremblay@ericsson.com \
--cc=gdb-patches@sourceware.org \
/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