-
Notifications
You must be signed in to change notification settings - Fork 0
/
mydef_debug.def
37 lines (30 loc) · 1.15 KB
/
mydef_debug.def
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
35
36
37
page: mydef_debug
output_dir: script
type:
my $mydef_page = `which mydef_page`
chomp $mydef_page
$print mydef_page: $mydef_page
grep_file($mydef_page, 'MyDef::createpage')
print "\n MyDef::createpage\n"
print " my \$plines=MyDef::compileutil::compile();\n"
print " MyDef::compileutil::output(\$plines);\n"
print "\n MyDef::compileutil::compile\n"
print " call_sub(\"_autoload\");\n"
print " call_sub(\"main\");\n"
print " \$f_parse->(\"NOOP POST_MAIN\")\n"
print " ...\n"
print " \$f_dumpout->(\@buffer, fetch_output(0), \$page->{_pageext})\n"
$if $mydef_page=~/(.*)\/bin\/mydef_page/
my $lib_dir="$1/lib/perl5/MyDef"
my $f = "$lib_dir/dumpout.pm"
$if -f $f
print "\n MyDef::dumpout::dumpout\n"
grep_file($f, '\^\(INCLUDE_BLOCK\|DUMP_STUB\)')
my $f = "$lib_dir/output_c.pm"
$if -f $f
print "\n MyDef::output_c::parsecode\n"
grep_file($f, '\^NOOP POST_MAIN')
fncode: grep_file($file, $pat)
my $l = `grep '$pat' -n $file`
$while $l=~/^\s*(\d+):\s+(.*)/mg
print " line $1:\t$2\n"