about summary refs log tree commit diff stats
path: root/miasm2/core/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/core/utils.py')
-rw-r--r--miasm2/core/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/miasm2/core/utils.py b/miasm2/core/utils.py
index ebffd786..360deb8d 100644
--- a/miasm2/core/utils.py
+++ b/miasm2/core/utils.py
@@ -1,4 +1,5 @@
 import struct
+import inspect
 
 upck8 = lambda x: struct.unpack('B', x)[0]
 upck16 = lambda x: struct.unpack('H', x)[0]
@@ -44,3 +45,6 @@ class keydefaultdict(collections.defaultdict):
             raise KeyError(key)
         value = self[key] = self.default_factory(key)
         return value
+
+def whoami():
+    return inspect.stack()[2][3]