Is there any modern alternative to pstack?

Julian Elischer julian at freebsd.org
Wed Apr 4 05:40:50 UTC 2012


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?




More information about the freebsd-hackers mailing list