about summary refs log tree commit diff stats
path: root/miasm2/core/utils.py
diff options
context:
space:
mode:
authorserpilliere <devnull@localhost>2014-08-21 11:09:24 +0200
committerserpilliere <devnull@localhost>2014-08-21 11:09:24 +0200
commitcc2b6e079aff0a3c6172a58eb8cb76f885add7f9 (patch)
treedd8ce7dd97c2ebef249193743b07de2716b1a9ff /miasm2/core/utils.py
parent3e889c0369e3fbc71ec17e094819305083b7d056 (diff)
downloadmiasm-cc2b6e079aff0a3c6172a58eb8cb76f885add7f9.tar.gz
miasm-cc2b6e079aff0a3c6172a58eb8cb76f885add7f9.zip
jit: move code into arch directory
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]