diff options
author | Anutosh Bhat <andersonbhat491@gmail.com> | 2025-08-19 09:51:20 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-19 09:51:20 +0530 |
commit | 00ffd8b8aa4e8cd3a2fee654d55995918886e874 (patch) | |
tree | af0e4bfe4bc6d9eba399ab4d0d2d8dd9fd5dbaae /clang/lib/AST/ByteCode/Program.cpp | |
parent | 144736b07e03f27888860f6ad7aa13a77f7c9731 (diff) | |
download | llvm-00ffd8b8aa4e8cd3a2fee654d55995918886e874.zip llvm-00ffd8b8aa4e8cd3a2fee654d55995918886e874.tar.gz llvm-00ffd8b8aa4e8cd3a2fee654d55995918886e874.tar.bz2 |
[lldb] Fix error : unknown error while starting lldb's C/C++ repl (#153560)
Fixes https://github.com/llvm/llvm-project/issues/153157
The proposed solution has been discussed here
(https://github.com/llvm/llvm-project/issues/153157#issue-3313379242)
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
```
Diffstat (limited to 'clang/lib/AST/ByteCode/Program.cpp')
0 files changed, 0 insertions, 0 deletions