aboutsummaryrefslogtreecommitdiff
path: root/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
commit7dddad562fff1542e0c29f4bb748d0a2c7a7c449 (patch)
tree2283872900b47998a91fc7a71d4ab764924dd9a0 /utils/CollectDebugInfoUsingLLDB.py
parent5fad7a99c00980fc30ce16fb51ce09dc435c40ad (diff)
Add initial support to measure local variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121428 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/CollectDebugInfoUsingLLDB.py')
-rwxr-xr-xutils/CollectDebugInfoUsingLLDB.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/utils/CollectDebugInfoUsingLLDB.py b/utils/CollectDebugInfoUsingLLDB.py
index b82a7c172e..9dba66a22c 100755
--- a/utils/CollectDebugInfoUsingLLDB.py
+++ b/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()