Open KingKong5147 opened 4 years ago
This is an arm64e problem and I've had this on my todo list for a while now. Stay tuned.
I look forward too the update :) Hopefully before Xmas would be awesome 😎
Sent from my iPhone
On 16 Sep 2020, at 12:29 am, Hayden notifications@github.com wrote:
This is an arm64e problem and I've had this on my todo list for a while now. Stay tuned.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
LLDB is still not working (Jun 17 2021)...
When executing in mobile
:
~ sudo lldb lambda
(lldb) target create "lambda"
Current executable set to '/private/var/mobile/Documents/code/lambda' (arm64).
(lldb) b main
Breakpoint 1: where = lambda`main + 28 at lambda.cpp:12:7, address = 0x0000000100006f58
(lldb) run
lldb(64031,0x16c1af000) malloc: *** error for object 0x102e06f58: pointer being freed was not allocated
lldb(64031,0x16c1af000) malloc: *** set a breakpoint in malloc_error_break to debug
********************
Crash reproducer for lldb version 10.0.0 (https://github.com/ProcursusTeam/Procursus.git revision 4c55e9c553549f0f842d3e03247f7f47be2c6e76)
Swift version 5.3.1 (swift-5.3.1-RELEASE)
Reproducer written to '/var/tmp/reproducer-112c4d'
Before attaching the reproducer to a bug report:
- Look at the directory to ensure you're willing to share its content.
- Make sure the reproducer works by replaying the reproducer.
Replay the reproducer with the following command:
lldb -replay /var/tmp/reproducer-112c4d
********************
[1] 64030 abort sudo lldb lambda
When executing in root
:
# sudo lldb lambda
(lldb) target create "lambda"
Current executable set to '/private/var/mobile/Documents/code/lambda' (arm64).
(lldb) b main
Breakpoint 1: where = lambda`main + 28 at lambda.cpp:12:7, address = 0x0000000100006f58
(lldb) run
1 location added to breakpoint 1
[1] 64139 bus error sudo lldb lambda
Do you mind checking this now with the latest LLDB? @KingKong5147 @ArArgon
Sure , I’m away for the next three weeks . When I get back I’ll report back 👍🏻
Sent from my iPhone
On 25 Jun 2021, at 1:03 am, Hayden @.***> wrote:
Do you mind checking this now with the latest LLDB? @KingKong5147 @ArArgon
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Here's what happened on my iPad. @Diatrus
Now lldb lets program run, but breakpoints never work either on root
or mobile
!
A sample C++ program:
#include <functional>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
auto f = [] (int a, int b) {
return a < b;
};
int a, b;
cout << "Number 1:";
cin >> a;
cout << "Number 2:";
cin >> b;
cout << "Number 1 < Number 2: " << f(a, b) << endl;
return 0;
}
Compile it: c++ -std=c++17 lambda.cpp -g -o lambda
. Then load it into lldb.
Here's what lldb on iOS does:
~ lldb lambda
(lldb) target create "lambda"
Current executable set to '/var/mobile/Documents/code/lambda' (arm64).
(lldb) b 13
Breakpoint 1: where = lambda`main + 60 at lambda.cpp:13:6, address = 0x0000000100006fb0
(lldb) b main
Breakpoint 2: where = lambda`main + 28 at lambda.cpp:12:7, address = 0x0000000100006f90
(lldb) r
1 location added to breakpoint 1
1 location added to breakpoint 2
Process 90913 launched: '/var/mobile/Documents/code/lambda' (arm64)
Number 1:10
Number 2:20
Number 1 < Number 2: 1
Process 90913 exited with status = 0 (0x00000000)
(lldb) q
Debugger does not stop at breakpoints.
Meanwhile on macOS:
~ lldb lambda
(lldb) target create "lambda"
Current executable set to '/Users/***/tmp/lambda' (x86_64).
(lldb) b main
Breakpoint 1: where = lambda`main + 22 at lambda.cpp:12:7, address = 0x00000001000030e6
(lldb) b 13
Breakpoint 2: where = lambda`main + 41 at lambda.cpp:13:6, address = 0x00000001000030f9
(lldb) r
Process 21756 launched: '/Users/***/tmp/lambda' (x86_64)
Process 21756 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
frame #0: 0x00000001000030e6 lambda`main at lambda.cpp:12:7
9 return a < b;
10 };
11 int a, b;
-> 12 cout << "Number 1:";
13 cin >> a;
14 cout << "Number 2:";
15 cin >> b;
(lldb) n
Process 21756 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 2.1
frame #0: 0x00000001000030f9 lambda`main at lambda.cpp:13:6
10 };
11 int a, b;
12 cout << "Number 1:";
-> 13 cin >> a;
14 cout << "Number 2:";
15 cin >> b;
16 cout << "Number 1 < Number 2: " << f(a, b) << endl;
(lldb) n
Number 1:100
Process 21756 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x000000010000310d lambda`main at lambda.cpp:14:7
11 int a, b;
12 cout << "Number 1:";
13 cin >> a;
-> 14 cout << "Number 2:";
15 cin >> b;
16 cout << "Number 1 < Number 2: " << f(a, b) << endl;
17 return 0;
(lldb) p a
(int) $0 = 100
(lldb) q
Quitting LLDB will kill one or more processes. Do you really want to proceed: [Y/n] y
lldb
on iOS:
lldb version 11.1.0
Swift version 5.4.1 (swift-5.4.1-RELEASE)
iOS Information:
Darwin ***-iPad 20.1.0 Darwin Kernel Version 20.1.0: Fri Oct 30 00:34:17 PDT 2020; root:xnu-7195.42.3~1/RELEASE_ARM64_T8020 iPad8,9 arm64 J417AP Darwin
Try to attach to process and get the following error?...