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
19
votes
1 answer

LLDB throwing auto import error in Swift Xcode project

I'm trying to use the debugger in Xcode to poke around in one of my methods. The app is pretty bare bones, just one example class at this point. When I set a breakpoint and run, the LLDB debugger pane opens in Xcode as expected. However, if I try…
Elliot Larson
  • 10,669
  • 5
  • 38
  • 57
19
votes
2 answers

Evaluating an expression with overloaded operators in c++ lldb

I'm debugging a C++ program in Xcode 5 using lldb, and I would like to evaluate arbitrary expressions in the debugger, particularly those that use overloaded operators. For example, I created a very simple Xcode 5 C++ project with the following…
Daniel Golden
  • 3,752
  • 2
  • 27
  • 32
19
votes
3 answers

How can I find the address of a stack trace in LLDB for iOS

When I get a crash report, the offending part of my code will sometimes look like this, instead of showing me the actual line number, even though the crash report is symbolicated: -[ViewController myMethod:] + 47 In order to debug this, I need…
Skotch
  • 3,072
  • 2
  • 23
  • 43
19
votes
3 answers

LLDB: List source code

My single most used gdb command is l followed by n followed by l -. How can I get the same in lldb? I am not satisfied with having to type some line number just to see the code somewhere. I want to see where I am in the code, after dumping a ton…
Steven Lu
  • 41,389
  • 58
  • 210
  • 364
18
votes
3 answers

In Xcode 4 GM, how do I turn on LLDB? All I see is GDB

In the scheme run debugger popup, all it shows is 'None' and 'GDB'. This is for an iPad 4.2 simulator built with LLVM.
user51511
18
votes
1 answer

lldb class has incompatible superclass

I have suddenly become unable to print out object properties or call methods inside of lldb. The only thing that prints out is: error: class '' has incompatible superclasses note: inherits from superclass 'NSObject' here This is true for…
dudeman
  • 1,106
  • 8
  • 19
18
votes
4 answers

Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0xb06b9940)

I'm new to lldb and trying to diagnose an error by using po [$eax class] The error shown in the UI is: Thread 1: EXC_BREAKPOINT (code=EXC_i386_BPT, subcode=0x0) Here is the lldb console including what I entered and what was returned: (lldb) po…
user83039
  • 3,047
  • 5
  • 19
  • 31
18
votes
2 answers

po Swift String "unresolved identifier"

I am having trouble debugging Swift Strings func stringTest() { let test1:String = "test1"; let test2:NSString = "test2"; // <-- Breakpoint here println(test1); println(test2); } If I set a breakpoint after these lines and…
Errortype520
  • 353
  • 1
  • 3
  • 9
18
votes
5 answers

Redirect lldb output to file

I'm using lldb inside Xcode, and one of my variables contains a huge chunk of JSON data. Using po myVar isn't much helpful to analyse this data, as it will output in the tiny Xcode debug console. Is there a way to redirect lldb output to a file ? I…
Guillaume Algis
  • 10,705
  • 6
  • 44
  • 72
18
votes
1 answer

How do you add breakpoint actions via the LLDB command line?

If you edit a breakpoint from Xcode, there is the super-useful option to add an "Action" to be automatically executed every time the breakpoint is hit. How can you add such actions from the LLDB command line?
PHD
  • 586
  • 1
  • 4
  • 11
18
votes
2 answers

LLDB Break at Address

I apologize for the likely trivial question but I am running into a wall as Google gives me the same non-applicable answers over and over. I am trying to set a breakpoint in LLDB. After reading the documentation, the options available to me are to…
0x90
  • 6,079
  • 2
  • 36
  • 55
18
votes
3 answers

(lldb) Print unsigned long long in hex

I am trying to debug my Objective-C program, and I need to print my unsigned long long variable in hex. I am using the lldb debugger. In order to print short as hex, you can use this: (lldb) type format add --format hex short (lldb) print…
Mazyod
  • 22,319
  • 10
  • 92
  • 157
17
votes
2 answers

How to break on Err creation

When debugging a Rust program is it possible to break execution when an Err() value is created? This would serve the same purpose as breaking on exceptions in other languages (C++, Javascript, Java, etc.) in that it shows you the actual source of…
Timmmm
  • 88,195
  • 71
  • 364
  • 509
17
votes
3 answers

What's the solution for "error: Couldn't IRGen expression, no additional error" on Xcode 10.1?

We have a large project with a lot of dependencies brought in through Carthage. Whenever we try to look at a variable in the lldb debugger (p variablename), it gives us an error: error: Couldn't IRGen expression, no additional error None of the…
Brian Kendig
  • 2,452
  • 2
  • 26
  • 36
17
votes
1 answer

Xcode lldb error: can't print out Swift variable - get "$__lldb_injected_self.$__lldb_wrapped_expr_x" instead

Sometimes, when trying to print out a variable in the debugger, the following error message is displayed: error: warning: :12:9: warning: initialization of variable '$__lldb_error_result' was never used; consider replacing with assignment to…
Jacek Lampart
  • 1,741
  • 13
  • 25