Skip to content

Commit 37a823b

Browse files
debuginfo: Add timeout before running executable in LLDB tests.
This should help with a potential race condition.
1 parent 2f215f6 commit 37a823b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/etc/lldb_batchmode.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import threading
3131
import re
3232
import atexit
33+
import time
3334

3435
# Set this to True for additional output
3536
DEBUG_OUTPUT = False
@@ -175,6 +176,10 @@ def listen():
175176

176177
for line in script_file:
177178
command = line.strip()
179+
if command == "run" or command == "r" or re.match("^process\s+launch.*", command):
180+
# Before starting to run the program, let the thread sleep a bit, so all
181+
# breakpoint added events can be processed
182+
time.sleep(0.5)
178183
if command != '':
179184
execute_command(command_interpreter, command)
180185

0 commit comments

Comments
 (0)