diff options
author | Adrian Prantl <aprantl@apple.com> | 2014-02-21 00:17:02 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2014-02-21 00:17:02 +0000 |
commit | 75c47799434885787d26ecbafcb10db48674401d (patch) | |
tree | 8c7686634e2294dc938cf8650e73d6cceec93d0f /debuginfo-tests/llgdb.py | |
parent | 37dc9e19f56be33b139f60478676541519af6103 (diff) | |
download | bcm5719-llvm-75c47799434885787d26ecbafcb10db48674401d.tar.gz bcm5719-llvm-75c47799434885787d26ecbafcb10db48674401d.zip |
Add a fallback path for buildbots temporarily stuck on really old
versions of LLDB.
llvm-svn: 201828
Diffstat (limited to 'debuginfo-tests/llgdb.py')
-rw-r--r-- | debuginfo-tests/llgdb.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/debuginfo-tests/llgdb.py b/debuginfo-tests/llgdb.py index 8316578b7fd..3bd25bf52ca 100644 --- a/debuginfo-tests/llgdb.py +++ b/debuginfo-tests/llgdb.py @@ -84,6 +84,7 @@ for command in args.script: try: if re.match('^r|(run)$', cmd[0]): + import time, random; time.sleep(random.randint(0,10)) error = lldb.SBError() launchinfo = lldb.SBLaunchInfo([]) launchinfo.SetWorkingDirectory(os.getcwd()) @@ -123,10 +124,17 @@ NOTE: There are several resons why this may happen: print target.FindFirstType(cmd[1]) elif re.match('^po$', cmd[0]) and len(cmd) > 1: - opts = lldb.SBExpressionOptions() - opts.SetFetchDynamicValue(True) - opts.SetCoerceResultToId(True) - print target.EvaluateExpression(' '.join(cmd[1:]), opts) + try: + opts = lldb.SBExpressionOptions() + opts.SetFetchDynamicValue(True) + opts.SetCoerceResultToId(True) + print target.EvaluateExpression(' '.join(cmd[1:]), opts) + except: + # FIXME: This is a fallback path for the lab.llvm.org + # buildbot running OS X 10.7; it should be removed. + thread = process.GetThreadAtIndex(0) + frame = thread.GetFrameAtIndex(0) + print frame.EvaluateExpression(' '.join(cmd[1:])) elif re.match('^p|(print)$', cmd[0]) and len(cmd) > 1: thread = process.GetThreadAtIndex(0) |