In the process of finding some bugs, I found that running in the (VMS)
debugger [after a build with VMS-debug support selected] would not
let me debug XS code.
Here's a couple of minor patches to make XS code debuggable:
o SUBCONFIGURE.COM
if "VMS-DEBUG" selected set $Config{ldflags} to /DEBUG/NOOPT/TRACE
(picked up by MM_VMS when creating DESCRIP.MMS for modules)
o MM_VMS.PM
look for "/DEBUG" flag in $Config{ldflags}, and if present turn
off the funky #line ... stuff that XSUBPP does so that error
messages in XS code will refer to XS files/line #'s.
Unfortunately, that same info makes life rough for the VMS debugger.
BTW, I'm seeing failures of the vmsish test #17 that might be due to being
east of greenwich. This'll be a good opportunity to debug 'em.
Patches collected at http://crinoid.com/perl560.htmlx as usual, but be
warned that FTP is likley the most reliable means of fetching them.
Patch follows:
diff -uBb lib/ExtUtils/MM_VMS.pm-orig lib/ExtUtils/MM_VMS.pm
--- lib/ExtUtils/MM_VMS.pm-orig Sat May 6 08:39:43 2000
+++ lib/ExtUtils/MM_VMS.pm Sat May 6 11:31:02 2000
@@ -880,7 +880,11 @@
if( exists $self->{XSOPT} ){
unshift( @tmargs, $self->{XSOPT} );
}
-
+ if ($Config{'ldflags'} &&
+ $Config{'ldflags'} =~ m!/Debug!i &&
+ (!exists($self->{XSOPT}) || $self->{XSOPT} !~ /linenumbers/)) {
+ unshift(@tmargs,'-nolinenumbers');
+ }
my $xsubpp_version = $self->xsubpp_version($self->catfile($xsdir,'xsubpp'));
# What are the correct thresholds for version 1 && 2 Paul?
diff -uBb vms/subconfigure.com-orig vms/subconfigure.com
--- vms/subconfigure.com-orig Sat May 6 08:39:09 2000
+++ vms/subconfigure.com Sat May 6 11:28:34 2000
@@ -219,7 +219,6 @@
$ perl_cc=Mcc
$ perl_d_sockpair="undef"
$ perl_i_neterrno="define"
-$ perl_ldflags="/NoTrace/NoMap"
$ perl_d_lchown="undef"
$ perl_d_mknod="undef"
$ perl_d_union_semun="undef"
@@ -3665,9 +3664,11 @@
$ then
$ perl_optimize="/Debug/NoOpt"
$ perl_dbgprefix = "DBG"
+$ perl_ldflags="/Debug/Trace/NoMap"
$ else
$ perl_optimize= ""
$ perl_dbgprefix = ""
+$ perl_ldflags="/NoTrace/NoMap"
$ endif
$!
$! Okay, we've got everything configured. Now go write out a config.sh.
--
Drexel University \V --Chuck Lane
----------------->--------*------------<[EMAIL PROTECTED]
(215) 895-1545 / \ Particle Physics [EMAIL PROTECTED]
FAX: (215) 895-5934 /~~~~~~~~~~~ [EMAIL PROTECTED]