From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 4 07:58:38 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1A786106566C; Wed, 4 Apr 2012 07:58:38 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 034CC8FC0C; Wed, 4 Apr 2012 07:58:36 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so575983bkc.13 for ; Wed, 04 Apr 2012 00:58:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=vjF8YXrYzIlaBR4MEshQrTPB4cCRiUu00Yn8Q6Y8Xmo=; b=PmZFL2tLmhZjf7Heu7NZtDUep7Do27Y6WAxH9Nk0FmUKVrYvbMzbTtGzHrO7LHJbL1 4cjk5M0pPgJlBrefZj72NYI5gyolVVZKxyyFB/td4fb0iA5KVlmZ2t8nGcZCnfkXCaCP /R/ZxsXVquyyvPA7tYGWutplEWTT69M3zeyH7G1wtvLLBwTnja54orVGYOy99ha2V0fq 11Ra9v8/4o7fr3VTtCXSjJLx1j6R9l1t4N9S+8dDfVrHpYDdCgJ6bl4uaGWicr6DqIR7 Ahg2W+5dOzwMja/ZNycMgbahMGV8x9FzqhWyAmCnN1T2r30RhZ+QtmIkoelnka/lRNBw JQxA== MIME-Version: 1.0 Received: by 10.204.154.28 with SMTP id m28mr6620541bkw.102.1333526315763; Wed, 04 Apr 2012 00:58:35 -0700 (PDT) Received: by 10.204.202.142 with HTTP; Wed, 4 Apr 2012 00:58:35 -0700 (PDT) Received: by 10.204.202.142 with HTTP; Wed, 4 Apr 2012 00:58:35 -0700 (PDT) In-Reply-To: <4F7BDF06.8000104@freebsd.org> References: <4F775DF5.1020704@rawbw.com> <201204020831.09253.jhb@freebsd.org> <4F79D63E.7010200@rawbw.com> <201204021312.36568.jhb@freebsd.org> <4F7BDF06.8000104@freebsd.org> Date: Wed, 4 Apr 2012 07:58:35 +0000 Message-ID: From: Chris Rees To: Julian Elischer Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org, Yuri 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 07:58:38 -0000 On 4 Apr 2012 06:41, "Julian Elischer" wrote: > > 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? > > I'm on it. Chris