1827871 Members
1319 Online
109969 Solutions
New Discussion

traceback information

 
John Carlier
New Member

traceback information

For a general error routine we wish to extract the traceback information and write this to a central log file. This is for an ACMS application.
I can get the stack information via LIB$GET_CURR_INVO_CONTEXT and LIB$GET_PREV_INVO_CONTEXT. From this I can get to the PDSC but how do I now get the NAME of each module? Is this the correct approach or is there a simple way to get the traceback information?
5 REPLIES 5
Ian Miller.
Honored Contributor

Re: traceback information

On which platform and which version of VMS?
The calling standard and related things are somewhat different on I64, Alpha and VAX.
There was talk of a callable interface to trace. The symbol table information is in the .EXE but its format is not documented.
____________________
Purely Personal Opinion
Hein van den Heuvel
Honored Contributor

Re: traceback information

John Carlier!
What a blast from the past!

Happened to mention your name recently (17-Jan) on the www.decnet.nl organized 'Digital' reunion/newyears drink.

Met vriendelijke groetjes uit Nashua, NH,
Hein.
John Carlier
New Member

Re: traceback information

Sorry should have put it in the original post.

OpenVMS V7.2-1H1 on Alpha

Hein,

Good to hear from you after all this time.
Digital right-sized me 11 year ago, now with VXcompany.

Regards

John.
Volker Halle
Honored Contributor

Re: traceback information

John,

there is an undocumented interface to TBK$SHOW_TRACEBACK, see ATW 5175:

http://h71000.www7.hp.com/wizard/wiz_5175.html

It may be possible to use the user action routine (USER_ACTION_PROCEDURE) to write the traceback info to some user specific log file instead of SYS$OUTPUT.

Volker.
John Gillings
Honored Contributor

Re: traceback information

John,

The TBK$ routines can work, but aren't necessarily architecture independent and subject to change.

It may be simpler and more reliable just to use the LIB$*INVO_CONTEXT routines and dump out non-symbolic information. Worry about correlating it to routine names only if actually necessary. How often do you need to do it? It's fairly straightforward - use the MAP file for the image.

My preference is to keep error handing routines as simple as possible, to avoid the issue of trying to debug "meta" problems, or having logic errors in the handling code mask or misrepresent the real problem.
A crucible of informative mistakes