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
49
votes
4 answers

Does LLDB have convenience variables ($var)?

Does LLDB have convenience variables? If so, how do I use them? If not, is there anything similar that I can use? Reference: http://software.intel.com/sites/products/documentation/hpc/atom/application/debugger/commands143.html
an0
  • 17,191
  • 12
  • 86
  • 136
47
votes
2 answers

Printing/Debugging libc++ STL with Xcode/LLDB

I'm trying to use LLDB within Xcode 8 to debug very basic STL. I used to be able to print a vector like this: p myvector[0] to see whatever was in the first vector index. Now when I do that, I get this error: error: Couldn't lookup symbols: …
cjserio
  • 2,857
  • 7
  • 29
  • 29
46
votes
5 answers

lldb fails to print variable values with "error: reference to 'id' is ambiguous"

Since I updated to xcode 4.3 and let it switch my debugger over to lldb, any request to print a member variable fails with this error message: (lldb) print request error: error: reference to 'id' is ambiguous note: candidate found by name lookup is…
JosephH
  • 37,173
  • 19
  • 130
  • 154
44
votes
1 answer

Permanently configuring LLDB (in Xcode 4.3.2) not to stop on signals

I'm trying to get LLDB (running in Xcode 4.3.2 with an OS X application) to not stop on certain signals. If I enter process handle SIGUSR2 -n true -p true -s false on the debugging console it works fine and LLDB no longer stops on SIGUSR2. However,…
puzzle
  • 6,071
  • 1
  • 25
  • 30
41
votes
2 answers

Using an empty LLDB target which can cause slow memory reads from remote devices

I am using Xcode 12 and I am getting an warning as below: Warning: Error creating LLDB target at path '/Users/ABC/Library/Developer/Xcode/DerivedData/demowatchapp-blfzfuqxehfteaaofqpdlfuurtdr/Build/Products/Debug-watchsimulator/watchapp.app'- using…
Nik
  • 1,679
  • 1
  • 20
  • 36
38
votes
4 answers

po in LLDB with swift

How can I plot out variable's value in a Swift App with LLDB? Earlier it was like po variable_name Now I usually get some nasty error, like: (lldb) po a error: :11:5: error: use of unresolved identifier '$__lldb_injected_self' …
János
  • 32,867
  • 38
  • 193
  • 353
37
votes
7 answers

error: property 'frame' not found on object of type 'UIView *'

I'm debugging my code and trying to figure out the size of the view using this: p view.frame.size.height but I'm getting this error: error: property 'frame' not found on object of type 'UIView *' error: 1 errors parsing expression any of you knows…
HelenaM
  • 1,807
  • 6
  • 30
  • 41
37
votes
7 answers

How to get parameters using symbolic breakpoints in Objective-C

I have a breakpoint that looks like this -[UITableViewCell setSelected:] and it works, but I cannot figure out how to get the value that is being passed in. I have tried -[UITableViewCell setSelected:(BOOL)what] and -[UITableViewCell…
Dan Rosenstark
  • 68,471
  • 58
  • 283
  • 421
35
votes
4 answers

lldb: Couldn't materialize: couldn't get the value of variable

I have compiled a cpp file with this command line: g++ -g test.cpp It throws an exception at line 28. I want to investigate the cause by inspecting the variables in lldb. I set a break point at line 28 and run the a.out in lldb. (lldb) n Process…
Anthony Kong
  • 37,791
  • 46
  • 172
  • 304
33
votes
1 answer

How can I do remote debugging in Xcode 4?

Is there a way to do remote debugging in Xcode 4? The previous answers to this question were for Xcode 3 and Apple removed the specific debugging in Xcode guide that (I assume) covered remote debugging. For kicks I've been doing this with lldb, but…
paxswill
  • 1,200
  • 9
  • 13
33
votes
3 answers

error: Couldn't IRGen expression, no additional error

I can not print debug information in my UI TESTS. Configuration: Xcode 10 and SWIFT 4.2. When I try to print something in console I can only see an error: "error: Couldn't IRGen expression, no additional error" I didn't have any problem in…
Paweł Zemsta
  • 339
  • 1
  • 3
  • 5
33
votes
1 answer

Open .NET Core 2.0 dump in lldb on Linux - which lldb version?

I'm trying to open a .NET Core 2.0 dump on Ubuntu 16.04, following instructions from http://blogs.microsoft.co.il/sasha/2017/02/26/analyzing-a-net-core-core-dump-on-linux/ Dump is created from running process with createdump PID. I can not determine…
Pavel Tupitsyn
  • 8,393
  • 3
  • 22
  • 44
33
votes
3 answers

lldb error: variable not available

Here are my two lines of code: NSString *frontFilePath = [[NSBundle mainBundle] pathForResource:[self.bookendFileNames objectAtIndex:self.randomIndex] ofType:@"caf"]; NSLog(@"frontFilePath = %@", frontFilePath ); I put a break point on the second…
ari gold
  • 2,074
  • 3
  • 25
  • 51
32
votes
11 answers

Cannot debug Swift module/framework embedded in Objective-C app

Alternative titles (to aid searching) Cannot debug Swift 2.3 framework linked to an Objective-C app in Xcode 8 error in auto-import: failed to get module 'XYZ' from AST context Xcode 8 Xcode 8 cannot debug Swift framework warning: Swift error in…
Richard Stelling
  • 25,607
  • 27
  • 108
  • 188
32
votes
3 answers

What is the lldb equivalent of gdb's --args?

I'm used to running gdb like so: $ gdb --args exe --lots --of --flags -a -b -c d e ... (gdb) r Is there an equivalent for lldb?
Claudiu
  • 224,032
  • 165
  • 485
  • 680