Deleted Added
sdiff udiff text old ( 10009:8523754f8885 ) new ( 10972:53d63eeee46f )
full compact
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
3# Copyright (c) 2013 Advanced Micro Devices, Inc.
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright
9# notice, this list of conditions and the following disclaimer;
10# redistributions in binary form must reproduce the above copyright
11# notice, this list of conditions and the following disclaimer in the

--- 37 unchanged lines hidden (view full) ---

49 # original DPRINTF() call. It is left unmodified.
50 # str_list is used for concatenating the argument
51 # list following the format specifier. A DPRINTF()
52 # call may or may not contain any arguments following
53 # the format specifier. These two cases need to be
54 # handled differently. Hence the check whether or not
55 # the str_list is empty.
56
57 dflag = "%s" % (self.exprs[0].name)
58 machine.addDebugFlag(dflag)
59 format = "%s" % (self.exprs[1].inline())
60 format_length = len(format)
61 str_list = []
62
63 for i in range(2, len(self.exprs)):
64 str_list.append("%s" % self.exprs[i].inline())
65
66 if len(str_list) == 0:
67 code('DPRINTF($0, "$1: $2")',
68 dflag, self.exprs[0].location, format[2:format_length-2])
69 else:
70 code('DPRINTF($0, "$1: $2", $3)',
71 dflag,
72 self.exprs[0].location, format[2:format_length-2],
73 ', '.join(str_list))
74
75 return self.symtab.find("void", Type)
76
77 # hack for adding comments to profileTransition
78 if self.proc_name == "APPEND_TRANSITION_COMMENT":
79 # FIXME - check for number of parameters

--- 117 unchanged lines hidden ---