Permalink
Browse files

Add package and function name to "info program"

  • Loading branch information...
1 parent 14be7d1 commit b8d4e4ebb4ab2d8459987617fab44c1c77585d6f Rocky Bernstein committed Dec 24, 2012
Showing with 9 additions and 3 deletions.
  1. +9 −3 lib/Devel/Trepan/CmdProcessor/Command/Info_Subcmd/Program.pm
@@ -26,9 +26,13 @@ HELP
sub run($$)
{
my ($self, $args) = @_;
- my $proc = $self->{proc};
- my $frame = $proc->{frame};
- my $line = $frame->{line};
+ my $proc = $self->{proc};
+ my $frame = $proc->{frame};
+ my $line = $frame->{line};
+ my $pkg = $frame->{pkg};
+ my $function = $frame->{fn} if
+ $frame->{fn} && $frame->{fn} ne 'DB::DB';
+
my $m;
if (defined($DB::ini_dollar0) && $DB::ini_dollar0) {
$m = sprintf "Program: %s.", $DB::ini_dollar0;
@@ -40,6 +44,8 @@ sub run($$)
$m = sprintf "OP address: 0x%x.", $DB::OP_addr;
$proc->msg($m);
}
+ $proc->msg("Function: $function") if defined $function;
+ $proc->msg("Package: $pkg");
if ('return' eq $proc->{event}) {
$proc->{commands}{info}->run(['info', 'return']);
} elsif ('raise' eq $proc->{event}) {

0 comments on commit b8d4e4e

Please sign in to comment.