Extending Functionality: an expedient and questionable approa ch

Chandrashekhar Mullaparthi Chandrashekhar.Mullaparthi@REDACTED
Fri Mar 14 15:45:49 CET 2003


Another way to look at the stack...but it is not as pretty as what you'd see
in a crash report.

(camelns@REDACTED)212> erlang:process_display(whereis(cns_server), backtrace).

program counter = 0x9895a0 (gen_server:loop/6 + 52)
cp = 0x85ee6c (proc_lib:init_p/5 + 164)
arity = 0

397b64   Return addr 0x85EE6C (proc_lib:init_p/5 + 164)
y(0)     []
y(1)     infinity
y(2)     cns_server
y(3)     {state,[],0,0,17000}
y(4)     cns_server
y(5)     <0.25458.2>

397b80   Return addr 0x10F9F4 (<terminate process normally>)
y(0)     Catch 0x85EE6C (proc_lib:init_p/5 + 164)
y(1)     gen
y(2)     init_it
y(3)
[gen_server,<0.25458.2>,<0.25458.2>,{local,cns_server},cns_server,normal,[]]
true

You can specify how much of the backtrace is saved using:

erlang:system_flag(backtrace_depth, Value).

-----Original Message-----
From: Chris Pressey [mailto:cpressey@REDACTED]
Sent: 13 March 2003 23:41
To: Shawn Pearce
Cc: erlang-questions@REDACTED
Subject: Re: Extending Functionality: an expedient and questionable
approach


On Thu, 13 Mar 2003 17:56:45 -0500
Shawn Pearce <spearce@REDACTED> wrote:

<snip>

Actually, just out of curiousity, does anyone know if there's a better way
to investigate the call stack -  better than the only method I've seen so
far, that is, to catch an intentional error and examine the result?

<snip>



 NOTICE AND DISCLAIMER:
This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.




More information about the erlang-questions mailing list