Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch+7.8?] Fix 'gcore' with exited threads
Date: Thu, 21 Aug 2014 11:33:00 -0000	[thread overview]
Message-ID: <53F5D8E9.5050900@redhat.com> (raw)
In-Reply-To: <20140817211647.GA17152@host2.jankratochvil.net>

On 08/17/2014 10:16 PM, Jan Kratochvil wrote:
> On Mon, 23 Jun 2014 17:06:37 +0200, Pedro Alves wrote:
>> > On 06/09/2014 09:30 PM, Jan Kratochvil wrote:

> 
>>> > > Without the TRY_CATCH protection testsuite FAILs for:
>>> > > 	FAIL: gdb.threads/gcore-thread.exp: save a zeroed-threads corefile
>>> > > 	FAIL: gdb.threads/gcore-thread.exp: core0file: re-load generated corefile (bad file format)
>> > 
>> > What does the log show ?
> gcore .../gdb/testsuite/gdb.threads/gcore-thread0.test^M
> Cannot find new threads: debugger service failed^M
> (gdb) FAIL: gdb.threads/gcore-thread.exp: save a zeroed-threads corefile
> +
> core .../gdb/testsuite/gdb.threads/gcore-thread0.test^M
> ".../gdb/testsuite/gdb.threads/gcore-thread0.test" is not a core dump: File format not recognized^M
> (gdb) FAIL: gdb.threads/gcore-thread.exp: core0file: re-load generated corefile (bad file format)

Thanks.  It'd be good to have this in the commit log.

> gdb/
> 2014-08-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	* linux-tdep.c (linux_corefile_thread_callback): Ignore THREAD_EXITED.
> 	(linux_make_corefile_notes): call update_thread_list, protected against
> 	exceptions.
> 
> gdb/testsuite/
> 2014-08-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	* gdb.threads/gcore-stale-thread.c: New file.
> 	* gdb.threads/gcore-stale-thread.exp: New file.
> 
> diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
> index d0f1106..875f32e 100644
> --- a/gdb/linux-tdep.c
> +++ b/gdb/linux-tdep.c
> @@ -1194,6 +1194,11 @@ linux_corefile_thread_callback (struct thread_info *info, void *data)
>  {
>    struct linux_corefile_thread_data *args = data;
>  
> +  /* It can be current thread in non-stop mode
> +     which cannot be removed by update_thread_list.  */

Please remove the "in non-stop mode" bit.  The predicate GDB
currently chooses to decide whether to switch to another thread
or not is "non-stop", but that's bogus and will change (it should
be foreground vs background command), and then this comment will
most likely end up stale.

> +# This file was written by Michael Snyder (msnyder@redhat.com)
> +# This is a test for the gdb command "generate-core-file".

This paragraph is stale.

Otherwise OK.

Thanks!

IMO, this is good for 7.8.

Pedro Alves


  parent reply	other threads:[~2014-08-21 11:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-09 20:30 [patch] " Jan Kratochvil
2014-06-23 15:06 ` Pedro Alves
2014-08-17 21:16   ` [patch+7.8?] " Jan Kratochvil
2014-08-21 10:41     ` [PUSHED] Remove useless gcore command detection (was: Re: [patch+7.8?] Fix 'gcore' with exited threads) Pedro Alves
2014-08-21 18:29       ` Jan Kratochvil
2014-08-21 11:33     ` Pedro Alves [this message]
2014-08-21 18:45       ` [commit+7.8] [patch+7.8?] Fix 'gcore' with exited threads Jan Kratochvil

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=53F5D8E9.5050900@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.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