Consultor Eletrônico



Kbase 17478: Using PROSTACK to produce a readable stack trace
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
Using PROSTACK to produce a readable stack trace


This KB explains how to use PROSTACK to produce a readable Stack
trace for any Progress executable that produces a core file.

For the _progres, where a core file has been generate for example,
start progress and run this command :

prostack -r $DLC /bin/_progres <core file>

You will get a menu screen where you will be prompted to type your OS.

For an ALpha, you type 1 for example.
You will then have to comfirm this option you typed in with a y.

Log messages will be displayed and these files will be created:

dbx.log
dbx.script.tmp
and possibly
protrace.<pid>

These files are what we need.

This is how a stack trace was created on an Alpha machine:


prostack -r $DLC/bin/_progres <corefile>

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


'uname -a' for your machine indicates: OSF1 tsaxp1 V3.2 41.64 alpha.

Select the option which best describes your UNIX machine:

1. AlphaOSF1: Digital Alpha OSF/1
2. DGUX: Data General AViion
3. HPUX: Hewlett Packard
4. AIX: IBM RS6000
5. ICL
6. SEQ2: SEQUENT ptx/2.0
7. SEQ4: SEQUENT ptx/4.1
8. SCO: Santa Cruz Operations
9. SGI
10. SunOS
11. UnixV4: NCR or Unisys UNIX 5.4

99. exit

Option: You selected 'AlphaOSF1' to describe your system. Is this
correct (y
)?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


The following debuggers are available through the
'DEC OSF/1 Operating System' (OSFBASExxx) software subset:
/usr/bin/dbx


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Using the dbx debugger to produce a stack trace from an image file:

/usr1/v73E/dlc/bin/_progres
and core file:
core
Appending output to file dbx.log...


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


This is how the files should appear:

dbx.log:


Date: Tue Nov 25 14:52:45 MET 1997

Debugger commands:

/usr/bin/dbx /usr1/v73E/dlc/bin/_progres core << END_OF_INPUT
where
quit
END_OF_INPUT

Stack trace:

dbx version 3.11.8
Type 'help' for help.
Core file created by program "_progres"
signal Quit at >*[__kill, 0x3ff8010ce68] beq r19, 0x3ff8010ce80

> 0 __kill(0x3, 0x18042d80, 0x1801c4f0, 0x1, 0x347ad7ac) [0x3ff8010ce
68]
1 utcore(0x120abe48, 0x2, 0x2, 0x2, 0x1208bc58) ["/huge2/rdl/73/src
/c/utbuf.c":490, 0x12407270]
2 drexit(0x1802bbf8, 0x0, 0x18057730, 0x18062080, 0x18062080) ["/hu
ge2/rdl/73/src/c/drsetup.c":807, 0x1208bc80]
3 drSigFatal(0x18057730, 0x18062080, 0x18062080, 0x1803cd38, 0x3ff8
00ed41c) ["/huge2/rdl/73/src/c/drsig.c":1027, 0x1208c85c]
4 __read(0x18042ca8, 0x18054fa0, 0x12150030, 0x0, 0x12157ea0) [0x3f
f800d81d4]
5 wvUnixGetKey(0x1219f450, 0x180c93a0, 0x12187948, 0x18052b58, 0x1) ["
/huge2/rdl/73/src/c/wvread.c":1944, 0x12157fe4]
6 wvUnixReadKey(0x12157360, 0x11fff9f0, 0x11fff9d8, 0xfffffffffffff
fff, 0x1) ["/huge2/rdl/73/src/c/wvread.c":1691, 0x12157d24]
7 wvGetEvent(0x12156d70, 0x18057730, 0x18057730, 0x18040c40, 0x1804
2ca8) ["/huge2/rdl/73/src/c/wvread.c":1283, 0x1215735c]
8 wvRunDispatcher(0x0, 0x0, 0x0, 0x0, 0x0) ["/huge2/rdl/73/src/c/wvre
ad.c":993, 0x12156d6c]
9 iodispatch(0x0, 0x0, 0x0, 0x180d47d8, 0x120a2e34) ["/huge2/rdl/73
/src/c/rnio.c":1599, 0x123eecc4]
10 rnrq(0x0, 0x180d47d8, 0x120a2e34, 0x0, 0x12085cc0) ["/huge2/rdl/7
3/src/c/rnrq.c":110, 0x120a2e30]
11 main(0x0, 0x0, 0x0, 0x0, 0x0) ["/huge2/rdl/73/src/c/drclient.c":1
93, 0x12085cbc]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


dbx.script.tmp


dbx version 3.11.8
Type 'help' for help.
Core file created by program "_progres"


signal Quit at >*[__kill, 0x3ff8010ce68] beq r19, 0x3ff8010ce80

> 0 __kill(0x3, 0x18042d80, 0x1801c4f0, 0x1, 0x347ad7ac) [0x3ff8010ce
68]
1 utcore(0x120abe48, 0x2, 0x2, 0x2, 0x1208bc58) ["/huge2/rdl/73/src
/c/utbuf.c":490, 0x12407270]
2 drexit(0x1802bbf8, 0x0, 0x18057730, 0x18062080, 0x18062080) ["/hu
ge2/rdl/73/src/c/drsetup.c":807, 0x1208bc80]
3 drSigFatal(0x18057730, 0x18062080, 0x18062080, 0x1803cd38, 0x3ff8
00ed41c) ["/huge2/rdl/73/src/c/drsig.c":1027, 0x1208c85c]
4 __read(0x18042ca8, 0x18054fa0, 0x12150030, 0x0, 0x12157ea0) [0x3f
f800d81d4]
5 wvUnixGetKey(0x1219f450, 0x180c93a0, 0x12187948, 0x18052b58, 0x1)
["/huge2/rdl/73/src/c/wvread.c":1944, 0x12157fe4]
6 wvUnixReadKey(0x12157360, 0x11fff9f0, 0x11fff9d8, 0xfffffffffffffff
f, 0x1) ["/huge2/rdl/73/src/c/wvread.c":1691, 0x12157d24]
7 wvGetEvent(0x12156d70, 0x18057730, 0x18057730, 0x18040c40, 0x1804
2ca8) ["/huge2/rdl/73/src/c/wvread.c":1283, 0x1215735c]
8 wvRunDispatcher(0x0, 0x0, 0x0, 0x0, 0x0) ["/huge2/rdl/73/src/c/wv
read.c":993, 0x12156d6c]
9 iodispatch(0x0, 0x0, 0x0, 0x180d47d8, 0x120a2e34) ["/huge2/rdl/73
/src/c/rnio.c":1599, 0x123eecc4]
10 rnrq(0x0, 0x180d47d8, 0x120a2e34, 0x0, 0x12085cc0) ["/huge2/rdl/7
3/src/c/rnrq.c":110, 0x120a2e30]
11 main(0x0, 0x0, 0x0, 0x0, 0x0) ["/huge2/rdl/73/src/c/drclient.c":1
93, 0x12085cbc]


protrace.<pid<>


PROGRESS stack trace as of Tue Nov 25 14:39:54 1997
Command line arguments are
/usr1/v73E/dlc/bin/_progres


Automatic Stack Trace Functionality not supported
KDA 11/Dec/1997

Progress Software Technical Support Note # 17478