tools/gdb:add get_symbol_value api
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
parent
dbdeaa2ada
commit
9478f5b6d4
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue