[Lldb-commits] [lldb] [lldb] Fix deadlock when a REPL expression hits a breakpoint (PR #227400)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 29 10:49:32 PDT 2026


================
@@ -0,0 +1,25 @@
+# Test that a REPL expression that hits a breakpoint drops into the command
+# interpreter and that lldb exits once its input is exhausted.
+
+# UNSUPPORTED: system-windows
+
+# RUN: split-file %s %t
+# RUN: %clang_host -g %t/main.c -o %t.out
+
+# Disable the inferior's stdio so that it doesn't consume the REPL input from
+# stdin.
+# RUN: %lldb -o 'settings set target.disable-stdio true' -o 'b main' -o run \
+# RUN:   -o 'b foo' %t.out < %t/repl.input 2>&1 | FileCheck %s
+
+# The REPL message and the asynchronous stop notification can be printed in
+# either order.
+# CHECK-DAG: Execution stopped at breakpoint.
----------------
JDevlieghere wrote:

Both these lines come from printing, which happens before RunIOHandlerAsync, so nothing rally checks that the command interpreter was pushed and accepts a command. I think we need to run one more command to show that it did to make this test meaningful. 

https://github.com/llvm/llvm-project/pull/227400


More information about the lldb-commits mailing list