summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/gdb/python/helper.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/gdb/python/helper.py b/tools/gdb/python/helper.py
index 146ee69..dfd01eb 100644
--- a/tools/gdb/python/helper.py
+++ b/tools/gdb/python/helper.py
@@ -16,3 +16,6 @@ def type_from_value(val):
type = type.target ()
# Get the unqualified type
return type.unqualified ()
+
+def test_bit(val, pos):
+ return bool(val & (1 << (pos-1))) \ No newline at end of file