summaryrefslogtreecommitdiffstats
path: root/src/build
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2012-01-26 11:16:16 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-01-27 00:02:03 -0600
commitcc2a06c9d91f0a38a8774623efaa99a2406d3a17 (patch)
treeac468c2d694027a1ef771715d607ce6577cd42b6 /src/build
parent729d5f80bf53cacfbebe025c41cab7fe4d645a60 (diff)
downloadtalos-hostboot-cc2a06c9d91f0a38a8774623efaa99a2406d3a17.tar.gz
talos-hostboot-cc2a06c9d91f0a38a8774623efaa99a2406d3a17.zip
TracePP: Optional macro to add filename to trace.
Change-Id: Id0ba703e0f386a0d6021b870809cae01fd45b8c3 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/627 Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: CAMVAN T. NGUYEN <ctnguyen@us.ibm.com>
Diffstat (limited to 'src/build')
-rwxr-xr-xsrc/build/trace/tracepp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/build/trace/tracepp b/src/build/trace/tracepp
index 6922a4216..dfeda9d55 100755
--- a/src/build/trace/tracepp
+++ b/src/build/trace/tracepp
@@ -1,4 +1,26 @@
#!/usr/bin/perl -w
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/trace/tracepp $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2011 - 2012
+#
+# p1
+#
+# Object Code Only (OCO) source materials
+# Licensed Internal Code Source Materials
+# IBM HostBoot Licensed Internal Code
+#
+# The source code for this program is not published or other-
+# wise divested of its trade secrets, irrespective of what has
+# been deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END
use strict;
use File::Basename;
@@ -79,6 +101,7 @@ print "realcpp is $realcpp\n" if $debug;
my $opt;
my ($source, $object, @ccopts, @cppopts);
+my $source_basename;
my $dodeps = 0;
my $depfile;
my @origargs = @ARGV;
@@ -147,6 +170,7 @@ while(defined($opt = shift @ARGV)) {
exit 1;
}
$source = $opt;
+ $source_basename = basename($source).": ";
# put the - (for read-from-stdin) where the source file was
# (order is important!)
push @ccopts, "-";
@@ -341,6 +365,7 @@ sub parse_line($$)
while($line =~ m/^(.*?)trace_adal_hash\s*\(\s*((".*?(?<!\\)"\s*)+),\s*(-?\d+)\s*\)(.*)$/) {
($prefix, $strings, $salt, $suffix) = ($1, $2, $4, $5);
print "\n\nprefix = $prefix\nstrings = $strings\nsalt = $salt\nsuffix = $suffix\n" if $debug;
+ $strings =~ s/TRACEPP_INSERT_FILENAME/$source_basename/;
$strings =~ s/^"//;
$strings =~ s/"\s*$//;
$strings =~ s/"\s*"//g;
OpenPOWER on IntegriCloud