From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100437 invoked by alias); 18 Jan 2016 17:06:09 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 100390 invoked by uid 89); 18 Jan 2016 17:06:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.4 required=5.0 tests=AWL,BAYES_50,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=core_pid_to_str, HX-Greylist:AUTH, HX-Greylist:succeeded, HX-Greylist:SMTP X-Spam-User: qpsmtpd, 2 recipients X-HELO: bigwig.baldwin.cx Received: from bigwig.baldwin.cx (HELO bigwig.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Mon, 18 Jan 2016 17:06:06 +0000 Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 06610B946; Mon, 18 Jan 2016 12:06:04 -0500 (EST) From: John Baldwin To: Pedro Alves Cc: gdb-patches@sourceware.org, binutils@sourceware.org Subject: Re: [PATCH v2 3/6] Display per-thread information for threads in FreeBSD cores. Date: Mon, 18 Jan 2016 17:06:00 -0000 Message-ID: <1701896.llh381Sx0a@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <569CDA29.3050000@redhat.com> References: <1452721551-657-1-git-send-email-jhb@FreeBSD.org> <2320320.x23qbZCVbY@ralph.baldwin.cx> <569CDA29.3050000@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00389.txt.bz2 On Monday, January 18, 2016 12:27:21 PM Pedro Alves wrote: > On 01/15/2016 08:13 PM, John Baldwin wrote: > > On Thursday, January 14, 2016 03:03:50 PM Pedro Alves wrote: > >> Is this ".thrmisc" section documented somewhere? Could you add a > >> small comment on what this entry you're skipping means? > > > > It is not documented aside from the code unfortunately. :( If I had my > > way we would be dumping the full ptrace_lwpinfo structure that contains > > per-LWP info used by the 'nat' target instead (it has other potentially > > useful information such as the siginfo_t for each thread). At the moment > > I don't generate a NT_THRMISC note in 'gcore' because 'struct thrmisc' is > > currently only present in FreeBSD's headers. > > I think just having a comment mentioning that this note contains > the "struct thrmisc" structure, which contains the thread name, would > be helpful. Ok. > But, if this is about the thread name, is there a reason you're hacking it > through fbsd_core_pid_to_str, rather than hooking this up > through "thread name" ? Hmm, would this work for cross-debugging a core file? fbsd_thread_name is currently only defined for native debugging, whereas core_pid_to_str is a gdbarch method on the ABI so it can be used to extract thread names from non-native cores. Alternatively, would it be best if the core target defined a to_thread_name method that invoked a new gdbarch method (gdbarch_core_thread_name or the like) to fetch the thread name? -- John Baldwin