public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCHv2] gdb: Fix instability in thread groups test
Date: Tue, 14 Aug 2018 11:37:00 -0000	[thread overview]
Message-ID: <a5bc7597-7623-891a-ca53-d80e27dbfd72@redhat.com> (raw)
In-Reply-To: <20180813214531.GZ3155@embecosm.com>

On 08/13/2018 10:45 PM, Andrew Burgess wrote:
> Here's an updated version of the patch based on previous feedback.
> The new version has additional comments explaining why the regexp
> allows an empty core list.  I also only allow the empty core list
> when we scan all processes, its only in this case we might hit an
> exiting process.  When we scan two known PIDs, I don't allow an empty
> core list.

Thanks.

> +# The CORES_RE regexp allows a process to be running on zero or more
> +# cores.  This can happen if a process exits while GDB is reading
> +# information out of /proc.
> +set cores_re "cores=\\\[(\"$decimal\"(,\"$decimal\")*)?\\\]"

LGTM, except "this" is slightly ambiguous here.  Maybe:

 s/This can happen/The former can happen/

?

OK with that resolved.

Thanks,
Pedro Alves

>  
>  # List all available processes.
>  set process_entry_re "{${id_re},${type_re}(,$description_re)?(,$user_re)?(,$cores_re)?}"
> @@ -64,6 +68,12 @@ set spawn_id_2 [remote_spawn target $binfile]
>  set pid_2 [spawn_id_get_pid $spawn_id_2]
>  set id_re_2 "id=\"$pid_2\""
>  
> +# Unlike the earlier CORES_RE this list must contain at least one
> +# core.  Given that we know these processes will not exit while GDB is
> +# reading their information from /proc we can expect at least one core
> +# for each process.
> +set cores_re "cores=\\\[\"$decimal\"(,\"$decimal\")*\\\]"
> +
>  set process_entry_re_1 "{${id_re_1},${type_re}(,$description_re)?(,$user_re)?(,$cores_re)?}"
>  set process_entry_re_2 "{${id_re_2},${type_re}(,$description_re)?(,$user_re)?(,$cores_re)?}"
>  
> 

      reply	other threads:[~2018-08-14 11:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-10  9:58 [PATCH] " Andrew Burgess
2018-08-10 21:26 ` Simon Marchi
2018-08-13  9:51   ` Pedro Alves
2018-08-13 11:41     ` Andrew Burgess
2018-08-13 12:03       ` Pedro Alves
2018-08-13 13:01         ` Andrew Burgess
2018-08-13 13:38           ` Pedro Alves
2018-08-13 21:45             ` [PATCHv2] " Andrew Burgess
2018-08-14 11:37               ` Pedro Alves [this message]

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=a5bc7597-7623-891a-ca53-d80e27dbfd72@redhat.com \
    --to=palves@redhat.com \
    --cc=andrew.burgess@embecosm.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).