Permalink
Browse files

Fix "step over" and "step into" bugs

  • Loading branch information...
1 parent 594c301 commit fd7dc7df742dc1d9546b32ba12a037f64882856c Rocky Bernstein committed Dec 10, 2012
Showing with 11 additions and 1 deletion.
  1. +3 −0 example/nexting.pl
  2. +1 −1 lib/Devel/Trepan/CmdProcessor/Command/Step.pm
  3. +3 −0 t/data/step.cmd
  4. +4 −0 t/data/step.right
View
3 example/nexting.pl
@@ -13,3 +13,6 @@ ()
$x = 8;
$x += $y;
$x += $z;
+$x += 5;
+$x -= 5;
+
View
2 lib/Devel/Trepan/CmdProcessor/Command/Step.pm
@@ -87,7 +87,7 @@ sub run($$) {
my $replace_cmd = $Keyword_to_related_cmd->{$args->[1]};
if (defined($replace_cmd)) {
my $cmd = $proc->{commands}{$replace_cmd};
- return $cmd->run( ($replace_cmd, splice(@$args, 2)) );
+ return $cmd->run( [$replace_cmd, splice(@$args, 2)] );
# } elsif ('until' eq $args->[1]) {
# my $try_condition = join(@$args[2..-1], ' ');
# if (valid_condition?(try_condition)) {
View
3 t/data/step.cmd
@@ -6,4 +6,7 @@ next
# Try a command with a continuation (\)
step \
2
+# Try "step into" and "step over"
+step into
+step over
quit!
View
4 t/data/step.right
@@ -11,4 +11,8 @@ $x=6; $y = p(); my $z = p();
$x = 8;
-- main::(nexting.pl:15)
$x += $z;
+-- main::(nexting.pl:16)
+$x += 5;
+-- main::(nexting.pl:17)
+$x -= 5;
trepan.pl: That's all, folks...

0 comments on commit fd7dc7d

Please sign in to comment.