From: Chris Nandor Date: Mon, 4 Mar 2002 17:48:12 +0000 (-0500) Subject: debugger filenames for Mac OS - db.patch (1/1) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=aa057b67fd1a188e25f81780a894bf7db377546c;p=p5sagit%2Fp5-mst-13.2.git debugger filenames for Mac OS - db.patch (1/1) Message-Id: p4raw-id: //depot/perl@15150 --- diff --git a/lib/DB.pm b/lib/DB.pm index 96e436b..342f5d8 100644 --- a/lib/DB.pm +++ b/lib/DB.pm @@ -93,6 +93,16 @@ sub DB { $usrctxt = "package $DB::package;"; # this won't let them modify, alas local(*DB::dbline) = "::_<$DB::filename"; + + # we need to check for pseudofiles on Mac OS (these are files + # not attached to a filename, but instead stored in Dev:Pseudo) + # since this is done late, $DB::filename will be "wrong" after + # skippkg + if ($^O eq 'MacOS' && $#DB::dbline < 0) { + $DB::filename = 'Dev:Pseudo'; + *DB::dbline = "::_<$DB::filename"; + } + my ($stop, $action); if (($stop,$action) = split(/\0/,$DB::dbline{$DB::lineno})) { if ($stop eq '1') { diff --git a/lib/perl5db.pl b/lib/perl5db.pl index 3365691..711755e 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -667,6 +667,14 @@ sub DB { $usercontext = '($@, $!, $^E, $,, $/, $\, $^W) = @saved;' . "package $package;"; # this won't let them modify, alas local(*dbline) = $main::{'_<' . $filename}; + + # we need to check for pseudofiles on Mac OS (these are files + # not attached to a filename, but instead stored in Dev:Pseudo) + if ($^O eq 'MacOS' && $#dbline < 0) { + $filename_ini = $filename = 'Dev:Pseudo'; + *dbline = $main::{'_<' . $filename}; + } + $max = $#dbline; if ($dbline{$line} && (($stop,$action) = split(/\0/,$dbline{$line}))) { if ($stop eq '1') {