summaryrefslogtreecommitdiffstats
path: root/llvm/utils/CollectDebugInfoUsingLLDB.py
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-12-09 23:18:58 +0000
committerDevang Patel <dpatel@apple.com>2010-12-09 23:18:58 +0000
commit3967ef8df3cab9091bc1f4e39f2f004f3e03c705 (patch)
treee9a1925a565f469986e09628fa275dd762e901d5 /llvm/utils/CollectDebugInfoUsingLLDB.py
parent31d6d84f278b0963f69afffd9784471337612013 (diff)
downloadbcm5719-llvm-3967ef8df3cab9091bc1f4e39f2f004f3e03c705.tar.gz
bcm5719-llvm-3967ef8df3cab9091bc1f4e39f2f004f3e03c705.zip
Add initial support to measure local variables.
llvm-svn: 121428
Diffstat (limited to 'llvm/utils/CollectDebugInfoUsingLLDB.py')
-rwxr-xr-xllvm/utils/CollectDebugInfoUsingLLDB.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/utils/CollectDebugInfoUsingLLDB.py b/llvm/utils/CollectDebugInfoUsingLLDB.py
index b82a7c172e6..9dba66a22c2 100755
--- a/llvm/utils/CollectDebugInfoUsingLLDB.py
+++ b/llvm/utils/CollectDebugInfoUsingLLDB.py
@@ -66,7 +66,7 @@ def print_var_value (v, file, frame):
file.write(v.GetValue(frame))
# print_vars - Print variable values in output file.
-def print_vars (vars, fname, line, file, frame, target, thread):
+def print_vars (tag, vars, fname, line, file, frame, target, thread):
# disable this thread.
count = thread.GetStopReasonDataCount()
bid = 0
@@ -87,7 +87,7 @@ def print_vars (vars, fname, line, file, frame, target, thread):
bp_loc.SetEnabled(False);
for i in range(vars.GetSize()):
- file.write("#Argument ")
+ file.write(tag)
file.write(fname)
file.write(':')
file.write(str(line))
@@ -163,10 +163,12 @@ if target.IsValid():
if fname is None:
fname = function.GetName()
#print "function : ",fname
- vars = frame.GetVariables(1,0,0,0)
line = frame.GetLineEntry().GetLine()
- print_vars (vars, fname, line, file, frame, target, thread)
- #print vars
+ vars = frame.GetVariables(1,0,0,0)
+ print_vars ("#Argument ", vars, fname, line, file, frame, target, thread)
+ vars = frame.GetVariables(0,1,0,0)
+ print_vars ("#Variables ", vars, fname, line, file, frame, target, thread)
+
process.Continue()
file.close()
OpenPOWER on IntegriCloud