#415 epic_breakpoints does not handle autosplit paths

Stephan Ruehl
Debugger (177)
Aaron Granick

I am using a cygwin environment. This error only happens in the testing version of epic (0.6.x) and is related to the absolute path handling in epic_breakpoints.pm

For example, this script:

use POSIX;

will produce the following error when debugged in EPIC:

../../lib/POSIX.pm (autosplit into ../../lib/auto/POSIX/load_imports.al): No such file or directoryCompilation failed in require at /usr/local/lib/perl5/5.8.8/AutoLoader.pm line 27.
at /usr/local/lib/perl5/5.8.8/cygwin/POSIX.pm line 15
at /usr/local/lib/perl5/5.8.8/AutoLoader.pm line 47
AutoLoader::AUTOLOAD() called at /usr/local/lib/perl5/5.8.8/cygwin/POSIX.pm line 15
POSIX::import('POSIX') called at /cygdrive/c/dev/workspace4/test/test.pl line 2
main::BEGIN() called at /usr/local/lib/perl5/5.8.8/cygwin/POSIX.pm line 2
eval {...} called at /usr/local/lib/perl5/5.8.8/cygwin/POSIX.pm line 2
BEGIN failed--compilation aborted at /cygdrive/c/dev/workspace4/test/test.pl line 2.
at /cygdrive/c/dev/workspace4/test/test.pl line 2

It took me several days to track down this down, but I finally figured out where the problem was and was able to fix it by copying epic_breakpoints.pm into my local include path (so it would override the one in the workspace/.metadata/org.epic.debug directory) and modifying the _postponed function, adding one line to return if the path includes ' (autosplit':

return if (index($filename, " (autosplit") > 0);

For me, this was line 118 in epic_breakpoints.pm.

sub _postponed
my $filename = shift;
my $line = shift;

# ADDED LINE ignore autosplit paths
return if (index($filename, " (autosplit") > 0);

my $source_path = _abs_path($filename);

Hopefully this is enough info for someone to submit a quick patch in CVS. I really like the ability to enable/disable breakpoints while the debugger is still running.


  • Jan Ploski
    Jan Ploski

    Logged In: YES
    Originator: NO

    I will include your workaround in the next release.

    The true problem is that there is currently no way to set breakpoints in autosplit modules (e.g., if you wished to set one in POSIX::printf - no way). In fact, it's not even possible to step into subroutines defined in *.al files to view their source code. Setting breaks in such files will be quite difficult to achieve because breaking in printf.al:8 (from EPIC's point of view) would have to be translated into setting a breakpoint in POSIX.pm:334 to work correctly (I think). In order for such a translation to occur, printf.al would have to be parsed for the line number comments.

    I'll leave this bug open as a reminder.

  • Jan Ploski
    Jan Ploski

    Logged In: YES
    Originator: NO

    The workaround is now released in 0.6.11.