Questions tagged [lldb]

LLDB is a debugger built as a set of reusable components which highly leverage existing libraries in the larger LLVM Project, such as the Clang expression parser and LLVM disassembler.

LLDB is a debugger built as a set of reusable components which highly leverage existing libraries in the larger LLVM Project, such as the Clang expression parser and LLVM disassembler. It is distributed with the Xcode development environment. Home page is http://lldb.llvm.org/

1918 questions
17
votes
2 answers

Remote debugging using lldb/Xcode

I've got 2 stations, one for development and another one for testing. I'd like to be able to run and debug targets that were built under release mode (the code is stripped) on the testing station. Since the code may not be copied to the testing…
Zohar81
  • 4,554
  • 5
  • 29
  • 82
17
votes
10 answers

What's the difference between "p" and "po" in Xcode's LLDB debugger?

Example: I write the following string in my old project and a new, clear one: UIInterfaceOrientation k = [UIApplication sharedApplication].statusBarOrientation; Console input/output for a clear project: (lldb) po…
Vyachaslav Gerchicov
  • 2,317
  • 3
  • 23
  • 49
17
votes
1 answer

Terminal command-line debug of iOS Simulator apps?

Is it possible to use GDB or LLDB from the Terminal command-line under Mac OS X to debug apps running on the iOS Simulator? (e.g. not from within Xcode's GUI or console, but using an external command-line or process). If so, how?
hotpaw2
  • 70,107
  • 14
  • 90
  • 153
16
votes
2 answers

Xcode 13/iOS15 is taking longer than expected to launch, it shows a LLDB related message

I am using Xcode 13 on a Macbook Pro (Intel/2019) with macOS Big Sur 11.6 I am building and launching the app on a connecting iPhone X running iOS 15.0, I am also running a UI test suite based on XCUITest while I do that. The app takes extremely…
nChetan
  • 193
  • 1
  • 11
16
votes
3 answers

Xcode12 po command in lldb in console cannot find variables in scope

Ever since I updated to Xcode 12, I have not been able to print out variables in the console while debugging with lldb. Using print() statements directly in Swift code outputs to the console as expected. A command in the console such as po "hi"…
CoolPineapple
  • 275
  • 1
  • 3
  • 11
16
votes
1 answer

How to view the contents of a vector of tuples when debugging in LLDB?

I'm using Visual Studio Code and the LLDB Debugger (CodeLLDB vadimcn.vscode-lldb) for programming in Rust. When using Vec I can see all values in a list (until a limit of > 10000): When using a vector of tuples (Vec<(u64, u64)>), I can't see…
kaiser
  • 940
  • 1
  • 10
  • 25
16
votes
5 answers

Swift LLDB Message ""

I'm having a pretty annoying problem in the Swift debugger when I'm trying to print out the description of an object. When trying to print and object, either using the po command or fr v command, I get messages like error: :1:1: error: use of…
Ziewvater
  • 1,413
  • 1
  • 18
  • 33
16
votes
2 answers

How to use a debugger like GDB or LLDB to debug a crate in Rust?

I am writing a new crate. I wrote some tests for it and run the tests using cargo test. After that, some test_xxx executables are generated in the target folder. I have enabled the debug option in Cargo.toml. By running gdb targets/test_xxx, I can…
Minjie Zha
  • 171
  • 1
  • 5
16
votes
2 answers

stringWithFormat not working in LLDB

Why doesn't this work? (lldb) po [NSString stringWithFormat:@"%f", 1.0] error: too many arguments to method call, expected 1, have 2 error: 1 errors parsing expression But this does: (lldb) p (void)printf("%f", 1.0) 1.000000 Is Objective-C…
Ortwin Gentz
  • 52,648
  • 24
  • 135
  • 213
16
votes
2 answers

How can I manually generate a core dump (or equivalent) in lldb attached to iOS

Sometimes I'm trying to track down a really rare bug in an iOS app. I'll hit it in the debugger after hours of trying to repro only to have xcode or lldb crash on me while I'm debugging (usually if I'm stepping through C++ code). This is beyond…
stokastic
  • 986
  • 2
  • 7
  • 19
16
votes
3 answers

Random (lldb) crashes in iOS Simulator on Mac OS X 10.8.4

I've been struggling with an weird issue for some time now. When running my app with the iOS Simulator initially closed it launches correctly. But if I then run it again without closing the simulator it crashes and just prints (lldb) in the error…
Daniel Tovesson
  • 2,550
  • 1
  • 30
  • 41
16
votes
2 answers

lldb python error

I tried running lldb on my mac and get this at startup: Traceback (most recent call last): File "", line 1, in File "/System/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/Python/lldb/embedded_interpreter.py",…
gigasai
  • 564
  • 4
  • 23
16
votes
1 answer

LLDB - Evaluate Address In Register

To view my stack in LLDB, I currently use the following: (lldb) register read rbp --format hex rbp = 0x00007fff5fbff820 Then to view the first 64-bytes growing down: (lldb) memory read --size 4 --format x --count 16…
Scruffers
  • 4,984
  • 8
  • 35
  • 41
16
votes
2 answers

How to print out a property's contents using Xcode debugger?

I'm writing an iOS app and I need help using the built-in Xcode debugger. Suppose I have an object called HomeViewController that has three properties @property (nonatomic) BOOL finished; @property (nonatomic, strong) NSArray *myArray; @property…
Nosrettap
  • 10,940
  • 23
  • 85
  • 140
15
votes
2 answers

How to call class methods in the iOS simulator with lldb?

I'm trying to debug an iOS app and I'm having problems with lldb in the simulator. Calling class methods doesn't seem to work. Instance methods work fine. (lldb) po Category (lldb) po [Category class] error: Couldn't prepare the…
devioustree
  • 231
  • 2
  • 7