Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stack trace recoding on Mac OS X Leopard ( 10.5 )



On Leopard, you can try stackshot  (man stackshot).  This is pretty cool.  I
did not know about it until recently.  It will drill down into the kernel
and not just stop at the user/kernel border.  Real useful for finding
deadlocks.

The binary is in /usr/libexec/stackshot

Try this form for one process:

    sudo /usr/libexec/stackshot -i -t -p pid

Then look in /Library/Logs/stackshot-syms.log for the output.

You can get a 'shot' of the whole system by leaving off the -p pid


> From: Rohitash <email@hidden>
> Organization: Oracle Corporation
> Date: Fri, 22 Aug 2008 20:23:51 +0530
> To: <email@hidden>, <email@hidden>
> Subject: Stack trace recoding on Mac OS X Leopard ( 10.5 )
> 
> Hi,
>   I was exploring of some interfaces in Mac OS X if present , which
> might help me get a call backtrace which I want to record for some
> specific internal exception conditions . If some kind of unwind library
> is already available for use , that would really help simplify my task .
> 
> I am not sure if the BSD library backtrace() and friends should be able
> to help me walk through all the stack frames and provide me with the
> arguments , parameters and the translated
> PC ( to symbolic names ) at any point I want to get a trace the call stack.
> 
> I was reading the man page of atos and it seemed like I can take some
> help from its source code.Also , there seems to be a call stack
> generated in "/Library/Logs/CrashReporter/" for any application level
> crashes, if I am not wronged in assuming.This makes me assume that the
> basic infrastructure already exists to dump the information , and maybe
> I should be on my way if I can use them for my purpose instead of
> writing it from scratch.
> 
> Appreciate your valuable inputs.
> 
> Thanks,
> Rohitash
> 
> -- 
> Disclaimer : The statements and opinions expressed here are my own and do not
> necessarily represent those of Oracle Corporation.
> 
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Darwin-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/darwin-dev/email@hidden
> 
> This email sent to email@hidden
> 


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden

References: 
 >Stack trace recoding on Mac OS X Leopard ( 10.5 ) (From: Rohitash <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.