From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 4 05:40:50 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6612E1065670; Wed, 4 Apr 2012 05:40:50 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 3337E8FC14; Wed, 4 Apr 2012 05:40:50 +0000 (UTC) Received: from julian-mac.elischer.org (c-67-180-24-15.hsd1.ca.comcast.net [67.180.24.15]) (authenticated bits=0) by vps1.elischer.org (8.14.5/8.14.5) with ESMTP id q345el1O001443 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 3 Apr 2012 22:40:48 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4F7BDF06.8000104@freebsd.org> Date: Tue, 03 Apr 2012 22:41:26 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 MIME-Version: 1.0 To: John Baldwin References: <4F775DF5.1020704@rawbw.com> <201204020831.09253.jhb@freebsd.org> <4F79D63E.7010200@rawbw.com> <201204021312.36568.jhb@freebsd.org> In-Reply-To: <201204021312.36568.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Yuri , hackers@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Is there any modern alternative to pstack? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Apr 2012 05:40:50 -0000 On 4/2/12 10:12 AM, John Baldwin wrote: > On Monday, April 02, 2012 12:39:26 pm Yuri wrote: >> On 04/02/2012 05:31, John Baldwin wrote: >>> Hmm, I don't know if the port has it, but I did some work on pstack a while >>> ago to make it work with libthread_db so it at least handles i386 ok. It >>> needs to be modified to use something like libunwind though or some other >>> unwinder. And possibly it should use libelf instead of its own ELF-parsing >>> code. >> I see pstack -1.2_1 failing even on i386: >> >> pstack: cannot read context for thread 0x1879f >> pstack: failed to read more threads > Yes, threads don't work for modern binaries (newer than 4.x) without my changes > to make it use libthread_db. You can find the patch I used for this at > http://www.freebsd.org/~jhb/patches/pstack_threads.patch should be in ports?