OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [gdb-5.3/] [mmalloc/] [mmtrace.awk] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1181 sfurman
#
2
#  Awk program to analyze mtrace.c output.
3
#
4
$1 == "+"       { if (allocated[$2] != "")
5
                    print "+", $2, "Alloc", NR, "duplicate:", allocated[$2];
6
                  else
7
                    allocated[$2] = $3;
8
                }
9
$1 == "-"       { if (allocated[$2] != "") {
10
                    allocated[$2] = "";
11
                    if (allocated[$2] != "")
12
                        print "DELETE FAILED", $2, allocated[$2];
13
                  } else
14
                    print "-", $2, "Free", NR, "was never alloc'd";
15
                }
16
$1 == "<"       { if (allocated[$2] != "")
17
                    allocated[$2] = "";
18
                  else
19
                    print "-", $2, "Realloc", NR, "was never alloc'd";
20
                }
21
$1 == ">"       { if (allocated[$2] != "")
22
                    print "+", $2, "Realloc", NR, "duplicate:", allocated[$2];
23
                  else
24
                    allocated[$2] = $3;
25
                }
26
 
27
# Ignore "= Start"
28
$1 == "="       { }
29
# Ignore failed realloc attempts for now
30
$1 == "!"       { }
31
 
32
 
33
END             { for (x in allocated)
34
                    if (allocated[x] != "")
35
                      print "+", x, allocated[x];
36
                }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.