Skip to content

[lldb] Fix error : unknown error while starting lldb's C/C++ repl #153560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 19, 2025

Conversation

anutosh491
Copy link
Member

Fixes #153157

The proposed solution has been discussed here (#153157 (comment))

This is what we would be seeing now

base) anutosh491@Anutoshs-MacBook-Air bin % ./lldb /Users/anutosh491/work/xeus-cpp/a.out
(lldb) target create "/Users/anutosh491/work/xeus-cpp/a.out"
Current executable set to '/Users/anutosh491/work/xeus-cpp/a.out' (arm64).
(lldb) b main
Breakpoint 1: where = a.out`main, address = 0x0000000100003f90
(lldb) r
Process 71227 launched: '/Users/anutosh491/work/xeus-cpp/a.out' (arm64)
Process 71227 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x0000000100003f90 a.out`main
a.out`main:
->  0x100003f90 <+0>:  sub    sp, sp, #0x10
    0x100003f94 <+4>:  str    wzr, [sp, #0xc]
    0x100003f98 <+8>:  str    w0, [sp, #0x8]
    0x100003f9c <+12>: str    x1, [sp]
(lldb) expression --repl -l c -- 
  1> 1 + 1
(int) $0 = 2
  2> 2 + 2
(int) $1 = 4
base) anutosh491@Anutoshs-MacBook-Air bin % ./lldb /Users/anutosh491/work/xeus-cpp/a.out
(lldb) target create "/Users/anutosh491/work/xeus-cpp/a.out"
Current executable set to '/Users/anutosh491/work/xeus-cpp/a.out' (arm64).
(lldb) b main
Breakpoint 1: where = a.out`main, address = 0x0000000100003f90
(lldb) r
Process 71355 launched: '/Users/anutosh491/work/xeus-cpp/a.out' (arm64)
Process 71355 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x0000000100003f90 a.out`main
a.out`main:
->  0x100003f90 <+0>:  sub    sp, sp, #0x10
    0x100003f94 <+4>:  str    wzr, [sp, #0xc]
    0x100003f98 <+8>:  str    w0, [sp, #0x8]
    0x100003f9c <+12>: str    x1, [sp]
(lldb) expression --repl -l c -- 3 + 3
Warning: trailing input is ignored in --repl mode
  1> 1 + 1
(int) $0 = 2

@llvmbot
Copy link
Member

llvmbot commented Aug 14, 2025

@llvm/pr-subscribers-lldb

Author: Anutosh Bhat (anutosh491)

Changes

Fixes #153157

The proposed solution has been discussed here (#153157 (comment))

This is what we would be seeing now

base) anutosh491@<!-- -->Anutoshs-MacBook-Air bin % ./lldb /Users/anutosh491/work/xeus-cpp/a.out
(lldb) target create "/Users/anutosh491/work/xeus-cpp/a.out"
Current executable set to '/Users/anutosh491/work/xeus-cpp/a.out' (arm64).
(lldb) b main
Breakpoint 1: where = a.out`main, address = 0x0000000100003f90
(lldb) r
Process 71227 launched: '/Users/anutosh491/work/xeus-cpp/a.out' (arm64)
Process 71227 stopped
* thread #<!-- -->1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #<!-- -->0: 0x0000000100003f90 a.out`main
a.out`main:
-&gt;  0x100003f90 &lt;+0&gt;:  sub    sp, sp, #<!-- -->0x10
    0x100003f94 &lt;+4&gt;:  str    wzr, [sp, #<!-- -->0xc]
    0x100003f98 &lt;+8&gt;:  str    w0, [sp, #<!-- -->0x8]
    0x100003f9c &lt;+12&gt;: str    x1, [sp]
(lldb) expression --repl -l c -- 
  1&gt; 1 + 1
(int) $0 = 2
  2&gt; 2 + 2
(int) $1 = 4
base) anutosh491@<!-- -->Anutoshs-MacBook-Air bin % ./lldb /Users/anutosh491/work/xeus-cpp/a.out
(lldb) target create "/Users/anutosh491/work/xeus-cpp/a.out"
Current executable set to '/Users/anutosh491/work/xeus-cpp/a.out' (arm64).
(lldb) b main
Breakpoint 1: where = a.out`main, address = 0x0000000100003f90
(lldb) r
Process 71355 launched: '/Users/anutosh491/work/xeus-cpp/a.out' (arm64)
Process 71355 stopped
* thread #<!-- -->1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #<!-- -->0: 0x0000000100003f90 a.out`main
a.out`main:
-&gt;  0x100003f90 &lt;+0&gt;:  sub    sp, sp, #<!-- -->0x10
    0x100003f94 &lt;+4&gt;:  str    wzr, [sp, #<!-- -->0xc]
    0x100003f98 &lt;+8&gt;:  str    w0, [sp, #<!-- -->0x8]
    0x100003f9c &lt;+12&gt;: str    x1, [sp]
(lldb) expression --repl -l c -- 3 + 3
Warning: trailing input is ignored in --repl mode
  1&gt; 1 + 1
(int) $0 = 2

Full diff: https://github.com/llvm/llvm-project/pull/153560.diff

1 Files Affected:

  • (modified) lldb/source/Commands/CommandObjectExpression.cpp (+6)
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index c5b91678103d5..57b56ce7eb36e 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -640,9 +640,15 @@ void CommandObjectExpression::DoExecute(llvm::StringRef command,
             repl_sp->SetValueObjectDisplayOptions(m_varobj_options);
           }
 
+          if (!expr.empty()) {
+            result.GetOutputStream().Printf(
+              "Warning: trailing input is ignored in --repl mode\n");
+          }
+
           IOHandlerSP io_handler_sp(repl_sp->GetIOHandler());
           io_handler_sp->SetIsDone(false);
           debugger.RunIOHandlerAsync(io_handler_sp);
+          return;
         } else {
           repl_error = Status::FromErrorStringWithFormat(
               "Couldn't create a REPL for %s",

Copy link

github-actions bot commented Aug 14, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@jimingham
Copy link
Collaborator

The code makes sense. It would be good to add to the repl test that you get this warning and not the previous bogus error.

@anutosh491
Copy link
Member Author

The code makes sense. It would be good to add to the repl test that you get this warning and not the previous bogus error.

Yes this makes sense to check the expected warning. Done

Copy link
Collaborator

@jimingham jimingham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anutosh491
Copy link
Member Author

Thanks for the reviews. Merging !

@anutosh491 anutosh491 merged commit 00ffd8b into llvm:main Aug 19, 2025
9 checks passed
@anutosh491 anutosh491 deleted the lldb-repl-unknown-error branch August 19, 2025 04:21
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 19, 2025

LLVM Buildbot has detected a new failure on builder lldb-x86_64-debian running on lldb-x86_64-debian while building lldb at step 6 "test".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/29212

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
UNSUPPORTED: lldb-shell :: ScriptInterpreter/Lua/nested_sessions.test (3140 of 3149)
UNSUPPORTED: lldb-shell :: Heap/heap-cstr.test (3141 of 3149)
UNSUPPORTED: lldb-shell :: ExecControl/StepIn/step_through-aarch64-thunk.test (3142 of 3149)
UNSUPPORTED: lldb-shell :: ScriptInterpreter/Lua/quit.test (3143 of 3149)
UNSUPPORTED: lldb-shell :: ScriptInterpreter/Lua/watchpoint_callback.test (3144 of 3149)
UNSUPPORTED: lldb-shell :: SymbolFile/PDB/typedefs.test (3145 of 3149)
UNSUPPORTED: lldb-shell :: ScriptInterpreter/Python/Crashlog/interactive_crashlog_legacy.test (3146 of 3149)
PASS: lldb-api :: terminal/TestEditlineCompletions.py (3147 of 3149)
PASS: lldb-api :: commands/process/attach/TestProcessAttach.py (3148 of 3149)
UNRESOLVED: lldb-api :: repl/clang/TestClangREPL.py (3149 of 3149)
******************** TEST 'lldb-api :: repl/clang/TestClangREPL.py' FAILED ********************
Script:
--
/usr/bin/python3 /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/worker/2.0.1/lldb-x86_64-debian/build/./lib --env LLVM_INCLUDE_DIR=/home/worker/2.0.1/lldb-x86_64-debian/build/include --env LLVM_TOOLS_DIR=/home/worker/2.0.1/lldb-x86_64-debian/build/./bin --arch x86_64 --build-dir /home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex --lldb-module-cache-dir /home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/worker/2.0.1/lldb-x86_64-debian/build/./bin/lldb --compiler /home/worker/2.0.1/lldb-x86_64-debian/build/./bin/clang --dsymutil /home/worker/2.0.1/lldb-x86_64-debian/build/./bin/dsymutil --make /usr/bin/gmake --llvm-tools-dir /home/worker/2.0.1/lldb-x86_64-debian/build/./bin --lldb-obj-root /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb --lldb-libs-dir /home/worker/2.0.1/lldb-x86_64-debian/build/./lib --cmake-build-type Release -t /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/API/repl/clang -p TestClangREPL.py
--
Exit Code: 1

Command Output (stdout):
--
lldb version 22.0.0git (https://github.com/llvm/llvm-project.git revision 00ffd8b8aa4e8cd3a2fee654d55995918886e874)
  clang revision 00ffd8b8aa4e8cd3a2fee654d55995918886e874
  llvm revision 00ffd8b8aa4e8cd3a2fee654d55995918886e874

�[1A�7�[1;99r�8(lldb) settings clear --all
�7
�[7mno target                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           �[0m�8(lldb) settings set symbols.enable-external-lookup false
(lldb) settings set target.inherit-tcc true
(lldb) settings set target.disable-aslr false
(lldb) settings set target.detach-on-error false
(lldb) settings set target.auto-apply-fixits false
(lldb) settings set plugin.process.gdb-remote.packet-timeout 60
(lldb) settings set symbols.clang-modules-cache-path "/home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex/module-cache-lldb/lldb-api"
(lldb) settings set use-color false
(lldb) settings set show-statusline false
�7�[1;0r�8�[J(lldb) target create "/home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex/repl/clang/TestClangREPL.test_basic_completion/a.out"
Current executable set to '/home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex/repl/clang/TestClangREPL.test_basic_completion/a.out' (x86_64).
(lldb) expression --repl -l c --
expression --repl -l c --
REPL requires a running target process.
(lldb) b main
b main
Breakpoint 1: where = a.out`main + 18 at main.c:2:3, address = 0x0000000000001142
(lldb) run
run
Process 3235992 launched: '/home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex/repl/clang/TestClangREPL.test_basic_completion/a.out' (x86_64)
Process 3235992 stopped
* thread #1, name = 'a.out', stop reason = breakpoint 1.1
    frame #0: 0x000055d52a92e142 a.out`main(argc=1, argv=0x00007ffc9b1ab288) at main.c:2:3
   1   	int main(int argc, char **argv) {

@anutosh491
Copy link
Member Author

anutosh491 commented Aug 19, 2025

Arghh, I'm sorry. I think I overlooked a self.quit() call :(

I've tried providing a simple fix here #154339
while running the test locally !

rastogishubham added a commit that referenced this pull request Aug 19, 2025
…repl (#153560)"

This reverts commit 00ffd8b.

The change breaks lldb greendragon tests

Namely, TestClangREPL.py
@rastogishubham
Copy link
Contributor

Hi, this change broke greendragon

https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/31613/changes#00ffd8b8aa4e8cd3a2fee654d55995918886e874

******************** TEST 'lldb-api :: repl/clang/TestClangREPL.py' FAILED ********************
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/venv/bin/python3.9 /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./lib --env LLVM_INCLUDE_DIR=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/include --env LLVM_TOOLS_DIR=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin --libcxx-include-dir /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/include/c++/v1 --libcxx-library-dir /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lib --arch arm64 --build-dir /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex --lldb-module-cache-dir /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin/lldb --compiler /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin/clang --dsymutil /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin/dsymutil --make /usr/bin/make --llvm-tools-dir /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin --lldb-obj-root /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/tools/lldb --lldb-libs-dir /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./lib --cmake-build-type Release --build-dir /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex -t --env TERM=vt100 /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/repl/clang -p TestClangREPL.py
04:34:56 --
04:34:56 Exit Code: 1
04:34:56
04:34:56 Command Output (stdout):
04:34:56 --
04:34:56 lldb version 22.0.99git (https://github.com/llvm/llvm-project.git revision da19383)
04:34:56 clang revision da19383
04:34:56 llvm revision da19383
04:34:56
04:34:56 �[1A�7�[1;99r�8(lldb) settings clear --all
04:34:56 �7�[100;1f�[7mno target �[0m�8(lldb) settings set symbols.enable-external-lookup false
04:34:56 (lldb) settings set target.inherit-tcc true
04:34:56 (lldb) settings set target.disable-aslr false
04:34:56 (lldb) settings set target.detach-on-error false
04:34:56 (lldb) settings set target.auto-apply-fixits false
04:34:56 (lldb) settings set plugin.process.gdb-remote.packet-timeout 60
04:34:56 (lldb) settings set symbols.clang-modules-cache-path "/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex/module-cache-lldb/lldb-api"
04:34:56 (lldb) settings set use-color false
04:34:56 (lldb) settings set show-statusline false
04:34:56 �7�[1;0r�8�[J(lldb) target create "/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex/repl/clang/TestClangREPL.test_basic_completion/a.out"
04:34:56 Current executable set to '/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex/repl/clang/TestClangREPL.test_basic_completion/a.out' (arm64).
04:34:56 (lldb) expression --repl -l c --
04:34:56 expression --repl -l c --
04:34:56 REPL requires a running target process.
04:34:56 (lldb) b main
04:34:56 b main
04:34:56 Breakpoint 1: where = a.outmain + 24 at main.c:2:3, address = 0x0000000100003fa0 04:34:56 (lldb) run 04:34:56 run 04:34:56 Process 45174 launched: '/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex/repl/clang/TestClangREPL.test_basic_completion/a.out' (arm64) 04:34:56 Process 45174 stopped 04:34:56 * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 04:34:56 frame #0: 0x000000010000bfa0 a.outmain(argc=1, argv=0x000000016fdf76b8) at main.c:2:3
04:34:56 1 int main(int argc, char **argv) {
04:34:56 -> 2 return 0;
04:34:56 ^
04:34:56 3 }
04:34:56 (lldb) expression --repl -l c --
04:34:56 expression --repl -l c --
04:34:56 �[1G�[J�[2m 1> �[0m �[1G 1> 3 + 3
04:34:56 �[1G�[2m 1> �[0m�[6G3 �[1G�[2m 1> �[0m�[8G+ �[1G�[2m 1> �[0m�[10G3�[11G
04:34:56 (int) $0 = 6
04:34:56 �[1G�[J�[2m 2> �[0m �[1G 2> �[1G�[2m 2> �[0m�[6Glong $persistent = 7; 5
04:34:56 long �[1G�[2m 2> �[0m�[11G$persistent �[1G�[2m 2> �[0m�[23G= �[1G�[2m 2> �[0m�[25G7; �[1G�[2m 2> �[0m�[28G5�[29G
04:34:56 (int) $1 = 5
04:34:56 (long) $persistent = 7
04:34:56 �[1G�[J�[2m 3> �[0m �[1G 3> $persistent + 10
04:34:56 �[1G�[2m 3> �[0m�[6G$persistent �[1G�[2m 3> �[0m�[18G+ �[1G�[2m 3> �[0m�[20G10�[22G
04:34:56 (long) $2 = 17
04:34:56 �[1G�[J�[2m 4> �[0m �[1G 4> �
04:34:56 �[1A�7�[1;99r�8�7�[100;1f�[7mno target �[0m�8(lldb) settings clear --all
04:34:56 (lldb) settings set symbols.enable-external-lookup false
04:34:56 (lldb) settings set target.inherit-tcc true
04:34:56 (lldb) settings set target.disable-aslr false
04:34:56 (lldb) settings set target.detach-on-error false
04:34:56 (lldb) settings set target.auto-apply-fixits false
04:34:56 (lldb) settings set plugin.process.gdb-remote.packet-timeout 60
04:34:56 (lldb) settings set symbols.clang-modules-cache-path "/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex/module-cache-lldb/lldb-api"
04:34:56 (lldb) settings set use-color false
04:34:56 (lldb) settings set show-statusline false
04:34:56 �7�[1;0r�8�[J(lldb) target create "/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex/repl/clang/TestClangREPL.test_completion_with_space_only_line/a.out"
04:34:56 Current executable set to '/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex/repl/clang/TestClangREPL.test_completion_with_space_only_line/a.out' (arm64).
04:34:56 (lldb) expression --repl -l c --
04:34:56 expression --repl -l c --
04:34:56 REPL requires a running target process.
04:34:56 (lldb) b main
04:34:56 b main
04:34:56 Breakpoint 1: where = a.outmain + 24 at main.c:2:3, address = 0x0000000100003fa0 04:34:56 (lldb) run 04:34:56 run 04:34:56 Process 45971 launched: '/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex/repl/clang/TestClangREPL.test_completion_with_space_only_line/a.out' (arm64) 04:34:56 Process 45971 stopped 04:34:56 * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 04:34:56 frame #0: 0x0000000102863fa0 a.outmain(argc=1, argv=0x000000016d59f690) at main.c:2:3
04:34:56 1 int main(int argc, char **argv) {
04:34:56 -> 2 return 0;
04:34:56 ^
04:34:56 3 }
04:34:56 (lldb) expression --repl -l c --
04:34:56 expression --repl -l c --
04:34:56 �[1G�[J�[2m 1> �[0m �[1G 1> 3 + 3
04:34:56 �[1G�[2m 1> �[0m�[6G �[1G�[2m 1> �[0m�[7G �[1G�[2m 1> �[0m�[8G �[1G�[2m 1> �[0m�[9G
�[K 1>�[5C�[1G�[2m 1> �[0m�[10G3 �[1G�[2m 1> �[0m�[12G+ �[1G�[2m 1> �[0m�[14G3�[15G
04:34:56 (int) $0 = 6
04:34:56 �[1G�[J�[2m 2> �[0m �[1Gsettings set interpreter.prompt-on-quit false
04:34:56 quit
04:34:56 2> settings set interpreter.prompt-on-quit false
04:34:56 quit
04:34:56 �[1G�[2m 2> �[0m�[6Gsettings �[1G�[2m 2> �[0m�[15Gset �[1G�[2m 2> �[0m�[19Ginterpreter.prompt-on-quit �[1G�[2m 2> �[0m�[46Gfalse�[1G�[1G�[J�[2m 2> �[0msettings set interpreter.prompt-on-quit false
04:34:56 �[2m 3. �[0m �[1G 3. �[1G�[2m 3. �[0m�[6Gquit�[10G
04:34:56 (null)
04:34:56 �[1G�[J�[2m 2> �[0m �[1G 2> �[1G�[2m 2> �[0m�[6GSkipping the following test categories: ['libstdcxx', 'msvcstl', 'dwo', 'llgs', 'fork']
04:34:56
04:34:56 --
04:34:56 Command Output (stderr):
04:34:56 --
04:34:56 Change dir to: /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/repl/clang
04:34:56 runCmd: settings clear --all
04:34:56
04:34:56 output:
04:34:56
04:34:56 runCmd: settings set symbols.enable-external-lookup false
04:34:56
04:34:56 output:
04:34:56
04:34:56 runCmd: settings set target.inherit-tcc true
04:34:56
04:34:56 output:
04:34:56
04:34:56 runCmd: settings set target.disable-aslr false
04:34:56
04:34:56 output:
04:34:56
04:34:56 runCmd: settings set target.detach-on-error false
04:34:56
04:34:56 output:
04:34:56
04:34:56 runCmd: settings set target.auto-apply-fixits false
04:34:56
04:34:56 output:
04:34:56
04:34:56 runCmd: settings set plugin.process.gdb-remote.packet-timeout 60
04:34:56
04:34:56 output:
04:34:56
04:34:56 runCmd: settings set symbols.clang-modules-cache-path "/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex/module-cache-lldb/lldb-api"
04:34:56
04:34:56 output:
04:34:56
04:34:56 runCmd: settings set use-color false
04:34:56
04:34:56 output:
04:34:56
04:34:56 runCmd: settings set show-statusline false
04:34:56
04:34:56 output:
04:34:56
04:34:56 /usr/bin/make VPATH=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/repl/clang -C /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex/repl/clang/TestClangREPL.test_basic_completion -I /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/repl/clang -I /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/make -f /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/repl/clang/Makefile all ARCH=arm64 CC=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang CC_TYPE=clang CXX=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang++ LLVM_AR=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin/llvm-ar AR=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin/llvm-ar OBJCOPY=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin/llvm-objcopy STRIP=/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip ARCHIVER=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin/llvm-ar DWP=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin/llvm-dwp AR=libtool DSYMUTIL=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin/dsymutil 'CODESIGN=codesign --entitlements /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/make/entitlements-macos.plist' CLANG_MODULE_CACHE_DIR=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex/module-cache-clang/lldb-api LIBCPP_INCLUDE_DIR=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/include/c++/v1 LIBCPP_LIBRARY_DIR=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lib LLDB_OBJ_ROOT=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/tools/lldb OS=Darwin HOST_OS=Darwin
04:34:56
04:34:56 /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang -g -O0 -isysroot "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk" -arch arm64 -I/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/make/../../../../..//include -I/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/tools/lldb/include -I/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/repl/clang -I/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/make -include /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/make/test_common.h -fno-limit-debug-info -MT main.o -MD -MP -MF main.d -c -o main.o /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/repl/clang/main.c
04:34:56 /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang main.o -g -O0 -isysroot "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk" -arch arm64 -I/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/make/../../../../..//include -I/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/tools/lldb/include -I/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/repl/clang -I/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/make -include /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/make/test_common.h -fno-limit-debug-info -L/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lib -Wl,-rpath,/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lib -lc++ --driver-mode=g++ -o "a.out"
04:34:56 ld: warning: ignoring duplicate libraries: '-lc++'
04:34:56 codesign --entitlements /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/make/entitlements-macos.plist -s - "a.out"
04:34:56 "/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin/dsymutil" -o "a.out.dSYM" "a.out"
04:34:56
04:34:56
04:34:56 FAIL: LLDB (/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang-arm64) :: test_basic_completion (TestClangREPL.TestCase)
04:34:56 runCmd: settings clear --all
04:34:56
04:34:56 output:
04:34:56
04:34:56 runCmd: settings set symbols.enable-external-lookup false
04:34:56
04:34:56 output:
04:34:56
04:34:56 runCmd: settings set target.inherit-tcc true
04:34:56
04:34:56 output:
04:34:56
04:34:56 runCmd: settings set target.disable-aslr false
04:34:56
04:34:56 output:
04:34:56
04:34:56 runCmd: settings set target.detach-on-error false
04:34:56
04:34:56 output:
04:34:56
04:34:56 runCmd: settings set target.auto-apply-fixits false
04:34:56
04:34:56 output:
04:34:56
04:34:56 runCmd: settings set plugin.process.gdb-remote.packet-timeout 60
04:34:56
04:34:56 output:
04:34:56
04:34:56 runCmd: settings set symbols.clang-modules-cache-path "/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex/module-cache-lldb/lldb-api"
04:34:56
04:34:56 output:
04:34:56
04:34:56 runCmd: settings set use-color false
04:34:56
04:34:56 output:
04:34:56
04:34:56 runCmd: settings set show-statusline false
04:34:56
04:34:56 output:
04:34:56
04:34:56 /usr/bin/make VPATH=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/repl/clang -C /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex/repl/clang/TestClangREPL.test_completion_with_space_only_line -I /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/repl/clang -I /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/make -f /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/repl/clang/Makefile all ARCH=arm64 CC=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang CC_TYPE=clang CXX=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang++ LLVM_AR=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin/llvm-ar AR=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin/llvm-ar OBJCOPY=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin/llvm-objcopy STRIP=/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip ARCHIVER=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin/llvm-ar DWP=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin/llvm-dwp AR=libtool DSYMUTIL=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin/dsymutil 'CODESIGN=codesign --entitlements /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/make/entitlements-macos.plist' CLANG_MODULE_CACHE_DIR=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex/module-cache-clang/lldb-api LIBCPP_INCLUDE_DIR=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/include/c++/v1 LIBCPP_LIBRARY_DIR=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lib LLDB_OBJ_ROOT=/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/tools/lldb OS=Darwin HOST_OS=Darwin
04:34:56
04:34:56 /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang -g -O0 -isysroot "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk" -arch arm64 -I/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/make/../../../../..//include -I/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/tools/lldb/include -I/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/repl/clang -I/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/make -include /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/make/test_common.h -fno-limit-debug-info -MT main.o -MD -MP -MF main.d -c -o main.o /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/repl/clang/main.c
04:34:56 /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang main.o -g -O0 -isysroot "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk" -arch arm64 -I/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/make/../../../../..//include -I/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/tools/lldb/include -I/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/repl/clang -I/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/make -include /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/make/test_common.h -fno-limit-debug-info -L/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lib -Wl,-rpath,/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lib -lc++ --driver-mode=g++ -o "a.out"
04:34:56 ld: warning: ignoring duplicate libraries: '-lc++'
04:34:56 codesign --entitlements /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/make/entitlements-macos.plist -s - "a.out"
04:34:56 "/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/./bin/dsymutil" -o "a.out.dSYM" "a.out"
04:34:56
04:34:56
04:34:56 tearing down the child process....
04:34:56
04:34:56 PASS: LLDB (/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang-arm64) :: test_completion_with_space_only_line (TestClangREPL.TestCase)
04:34:56 Restore dir to: /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/tools/lldb/test
04:34:56 ======================================================================
04:34:56 ERROR: test_basic_completion (TestClangREPL.TestCase)
04:34:56 Test that we can complete a simple multiline expression
04:34:56 ----------------------------------------------------------------------
04:34:56 Traceback (most recent call last):
04:34:56 File "/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py", line 151, in wrapper
04:34:56 return func(*args, **kwargs)
04:34:56 File "/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py", line 151, in wrapper
04:34:56 return func(*args, **kwargs)
04:34:56 File "/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/API/repl/clang/TestClangREPL.py", line 60, in test_basic_completion
04:34:56 self.child.send("expression --repl -l c -- 3 + 3\n")
04:34:56 AttributeError: 'NoneType' object has no attribute 'send'
04:34:56 Config=arm64-/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang
04:34:56 ----------------------------------------------------------------------
04:34:56 Ran 2 tests in 75.842s
04:34:56
04:34:56 FAILED (errors=1)
04:34:56
04:34:56 --
04:34:56
04:34:56 ********************

It has been reverted with 5abad32, to make sure greendragon is green

@anutosh491
Copy link
Member Author

anutosh491 commented Aug 19, 2025

Hey @rastogishubham ,

I have provided a PR fixing the test in the comment above !

#153560 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[lldb] error: unknown error while starting lldb's clang repl
5 participants