From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57017 invoked by alias); 15 May 2019 14:28:44 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 57009 invoked by uid 89); 15 May 2019 14:28:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=UD:si_code, UD:info.si_code, UD:si_signo, gid X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 May 2019 14:28:43 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8A35B99DDE; Wed, 15 May 2019 14:28:42 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-55.ams2.redhat.com [10.36.116.55]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C41FD5D9E5; Wed, 15 May 2019 14:28:41 +0000 (UTC) Date: Fri, 17 May 2019 00:37:00 -0000 From: Jan Kratochvil To: XXX <710492440@qq.com> Cc: gdb@sourceware.org Subject: Re: looking for gdb's help Message-ID: <20190515142838.GA2700877@host1.jankratochvil.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019-05/txt/msg00028.txt.bz2 On Tue, 14 May 2019 09:26:56 +0200, XXX wrote: > i have a question about gdb debugging. while a signal cause a core dump, how > can i get which thread cause the signal. $ eu-readelf corefile # eu-readelf is from elfutils package Owner Data size Type CORE 336 PRSTATUS info.si_signo: 11, info.si_code: 0, info.si_errno: 0, cursig: 11 sigpend: <> sighold: <> pid: 2700200, ppid: 2700198, pgrp: 2700198, sid: 2652754 ^^^^^^^ = crashed thread TID ... CORE 136 PRPSINFO state: 2, sname: D, zomb: 0, nice: 0, flag: 0x0000000040404404 uid: 1001, gid: 1001, pid: 2700199, ppid: 2700198, pgrp: 2700198 ^^^^^^^ = crashed process PID Jan