Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > perl.debugger > #2

Re: Can not get required info from 'caller' at 'DB::sub'

Newsgroups perl.debugger
References <434161449401082@web19g.yandex.ru>
Subject Re: Can not get required info from 'caller' at 'DB::sub'
Message-ID <4300861449406110@web25m.yandex.ru> (permalink)
Date 2015-12-06 14:48 +0200
From kes-kes@yandex.ua (KES)

Show all headers | View raw


The calling from DB::sub to any subs does not add a stack frame <<-- good info to put into perldoc:
http://search.cpan.org/~abigail/perl-5.23.5/pod/perldebguts.pod#Writing_Your_Own_Debugger

so I am in my 
DB::sub {
    @caller_info = get_caller( 0 );
    #instead of this: @caller_info = caller( 0 );
}
sub get_caller {
       caller( @_ );
}

The question is resolved.

06.12.2015, 13:24, "KES" <kes-kes@yandex.ua>:
> http://paste.scsys.co.uk/502483
>
>  Also it is strange to see the DB::DB is called twice for t3.pl (Notice the line 82, 85 at the paste)
> The twice call does not occour if I remove 'caller' from t3.pl:4. Like: print 'FROM:';
>
> The output:
> ...
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> t3.pl:9 my $x = 3;
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> t3.pl:11 t();
> SUB: main::t -
> FROM: main - t3.pl - 17
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> t3.pl:4 print "FROM";
> FROM
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> t3.pl:13 $x++;
> 3
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> t3.pl:18 print $x;

Back to perl.debugger | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Can not get required info from 'caller' at 'DB::sub' kes-kes@yandex.ua (KES) - 2015-12-06 13:24 +0200
  Re: Can not get required info from 'caller' at 'DB::sub' kes-kes@yandex.ua (KES) - 2015-12-06 14:48 +0200

csiph-web