summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/HPMHookGen/HPMHookGen.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/HPMHookGen/HPMHookGen.pl b/tools/HPMHookGen/HPMHookGen.pl
index 4fa548e44..f97eefb84 100755
--- a/tools/HPMHookGen/HPMHookGen.pl
+++ b/tools/HPMHookGen/HPMHookGen.pl
@@ -21,6 +21,11 @@ sub trim($) {
sub parse($$) {
my ($p, $d) = @_;
+
+ # Strip gcc attributes
+ $p =~ s/\s*__attribute__\s*\(\(.*$//;
+ $d =~ s/\s*__attribute__\s*\(\(.*$//;
+
$p =~ s/^.*?\)\((.*)\).*$/$1/; # Clean up extra parentheses )(around the arglist)
# Retrieve return type