Bug 33873

Summary: Add "pstack" command to FreeBSD
Product: Base System Reporter: Peter Edwards <peter.edwards>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.5-PRERELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
pstack.tar.gz
none
pstack.tgz none

Description Peter Edwards 2002-01-14 13:00:04 UTC
The lack of a "pstack" command on FreeBSD was bemoaned a little on
-hackers
sometime last week. I've missed it at times myself, so decided it'd be
worth
writing one. The resulting nasty little program is enclosed.

I'd imagine that it'll take some review before its even considered for
inclusion in the system, but, here it is anyway.

(apologies if this PR makes it to the database twice: our mail system
sucks
very large eggs.)

Fix: Here's my implementation.
How-To-Repeat: $ uname
FreeBSD
$ pstack
pstack: not found
$
Comment 1 Peter Edwards 2002-01-17 19:38:56 UTC
After comments from a committer, I've:

removed a dependance on MAXDSIZ (I found a much better way of finding
the same information)

added support for core files.

Made it somewhat more style(9) compliant. I haven't totally digested
style(9), but this should be much closer to meeting its requirements.

I doubt I'll have too much time to play more with this, but comments are
always appreciated.
--
Peter.
Comment 2 tedm 2002-01-30 09:51:20 UTC
Works for me under FreeBSD 4.4-RELEASE also, there's also a nice manual page.
The hardest part was getting the program extracted from that hideous MIME
encoding.  I put it up at

http://www.freebsd-corp-net-guide.com/software/pstack-prBIN-33873.tar.gz

so that any other interested parties don't have to go through the
MIME-extraction process (gnats is pretty harsh on this sort of thing
I'm afraid)  where it can stay until either the core puts it into the
distribution, or future changes to FreeBSD break it.

I don't believe this is a candidate for ports - it's way too system/version
dependent.

Ted Mittelstaedt                                       tedm@toybox.placo.com
Author of:                           The FreeBSD Corporate Networker's Guide
Book website:                          http://www.freebsd-corp-net-guide.com
Comment 3 Peter Edwards 2002-01-30 10:44:45 UTC
Before anyone commits or reviews this, give me a shout for the "latest
version". I've done some cleanups, fixed a few minor bugs, and made it
work for running linux executables.

Ted Mittelstaedt wrote:
> 
> Works for me under FreeBSD 4.4-RELEASE also, there's also a nice manual page.
> The hardest part was getting the program extracted from that hideous MIME
> encoding.  I put it up at
> 
> http://www.freebsd-corp-net-guide.com/software/pstack-prBIN-33873.tar.gz
> 
> so that any other interested parties don't have to go through the
> MIME-extraction process (gnats is pretty harsh on this sort of thing
> I'm afraid)  where it can stay until either the core puts it into the
> distribution, or future changes to FreeBSD break it.
> 
> I don't believe this is a candidate for ports - it's way too system/version
> dependent.
> 
> Ted Mittelstaedt                                       tedm@toybox.placo.com
> Author of:                           The FreeBSD Corporate Networker's Guide
> Book website:                          http://www.freebsd-corp-net-guide.com
Comment 4 tedm 2002-01-31 03:08:06 UTC
latest version has been placed in the referenced URL.

Ted
Comment 5 Ying-Chieh Liao freebsd_committer freebsd_triage 2002-09-18 13:53:41 UTC
State Changed
From-To: open->closed

superseded by pr/37632 (in ports category)