- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Need access to EXE$EXCEPTABLE
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2006 09:53 AM
тАО11-13-2006 09:53 AM
Need access to EXE$EXCEPTABLE
As background, We have an exception handler in our software that grabs all exceptions and ships them off the box for alarming, filtering, and storage. This exception handler needs to know if the status code is a hardware exception or a software exception so it can correctly handle the number of signal arguments. (This exception routine, use to just decrement the number of exception arguments by 2 assuming it was a software error, but I noticed that this fails on hardware exceptions because the PC and the PSL are the last two arguments during a hardware exceptions.) If you don't know what I'm talking about; you haven't used exception handling routines that much...
Additional research. In looking at the VMS source listings in routine SYS$PUTMSG (SYSPUTMSG.LIS) I noticed that the code uses the table EXE$EXCEPTABLE. This is a table of system exceptions and the number of arguments for each exception. If the status code is not found in this table, PUTMSG subtracts 2 from the ARGCNT. See the area around тАЬSpecial system message setupтАЭ. This code is also interesting, because PUTMSG also retrieves the number of arguments for this condition from this table and handle RMS status codes as well (STV value). I always wondered why you didnтАЩt pass the number of arguments for hardware exceptions or for RMS status values and now I know how all of this works.
Now, my problem. I need to do the same thing! The problem is, I canтАЩt get to EXE$EXCEPTABLE without linking with SYS$BASE_IMAGE; and I donтАЩt really want to do that.
I also took a look at traceback and it uses an internal routine (TBK$IS_HARDWARE_EXCEPTION) which uses itтАЩs own list. I didnтАЩt really want to maintain my own list either.
So, IтАЩm stuck at the moment.
My question, is there another way to determine if a VMS status code is a hardware exception or not; so that I can handle the number of arguments in a signal handler correctly without keeping my own list. I sure wish there was a routine to check EXE$EXCEPTABLE table that was a public symbol. This is very kludgy (new word?) the way this works that hardware exceptions and software exceptions were not done exactly the same way (no argument count) -тАУ but IтАЩm sure that is lost in history as to why it was done this way many years ago on the VAX.
Roger Tucker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2006 09:48 PM
тАО11-13-2006 09:48 PM
Re: Need access to EXE$EXCEPTABLE
the fact that traceback ([TRACE]TKBIO) maintains it's own list and it's internal routine TBK$IS_HARDWARE_EXCEPTION seems to indicate, that there may be no better way to get this information via a public interface. This module has not changed since 1992 ...
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2006 10:14 PM
тАО11-13-2006 10:14 PM
Re: Need access to EXE$EXCEPTABLE
SYS$GETMSG returns the count of FAO arguments in byte 1 of the outadr argument. Could this information help ?
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2006 09:58 AM
тАО11-14-2006 09:58 AM
Re: Need access to EXE$EXCEPTABLE
LIB$SIGNAL and LIB$STOP tack on the PC and PS/PSL and increment the number of arguments in the signal array by 2. Even the Fortran and MACRO examples in the 8.2 RTL library documentation for LIB$SIGNAL are wrong. The C example is correct.
The example condition handler there shows what is going on. Notice that for system exceptions you DO NOT pass the number of arguments in the signal, but for your own error messages you MUST. For example, if you wanted to signal your own error message you would do something like this:
lib$signal(MY_OWN_CONDITION,2,P1,P2,SS$_ACCVIO,2,0xFACE);
The ACCVIO takes 4 arguments, 2 are passed, the PC and PS/PSL are tacked on by lib$signal. This is NOT documented correctly in section 9.8.1 of the programming concepts manual; where it shows lib$signal() different than lib$stop with reguard to the number of arguments and don't mention the difference between system error conditions and user-defined error conditions. The example MTH$ signal in section 9.8.2 does show this, but doesn't explain why. Now I know...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2006 10:05 AM
тАО11-14-2006 10:05 AM
Re: Need access to EXE$EXCEPTABLE
Status 1300, Condition 162, args 3 %SYSTEM-F-UNALIGN_SP_LOAD, unaligned load of SP, virtual address=!XH, PC=!XH, PS=!XL
Status 1308, Condition 163, args 3 %SYSTEM-F-GENTRAP, software trap, code=!XL, PC=!XH, PS=!XL
Status 1316, Condition 164, args 2 %SYSTEM-F-FLTINV, floating invalid operation, PC=!XH, PS=!XL
Status 1324, Condition 165, args 2 %SYSTEM-F-FLTINE, floating inexact result, PC=!XH, PS=!XL
Status 1332, Condition 166, args 2 %SYSTEM-F-DECDIV, decimal divide by zero, PC=!XH, PS=!XL
Status 1340, Condition 167, args 2 %SYSTEM-F-DECINV, decimal invalid operand, PC=!XH, PS=!XL
Status 1348, Condition 168, args 2 %SYSTEM-F-ASSERTERR, assertion error, PC=!XH, PS=!XL
Status 1356, Condition 169, args 2 %SYSTEM-F-NULPTRERR, null pointer error, PC=!XH, PS=!XL
Status 1364, Condition 170, args 2 %SYSTEM-F-STKOVF, stack overflow, PC=!XH, PS=!XL
Status 1372, Condition 171, args 2 %SYSTEM-F-STRLENERR, string length error, PC=!XH, PS=!XL
Status 1380, Condition 172, args 2 %SYSTEM-F-SUBSTRERR, substring error, PC=!XH, PS=!XL
Status 1388, Condition 173, args 2 %SYSTEM-F-RANGEERR, range error, PC=!XH, PS=!XL
Status 1396, Condition 174, args 2 %SYSTEM-F-SUBRNG1, subscript 1 range error, PC=!XH, PS=!XL
Status 1404, Condition 175, args 2 %SYSTEM-F-SUBRNG2, subscript 2 range error, PC=!XH, PS=!XL
Status 1412, Condition 176, args 2 %SYSTEM-F-SUBRNG3, subscript 3 range error, PC=!XH, PS=!XL
Status 1420, Condition 177, args 2 %SYSTEM-F-SUBRNG4, subscript 4 range error, PC=!XH, PS=!XL
Status 1428, Condition 178, args 2 %SYSTEM-F-SUBRNG5, subscript 5 range error, PC=!XH, PS=!XL
Status 1436, Condition 179, args 2 %SYSTEM-F-SUBRNG6, subscript 6 range error, PC=!XH, PS=!XL
Status 1444, Condition 180, args 2 %SYSTEM-F-SUBRNG7, subscript 7 range error, PC=!XH, PS=!XL
Status 1452, Condition 181, args 4 %SYSTEM-F-PAGRDERRXM, page read error across access modes, I/O status=!XL, virtual address=!XH, PC=!XH, PSL=!XL
Status 3172, Condition 396, args 2 %SYSTEM-F-EMULATED, an instruction not implemented on this processor was emulated at PC=!XH, PS=!XL
Status 9604, Condition 1200, args 3 %SYSTEM-F-TRANSCALLER, routine at !XL cannot be called by translated code
Status 9660, Condition 1207, args 3 %SYSTEM-F-SIG_INVARGTYPE, signature block specifies an invalid argument type; PC/PDA: !XL
Status 9668, Condition 1208, args 3 %SYSTEM-F-SIG_INVFLTARG, signature block specifies an invalid floating argument type; PC/PDA: !XL
Status 9676, Condition 1209, args 3 %SYSTEM-F-SIG_INVARGLIST, signature block will generate more than 255 OpenVMS arguments; PC/PDA: !XL
Status 9684, Condition 1210, args 3 %SYSTEM-F-SIG_INVFUNCTYPE, signature block specifies an invalid function value type; PC/PDA: !XL
Status 9692, Condition 1211, args 3 %SYSTEM-F-SIG_ARGMISMATCH, signature block & OpenVMS arglist have mismatched argument datatypes; PDA: !XL
Notice that 9604, 9660, 9668, 9676, 9684 and 9692 have an argument count that doesn't agree with the message.
PUTMSG uses the argument count from EXE$EXCEPTABLE if found; but you must pass the argument count for your own user-defined error messages. Also !XL maybe should be !XH in theses messages.
I've decided that I'm going to extract the status codes and argument counts from EXE$EXCEPTABLE and use that, but in the future it sure would be nice if there was an easier way to do this.
I just don't like the whole way SYS$SIGNAL and SYS$STOP append the PC and PSL without you knowing about it; then you having to correct the argument count in a signal handler and knowing when you need to do this to make everything work correctly.
Also, having to know the number of arguments for system conditions but the number of arguments for user-defined conditions being in the signal array.
Now that I understand it all - I think I can deal with it. Good luck if your new to VMS and your writing a complex condition handler!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2006 03:22 AM
тАО11-15-2006 03:22 AM
Re: Need access to EXE$EXCEPTABLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2006 03:23 AM
тАО11-15-2006 03:23 AM
Re: Need access to EXE$EXCEPTABLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2006 09:55 AM
тАО11-17-2006 09:55 AM
Re: Need access to EXE$EXCEPTABLE
sys$putmsg() reads past the message vector in some cases.
for example, the following code works:
#include
int main()
{
unsigned long msgvec[6] =
{ 3, 12, 1, 2, 3, 4 };
/* ^number of arguments = 3 */
return sys$putmsg(msgvec);
}
The number of arguments in the msgvec is 3, but an accvio (12) needs 4 arguments and reads off the end of the message vector for them! This has to work this way because of the way lib$signal(), last_chance handler, and putmsg() has to work. If you write your own signal handler to call putmsg(), you must subtract two from the number of signal arguments and call putmsg and hope it reads off the end. There is no other way to make this work.