Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ lldb ../../bin/hw43
- (lldb) target create "../../bin/hw43"
- Current executable set to '../../bin/hw43' (x86_64).
- (lldb) l
- 5 int main(int argc, char const * argv[]) {
- 6
- 7 int a = 0;
- 8 int b;
- 9 int c = 0;
- 10
- 11 printf("a=%p b=%p c=%p\n", &a, &b, &c);
- 12
- 13 return 0;
- 14 }
- (lldb) breakpoint set --file hw43.c --line 7
- Breakpoint 1: where = hw43`main + 15 at hw43.c:7:7, address = 0x0000000100000f49
- (lldb) breakpoint set --file hw43.c --line 9
- Breakpoint 2: where = hw43`main + 22 at hw43.c:9:7, address = 0x0000000100000f50
- (lldb) breakpoint set --file hw43.c --line 13
- Breakpoint 3: where = hw43`main + 61 at hw43.c:13:10, address = 0x0000000100000f77
- (lldb) process launch
- Process 42721 launched: '/XXXX/bin/hw43' (x86_64)
- Process 42721 stopped
- * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
- frame #0: 0x0000000100000f49 hw43`main(argc=1, argv=0x00007ffeefbff3f8) at hw43.c:7:7
- 4
- 5 int main(int argc, char const * argv[]) {
- 6
- -> 7 int a = 0;
- 8 int b;
- 9 int c = 0;
- 10
- Target 0: (hw43) stopped.
- (lldb) frame variable
- (int) argc = 1
- (const char **) argv = 0x00007ffeefbff3f8
- (int) a = 1
- (int) b = 20517
- (int) c = 32766
- (lldb) continue
- Process 42721 resuming
- Process 42721 stopped
- * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 2.1
- frame #0: 0x0000000100000f50 hw43`main(argc=1, argv=0x00007ffeefbff3f8) at hw43.c:9:7
- 6
- 7 int a = 0;
- 8 int b;
- -> 9 int c = 0;
- 10
- 11 printf("a=%p b=%p c=%p\n", &a, &b, &c);
- 12
- Target 0: (hw43) stopped.
- (lldb) frame variable
- (int) argc = 1
- (const char **) argv = 0x00007ffeefbff3f8
- (int) a = 0
- (int) b = 20517
- (int) c = 32766
- (lldb) continue
- Process 42721 resuming
- a=0x7ffeefbff3cc b=0x7ffeefbff3c8 c=0x7ffeefbff3c4
- Process 42721 stopped
- * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 3.1
- frame #0: 0x0000000100000f77 hw43`main(argc=1, argv=0x00007ffeefbff3f8) at hw43.c:13:10
- 10
- 11 printf("a=%p b=%p c=%p\n", &a, &b, &c);
- 12
- -> 13 return 0;
- 14 }
- 15
- Target 0: (hw43) stopped.
- (lldb) frame variable
- (int) argc = 1
- (const char **) argv = 0x00007ffeefbff3f8
- (int) a = 0
- (int) b = 20517
- (int) c = 0
- (lldb) continue
- Process 42721 resuming
- Process 42721 exited with status = 0 (0x00000000)
- (lldb) quit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement