Skip to content

Bug 668 tweak call stack parser #7

Merged
merged 1 commit into from Mar 23, 2014

2 participants

@arnodb
arnodb commented Mar 21, 2014

This change was tested on linux x86_64, with a vanilla perl 5.12.5 (freshly compiled) and a distributed perl 5.18.2 (debian). It should fix issue http://sourceforge.net/p/e-p-i-c/bugs/668/.

It does two things:

  • match the new debugger stack pattern (apostrophe)
  • skip the additional DB::DB stack item which is a duplicate of the one obtained from currentIP (hackish but it works)
@jploski
Owner
jploski commented Mar 21, 2014

Thanks! I tried to reproduce the DB::DB case for skipFirst=1 using 5.8.12, but apparently it doesn't happen to me. Can you explain it a bit more or maybe post a simple demo script (which I could then integrate into test_Variables.pl or test_Debugger.pl)?

@arnodb
arnodb commented Mar 22, 2014

When I add System.out.println(stackTrace + "\n"); to the code, here is what I get with the following script:

use strict;

sub func2() {
    print "func 2\n";
}

sub func1() {
    print "func 1\n";
    func2;
}

func1;

print "end\n";

I start the debugger, and successively press F5,F6,F5.

Perl 5.12.5 (the first non empty trace appears after the first F5, i.e. when I enter func1):

. = main::func1() called from file `/home/arnaud/workspace/test-perl/stack.pl' line 12

. = main::func1() called from file `/home/arnaud/workspace/test-perl/stack.pl' line 12

. = main::func2() called from file `/home/arnaud/workspace/test-perl/stack.pl' line 9
. = main::func1() called from file `/home/arnaud/workspace/test-perl/stack.pl' line 12

Perl 5.18.2 (the first non empty trace appears before the first F5, i.e. first breakpoint):

@ = DB::DB called from file '/home/arnaud/workspace/test-perl/stack.pl' line 12

@ = DB::DB called from file '/home/arnaud/workspace/test-perl/stack.pl' line 8
. = main::func1() called from file '/home/arnaud/workspace/test-perl/stack.pl' line 12

@ = DB::DB called from file '/home/arnaud/workspace/test-perl/stack.pl' line 9
. = main::func1() called from file '/home/arnaud/workspace/test-perl/stack.pl' line 12

@ = DB::DB called from file '/home/arnaud/workspace/test-perl/stack.pl' line 4
. = main::func2() called from file '/home/arnaud/workspace/test-perl/stack.pl' line 9
. = main::func1() called from file '/home/arnaud/workspace/test-perl/stack.pl' line 12

Note: my 5.18 version comes from deb package perl 5.18.2-2 amd64. Maybe I should test with a vanilla install but I would be surprised if that changes anything.

@arnodb
arnodb commented Mar 22, 2014

Perl 5.18.2 freshly compiled with default (i.e. no) options: same thing.

@jploski jploski merged commit 3d2d764 into jploski:testing Mar 23, 2014
@jploski
Owner
jploski commented Mar 23, 2014

I could see the DB::DB thing today - must have been testing with a wrong version of Perl previously. It's now released in version 0.6.55.

@arnodb
arnodb commented Mar 24, 2014

Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.