[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::debug

Title:DEBUG
Notice:Updated locations for reporting QARs -- see note 834.1
Moderator:LOWFAT::DIETER
Created:Fri Jan 24 1986
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1868
Total number of notes:8200

1845.0. "-DEBUG-E-WRITE_FAILED, an attempt to write into a memory location faile" by CSC32::E_VAETH (Suffering from temporary brain cramp, stay tuned) Tue Mar 11 1997 16:51

On OpenVMS VAX I can:

(compile/link for debug)

DBG> SET MODULE SHARE$DECC$SHR
DBG> set break SHARE$DECC$SHR\decc$gethostname
DBG>

However, on Alpha, I cannot:


DBG> set module share$decc$shr
DBG> set break SHARE$DECC$SHR\decc$gethostname
%DEBUG-W-NOBREAKAT, cannot set break or trace at address FFFFFFFF805B2AC8
-DEBUG-E-WRITE_FAILED, an attempt to write into a memory location failed

I suspect this is expected since decc$shr is a resident image, right?  

thanks,

Elin 
T.RTitleUserPersonal
Name
DateLines
1845.1there is an arduous workaroundCUJO::SAMPSONTue Mar 11 1997 22:0739
	re: .-1

	Yes.  You *can* activate your own private copy (prevent sharing)
of a shareable image installed resident, in P0 instead of S0 space.
This is done using the old trick of defining a logical name for the
image that has the version (even just a semicolon) in the equivalence
name, e.g.: $ DEFINE/JOB DECC$SHR SYS$SHARE:DECC$SHR.EXE;

	Unfortunately, resident shareable images have an annoying tendancy
to refer to each other, so you can't get away with just defining *one*
logical name.  Oh, no.  You have to go down all of the shareable image
lists of all of the resident images activated (directly or indirectly)
by your application, and provide logical names for *all* of them.  This
will force private P0 copies and ensure that the fixups are all done
correctly.  If you don't do this for *all* activated resident images,
you'll just get an ACCVIO.  If you do, then you're free to set breakpoints
in DECC$SHR and/or any of the others.

	As an example, I've recently been trying to track down an ACCVIO
and stack corruption in the new BNU (Bookshelf Navigation Utility).  The
logical names needed to make P0 copies for the resident images activated
by BNU are as follows (see HYLNDR::CDROM conference, topic 427 for details):

$ define/user DECW$DXMLIBSHR12 SYS$SHARE:DECW$DXMLIBSHR12.EXE;
$ define/user DECW$XMLIBSHR12 SYS$SHARE:DECW$XMLIBSHR12.EXE;
$ define/user CDE$UNIX_ROUTINES SYS$SHARE:CDE$UNIX_ROUTINES.EXE;
$ define/user DECW$MRMLIBSHR12 SYS$SHARE:DECW$MRMLIBSHR12.EXE;
$ define/user DECW$XTLIBSHRR5 SYS$SHARE:DECW$XTLIBSHRR5.EXE;
$ define/user DECW$XLIBSHR SYS$SHARE:DECW$XLIBSHR.EXE;
$ define/user DECC$SHR SYS$SHARE:DECC$SHR.EXE;
$ define/user DPML$SHR SYS$SHARE:DPML$SHR.EXE;
$ define/user CMA$TIS_SHR SYS$SHARE:CMA$TIS_SHR.EXE;
$ define/user LBRSHR SYS$SHARE:LBRSHR.EXE;
$ define/user LIBRTL SYS$SHARE:LIBRTL.EXE;
$ define/user LIBOTS SYS$SHARE:LIBOTS.EXE;
$ BNU

	HTH,
	Bob Sampson
1845.2procedure to figure out the dependencies...GIDDAY::GILLINGSa crucible of informative mistakesTue Mar 11 1997 23:21116
$!
$!  Command procedure to display the shareable image dependence tree for
$!  and executable or shareable image. Works against VAX and Alpha images,
$!  also works on Alpha VESTed images.
$!
$!  Syntax:
$!    @IMAGETREE <imagename> [FULL]
$!
$!  <imagename> is the name of the shareable image, defaults to SYS$SHARE:.EXE
$!
$!  FULL is a flag which directs the procedure to perform a complete tree
$!	traversal. Since the procedure works by parsing ANALYZE/IMAGE output
$!	this can result in excessive processing. The default is to keep track
$!	of images already analysed and display them as "repeat image"
$!
$!  Note that all dependent images must be accessible. The procedure uses
$!  the same algorithm as the image activator to locate images.
$!
$!  Author: � John Gillings, Digital Customer Support Centre, 23-September-1994
$!
$!  THIS IS UNSUPPORTED SOFTWARE
$!
$ IF p1.EQS."" THEN INQUIRE p1 "Image name"
$ IF p1.EQS."" THEN EXIT
$ SET NOON
$ prefix="''prefix'  "
$ level='level'+1
$ IF level.EQ.1.AND.p2.EQS."" THEN CREATE/NAME_TABLE IMAGE_TREE_TABLE
$ pid=F$GETJPI("","PID")
$ tmpfile="SYS$SCRATCH:IMAGETREE''pid'_''level'.TMP;"
$ tmpfile1="SYS$SCRATCH:IMAGETREE''pid'_''level'.TMP1;"
$ imagfile=F$PARSE(p1,"SYS$SHARE:.EXE")
$ imagname=F$PARSE(imagfile,,,"NAME")
$ IF F$SEARCH(imagfile).EQS.""
$ THEN
$   WRITE SYS$OUTPUT "''prefix'''imagname' (no such file)"
$ ELSE
$   IF p2.EQS."".AND.F$TRNLNM(imagname,"IMAGE_TREE_TABLE").NES.""
$   THEN
$     WRITE SYS$OUTPUT "''prefix'''imagname' (repeat)"
$   ELSE
$     IF p2.EQS."" THEN DEFINE/TABLE=IMAGE_TREE_TABLE 'imagname "TRUE"
$     DEFINE/USER SYS$ERROR NL:
$     DEFINE/USER SYS$OUTPUT NL:
$     ANALYZE/IMAGE/OUTPUT='tmpfile' 'imagfile'/FIXUP
$     ON CONTROL_Y THEN GOTO eof
$     OPEN/READ in'level' 'tmpfile'
$     searchtype: READ/ERROR=eof/END=eof in'level' LINE
$       IF F$LOCATE("image type:",LINE).GE.F$LENGTH(LINE) THEN -
      GOTO searchtype
$     prot=F$FILE_ATTRIBUTES(imagfile,"PRO")-"SYSTEM"-"GROUP"-"OWNER"-"WORLD"
$     prot=F$EDIT(prot,"COLLAPSE")-"="-"="-"="-"="
$     execute=LINE
$     IF F$LOCATE("executable",execute).GE.F$LENGTH(execute)
$     THEN
$       READ/ERROR=eof/END=eof in'level' LINE
$	maj=F$ELEMENT(1,"'",LINE)
$       min=F$ELEMENT(3,"'",LINE)
$       READ/ERROR=eof/END=eof in'level' LINE
$	mat=F$ELEMENT(1,":",LINE)-"ISD$K_"
$	mat=F$EDIT(mat,"COLLAPSE")
$     ENDIF
$     searchver: READ/ERROR=eof/END=eof in'level' LINE
$       IF F$LOCATE("image file identification: ",LINE).GE.F$LENGTH(LINE) THEN -
      GOTO searchver
$     ident=F$EDIT(LINE,"TRIM")-"image file identification: "-""""-"""" 
$     IF F$LOCATE("executable",execute).LT.F$LENGTH(execute)
$     THEN
$       WRITE SYS$OUTPUT "''prefix'''imagname', executable ''ident' (''prot')"
$     ELSE
$       WRITE SYS$OUTPUT "''prefix'''imagname',"+-
		" shareable (''maj',''min',''mat'), ''ident' (''prot')"
$     ENDIF
$     knowfile=imagfile
$     IF F$LOCATE("SYS$SYSROOT:[SYSEXE]",imagfile).EQ.0 THEN -
		knowfile="SYS$SYSTEM:''imagname'.EXE"
$     IF F$LOCATE("SYS$SYSROOT:[SYSLIB]",imagfile).EQ.0 THEN -
		knowfile="SYS$SHARE:''imagname'.EXE"
$     IF F$FILE_ATTRIBUTE(knowfile,"KNOWN")
$     THEN
$       DEFINE/USER SYS$OUTPUT 'tmpfile1'
$	INSTALL LIST/FULL 'knowfile'
$	OPEN/READ/ERROR=EndInstalled install_info 'tmpfile1'
$	READ/END=EndInstalled install_info info
$	READ/END=EndInstalled install_info info
$	READ/END=EndInstalled install_info info
$	info=F$EDIT(info,"TRIM,COMPRESS")
$	info=info-F$ELEMENT(0," ",info)
$	WRITE SYS$OUTPUT "''prefix' Installed''info'"
$	info_loop: READ/END=EndInstalled install_info info
$	IF F$LOCATE("Privileges",info).GE.F$LENGTH(info) THEN GOTO info_loop
$	info=F$EDIT(info,"TRIM,COMPRESS")
$	WRITE SYS$OUTPUT "''prefix' ''info'"
$	READ/END=EndInstalled install_info info
$	info=F$EDIT(info,"TRIM,COMPRESS")
$	IF info.NES."" THEN WRITE SYS$OUTPUT "''prefix'              ''info'"
$	EndInstalled: CLOSE install_info
$	DELETE 'tmpfile1'
$     ENDIF
$     searchlist: READ/ERROR=eof/END=eof in'level' LINE
$       IF F$LOCATE("Shareable Image List",LINE).GE.F$LENGTH(LINE) THEN -
      GOTO searchlist
$     searchfirst:  READ/END=eof/ERROR=eof in'level' LINE
$       IF F$LOCATE(")",LINE).GE.F$LENGTH(LINE) THEN GOTO searchfirst
$       IF F$LOCATE("this image",LINE).LT.F$LENGTH(LINE) THEN GOTO searchfirst
$     fileloop: nextfile=F$ELEMENT(1,"""",LINE)
$       IF nextfile.EQS."""" .OR.nextfile.EQS."" THEN GOTO eof
$       @'F$ENVIRONMENT("PROCEDURE") 'nextfile' 'p2'
$       READ/ERROR=eof/END=eof in'level' LINE
$     GOTO fileloop
$     eof: CLOSE in'level'
$     DELETE 'tmpfile'
$   ENDIF
$ ENDIF
$ IF level.EQ.1.AND.p2.EQS."" THEN DEASSIGN/TABLE=LNM$PROCESS_DIRECTORY IMAGE_TREE_TABLE
$ EXIT
1845.3Thanks!CSC32::E_VAETHSuffering from temporary brain cramp, stay tunedWed Mar 12 1997 09:420