File: traceinfo

package info (click to toggle)
gerbera 1.1.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 4,684 kB
  • sloc: cpp: 29,611; xml: 967; ansic: 463; perl: 328; sh: 316; sql: 135; python: 75; makefile: 11; fortran: 9
file content (34 lines) | stat: -rwxr-xr-x 758 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/perl

# pipe the text output of  zmm::Exception::printStackTrace()
# through this script to receive symbolic information about stack trace

# use strict;

my $STRACE_TAG = "_STRACE_";

while(my $line = <STDIN>)
{
    if ($line =~ m/^$STRACE_TAG\s*([0-9]+)\s+(\S+)\s+\[(.*)\]\s*$/)
    {
        my $pos = $1;
        my $exe = $2;
        my $addr = $3;

        if($exe =~ m/^(.*)\(/)
        {
            $exe = $1;
        }
        my $com = "addr2line --demangle --basenames --functions --exe $exe $addr";
        my $trace = `$com`;
        $trace =~ s/\n/ /g;
        print "$pos $trace\n";
    }
    else
    {
        print `date`;
        print $line;
    }
}

# addr2line --demangle --basenames --functions --exe mediaserver 0x8057c48