At 9:59 PM -0500 2/2/06, John E. Malmberg wrote:
>I am currently building a patch that allows Perl to enter the OpenVMS debugger 
>when an exception occurs, if the the logical name PERL_EXCEPTION_DEBUG is 
>present.
>
>What I could use some help in creating a perl script that would cause an 
>exception to be signaled so that I can verify that it works.

Not quite the question that you asked, but note that you can pop Perl
into the debugger by calling the dump() function from within Perl:

$ perl -e "dump();"

See the section on dump in perlvms.pod:

http://perldoc.perl.org/perlvms.html#dump

Just about anything that sets errno should generate an exception I
would think.  How about opening a file that does not exist:

$ perl -e "open F, '<', 'nonexistentfile'; print $^E;"
%RMS-E-FNF, file not found


>Also, to fully take advantage of this feature, all compiles should always be 
>/DEBUG/OPTIMIZE on ALPHA and I64 for non-debug builds.

>On ALPHA and I64, the link procedure should always be /DSF which will create a 
>debug symbol file (.DSF) external to the image.  This .DSF file  can be used 
>in case the distributed binary needs debugging, but keeps the binary files 
>small.
>
>I do not know how to change the build procedure to take advantage of this on 
>the three platforms because of it's complexity.

Hmm.  I did not know about /DSF.  Does the debugger automatically
find the .DSF files if they are in the same directory as the
executables?  The main difficulty I see is that these files would
have to be installed, which would involve modifications to
installperl and to MakeMaker and Module::Build.

I would suggest that as a first cut we only implement the
PERL_EXCEPTION_DEBUG option for builds created with -Dusevmsdebug.
The debug symbols would already be in the executable in that case.
Then we can take on adding /DSF capabilities as a separate project.
-- 
________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Reply via email to