python: Use __name__ instead of func_name for Py3 compat

Change-Id: I62a9685b4bce7e9012bc65309fcafe26135fde6d
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15997
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
diff --git a/src/python/m5/SimObject.py b/src/python/m5/SimObject.py
index 20bb5fa..9904807 100644
--- a/src/python/m5/SimObject.py
+++ b/src/python/m5/SimObject.py
@@ -875,7 +875,7 @@
     """Decorator to export C++ functions to Python"""
 
     def decorate(func):
-        name = func.func_name
+        name = func.__name__
         override = kwargs.get("override", False)
         cxx_name = kwargs.get("cxx_name", name)