Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: XXX <710492440@qq.com>, bug-gdb <bug-gdb@gnu.org>,
	"gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: looking for gdb's help
Date: Tue, 14 May 2019 16:17:00 -0000	[thread overview]
Message-ID: <1b1927f5-d0e8-c873-9dcf-45e6783d4cac@simark.ca> (raw)
In-Reply-To: <tencent_BFF0537BE500EBD744189A00B384F5C26E06@qq.com>

On 2019-05-14 3:26 a.m., XXX wrote:
> hello!
> 
> i have a question about gdb debugging. while a signal cause a core dump, how can i get which thread cause the signal. the _siginfo only records the pid, not thread id. while debugging the core file, the current thread is not the thread which cause the core signal.
> 
> 
> i am looking for your reply, thank you!
> 

Is this core dump created by the Linux kernel?  IIRC, the Linux kernel typically
places the signalled thread first in the list of of threads, such that when I
open a core dump in GDB, thread 1 is usually the one that caused the problem.

Simon


WARNING: multiple messages have this Message-ID
From: Simon Marchi <simark@simark.ca>
To: XXX <710492440@qq.com>, bug-gdb <bug-gdb@gnu.org>,
	"gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: looking for gdb's help
Date: Tue, 14 May 2019 22:04:00 -0000	[thread overview]
Message-ID: <1b1927f5-d0e8-c873-9dcf-45e6783d4cac@simark.ca> (raw)
Message-ID: <20190514220400.rS6H84b5EFLv9rHHOy1qqiyGfAsmOLHO_0slG0crk74@z> (raw)
In-Reply-To: <tencent_BFF0537BE500EBD744189A00B384F5C26E06@qq.com>

On 2019-05-14 3:26 a.m., XXX wrote:
> hello!
> 
> i have a question about gdb debugging. while a signal cause a core dump, how can i get which thread cause the signal. the _siginfo only records the pid, not thread id. while debugging the core file, the current thread is not the thread which cause the core signal.
> 
> 
> i am looking for your reply, thank you!
> 

Is this core dump created by the Linux kernel?  IIRC, the Linux kernel typically
places the signalled thread first in the list of of threads, such that when I
open a core dump in GDB, thread 1 is usually the one that caused the problem.

Simon


  reply	other threads:[~2019-05-14 16:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-14  7:35 XXX
2019-05-14 16:17 ` Simon Marchi [this message]
2019-05-14 22:04   ` Simon Marchi
2019-05-17  0:37 ` 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=1b1927f5-d0e8-c873-9dcf-45e6783d4cac@simark.ca \
    --to=simark@simark.ca \
    --cc=710492440@qq.com \
    --cc=bug-gdb@gnu.org \
    --cc=gdb@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