k%Writing SDA Extensions.

Writing SDA Extensions


9Previous6 | Contents


>If the queue header is itself in P2 or S2 space, you must use GSDA$EXTEND_VALIDATE_QUEUE64 to pass a 64-bit header address. Note that ;on Alpha V7, both callbacks, SDA$EXTEND_VALIDATE_QUEUE and +SDA$EXTEND_VALIDATE_QUEUE64, are available.

>Note that the callback currently provides no way to specify a ;traversation (maximum link) limit (as the VALIDATE FQUEUE command does with the /MAXIMUM _LINKS Cqualifier). If you want to specify a traversation limit, build the appropriate command string and invoke SDA$EXTEND_PARSECOMMAND to execute the command directly. 


.

Condition values returned

        
 SS$_NORMAL 6 Successful invocation of the callback. This doesA not mean that the queue was in a consistent state.
 SDA$_NOQUEUE  No queue was given; theF inadr argument was not specified or was specified as 0.



Example


#define OPT$M_SELF 0x0001  int header;    .   .   .!if (!header || (header & 7)) { I SDA$EXTEND_PRINT(desc("Queue header is zero or not quadword aligned"));  	 return; } .SDA$EXTEND_VALIDATE_QUEUE(OPT$M_SELF,header);  


<This example validates the queue whose address is stored in Fheader. Since this is a self-relative queue, a check is made Afirst to ensure that the header address is non-zero and quadword (aligned, before the callback is invoked.

@The desc() function can be found in the description of KSDA$EXTEND_PRINT_COLUMNS.





H  ' # & "                                                                                                                                                              
Table B-3 SDA message status codes
Message Name Severity Value (hex) Meaning
 SDA$_CMDNOTVLD Error  0x00F4818A ' command not valid in this context
 SDA$_IMAGENF¹ Error  0x00F486B2 4 image is not in loaded or activated image list
 SDA$_INVBLKTYP Error  0x00F480BA + Invalid block type in specified block
 SDA$_INVLDADR Error  0x00F4823A  invalid virtual address
 SDA$_INVRANGE Error  0x00F48102 % invalid address range specified
 SDA$_INVSUBTYP Error  0x00F4827A ( Invalid subtype in specified block
 SDA$_LINKTIMEMISM² Warning  0x00F48778 # image link times do not match
 SDA$_MEMNOTACC² Error  0x00F487C2 6 memory locations not accessible in override mode
 SDA$_MEMNOTSVD Warning  0x00F48228 - specified memory not saved in dump file
 SDA$_NOFILENAME¹ Warning  0x00F486F8 ) loaded image has no valid file name
 SDA$_NOLDRIMG Warning  0x00F48040 no loaded image list found
 SDA$_NOREAD Warning  0x00F48048 ' could not access specified memory
 SDA$_NOREADLDRIMG Warning  0x00F48050 ) unable to access loaded image block
 SDA$_NOQUEUE Error  0x00F4810A 0 no queue has been specified for validation
 SDA$_NOSYMBOLS Error  0x00F480C2 + No symbols found to format this block
 SDA$_NOTINPHYS Error  0x00F480AA ) virtual data not in physical memory
 SDA$_NOTVALID Error  0x00F48092 ( information not in physical memory
 SDA$_OPENIN Fatal  0x00F48144 8 error opening specified image or symbol table file
 SDA$_OUTSIDPT Error  0x00F48112 = virtual address range exceeds process page table bounds
 SDA$_PFNNOTMPD Error  0x00F4811A 2 PFN from PTE not mapped by memory descriptor
 SDA$_RD_IMAGE_ERR¹ Error  0x00F486AA , image is sliced or has a symbol vector
 SDA$_RD_SYSIMG_ERR¹ Error  0x00F486A2 ' error reading loaded system image
 SDA$_REGNOTVALID Error  0x00F4825A # register reference is invalid
 SDA$_SUCCESS Success  0x00F48009 & operation completed successfully
 SDA$_SYNTAX Warning  0x00F48060 / error parsing the supplied command string
 SDA$_UNALIGNED¹ Warning  0x00F48650 9 unaligned address; was converted to aligned address



¹Alpha only
²Alpha V7 only




K

Appendix C
OpenVMS V7.2 Alpha Addendum



HAs mentioned in the introduction of this manual, writing SDA extensions >will be supported on OpenVMS Alpha V7.2 (it will still remain >unsupported on VAX). This appendix lists the known changes in Cdevelopment environment and SDA's run-time behaviour under OpenVMS Alpha V7.2.





Note

ANote that the following information is based on the OpenVMS V7.2 FPre-Release Notes (Beta-release). There is no guarantee that Hthese or additional changes will be included in the Open VMS V7.2 final Frelease. Do not assume that the entire following information Gremains valid; before writing your extension under OpenVMS Alpha V7.2, Gread the Release Notes, Version 7.2 and the New features, 4Version 7.2 manuals.



EOnly DEC C supported. - Only DEC C is the supported @language when writing SDA extensions. Arguments of callback are Hoptimized for invocation from C (e.g., strings are not longer passed by Hdescriptor; instead, they are passed as ASCIZ (zero-terminated) strings by reference). ¹

BCallbacks, status codes, literals and option bits are now Edefined. - All SDA callbacks, literals and options bits are 1now defined in module sda_routines.h in ?SYS$SHARE:SYS$LIB_C.TLB. In addition, all SDA return codes are +available from module SDAMSG from GSYS$SHARE:VMS$VOLATILE_PRIVATE_INTERFACES.OLB. There is no longer need to declare it in your code.

GExtension jacket object now part of object library. - tThe object containing the jacket routines (see Section A.2) is not >longer provided as separate file, it is included as module in CSYS$SHARE:VMS$VOLATILE_PRIVATE_INTERFACES.OLB. Therefore, you must 3include this object library in your link operation.

GThird argument passed to extensions main entry point. D- The extension's initialization (main) routine is now invoked with :three arguments. In addition to the callback pointer (see «Section 2.2.2.1) and the command pointer (see Section 2.2.2.2), SDA passes 6a bitmask as third argument, indicating the following:



DFor this reason, the SDA$EXTEND_ON_CURRENT_SYSTEM callback does not longer exist.

FCallbacks removed. - The following callbacks are not longer available:



DSDA$EXTEND_PRINT_COLUMN_VALUE and SDA$EXTEND_TRANSLATE_ADDRESS were Fremoved since they do not confirm the calling standard (are called as Fsubroutines, expect and return arguments in processor registers). For Ethe remaining callbacks, were appropriate, replacements are provided.

HCallbacks added. - The following new callbacks are now available:



GCallbacks renamed. - All callbacks are renamed in the >way that the EXTEND_ prefix is removed from their names (e.g, BSDA$EXTEND_GETMEN becomes SDA$GETMEM). In addition, the following (callbacks were renamed in a special way: # #                      
Old name New name
" SDA$EXTEND_FORMAT_SUBHEADING  SDA$FORMAT_HEADING
 SDA$EXTEND_GET_IMAGE_OFF  SDA$GET_IMAGE_OFFSET
 SDA$EXTEND_HANDLER  SDA$COND_HANDLER
 SDA$EXTEND_LIB$INS_DECODE  SDA$INSTRUCTION_DECODE
 SDA$EXTEND_PARSECOMMAND  SDA$PARSE_COMMAND


FEnhanced 64-bit support. - The "64" Asuffix was removed from the approbate callback names since these Ecallbacks provide now 64-bit support by default. There are no longer C32-bit versions; you can use the 64-bit callbacks to access 32-bit addresses as well.

CThe following callbacks now accept or return full 64-bit addresses:



>The following callbacks accept or return 64-bit symbol values:



FThe following callbacks accept 64-bit arguments suitable for use with the SYS$FAOL_64 system service:



GCallbacks enhanced. - Many callbacks provide enhanced Gfeatures and are optimized to be called from C. Strings are now passed >in ASCIZ (zero-terminated) format by reference, not longer by Edescriptor or with a separate length argument. Where approbate, they Bare returned in ASCIZ format as well. In some cases, the argument :sequence was changed, making less-used arguments optional.

EDebugger image provided. - SDA is now provided in a Gversion suitable for extension debugging. To use this version, compile Hand link your extension with /DEBUG. Thereafter, enter:

$ DEFINE SDA SDA_DEBUG


Dand invoke SDA as usual. The above image will allow you to run your 'extension under the debugger's control.






Note

B

¹ You can still continue to write your Gextension in your favorite language, but must declare all SDA-specific Eliterals yourself and must provide callback arguments in a C-conform way.




9Previous6 | Contents6 | Contents