diff --git a/tools/gdb/utils.py b/tools/gdb/utils.py index 2381e0916e..2e49b2cf6c 100644 --- a/tools/gdb/utils.py +++ b/tools/gdb/utils.py @@ -179,3 +179,10 @@ def is_target_smp(): return True else: return False + + +def get_symbol_value(name): + """Return the value of a symbol value etc: Variable, Marco""" + + gdb.execute("set $_%s = %s" % (name, name)) + return gdb.parse_and_eval("$_%s" % name)