[rtems-tools commit] Add helper func.
Chris Johns
chrisj at rtems.org
Sun Aug 24 23:45:35 UTC 2014
Module: rtems-tools
Branch: master
Commit: a4d0739522651592f5f2b45e51f3957f3d11cdeb
Changeset: http://git.rtems.org/rtems-tools/commit/?id=a4d0739522651592f5f2b45e51f3957f3d11cdeb
Author: Dhananjay Balan <mb.dhananjay at gmail.com>
Date: Sun Aug 25 23:22:20 2013 +0530
Add helper func.
- tests a bit at specified position.
---
tools/gdb/python/helper.py | 3 +++
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
More information about the vc
mailing list