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
25
votes
3 answers

Inspect the return value of a function in lldb

Is it possible to inspect the return value of a function in lldb assuming the return value is not assigned to a variable?
SFeng
  • 2,226
  • 1
  • 19
  • 16
25
votes
2 answers

How to attach to child process in LLDB

My process starts child processes and I want to debug these as well, using LLDB on OS X. I can't find any option in the debugger to auto-attach. How to do it?
Roman Plášil
  • 1,941
  • 2
  • 17
  • 27
24
votes
1 answer

Cannot get lldb to read file input through redirect

I'm using lldb as a standalone debugger in OSX. I'm trying to debug a C executable, using a text file as input, by way of a redirect. The lldb documentation specifies the following command for changing stdin to a given file: process launch -i…
Harald Husum
  • 1,059
  • 1
  • 7
  • 21
23
votes
1 answer

Cannot get mac os x lldb process to read the STDIN

Is it me or lldb for mac os x (replacing gdb) does not allow you to pipe a file into the stdin, to be used by the process being debugged? reading the instructions there is no reference to it. I've gone through and installed gnu gdb, but would like…
Ben
  • 1,292
  • 1
  • 13
  • 21
23
votes
4 answers

Prevent "Execution was interrupted, reason: internal ObjC exception breakpoint(-3)" on lldb

I've written some code that dumps all ivars of a class into a dictionary in Objective C. This uses valueForKey: to get the data from the class. Sometimes, KVC throws an internal exception that is also captured properly - but this disrupts lldb's…
steipete
  • 7,581
  • 5
  • 47
  • 81
23
votes
3 answers

lldb error: property not found on object of type

I am trying to debug my iOS app using lldb and I'm getting really weird errors on debug. A few lines before my breakpoint, I've got: CGRect frame = view.frame; Which I can access with no problems with print frame command in lldb. However, when I try…
Can Poyrazoğlu
  • 33,241
  • 48
  • 191
  • 389
23
votes
2 answers

LLDB equivalent of gdb "directory" command for specifying source search path?

Looking for the lldb equivalent of the gdb "directory" command to add search paths for finding missing source code (or possibly similar functionality within xcode)? Thanks in advance!
IODEV
  • 1,706
  • 2
  • 17
  • 20
22
votes
1 answer

Lldb : Setting conditional breakpoint with string equality as condition

I would like to set a conditional breakpoint with lldb. This is usually done using -c option : breakpoint set -f myFile.cpp -l 123 -c 'a==3' However, in my case I want to test if a std::string object is equal to a certain string value but doing…
Gael Lorieul
  • 3,006
  • 4
  • 25
  • 50
22
votes
4 answers

How to debug an iOS extension (.appex)?

How to make log prints appear in Xcode's lldb debugger from extension?
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
22
votes
1 answer

Why does the initial call to NSAttributedString with an HTML string take over 100 times longer than subsequent calls?

I had a need to display HTML text inside my iOS app. I have decided I will use the built-in method on NSAttributedString, initWithData:options:documentAttributes:error:. The actual parsing works excellently, however, I seem to have come across a…
Richard J. Ross III
  • 55,009
  • 24
  • 135
  • 201
22
votes
3 answers

Detect UI actions outside of main thread

Note: This question is related to Warn on calls to UIKit from background threads but does not give an answer on two of the approaches below. I have a problem where the app screen blinks rapidly. I already had that problem in the past and it is due…
Resh32
  • 6,500
  • 3
  • 32
  • 40
22
votes
2 answers

Xcode LLDB watchpoints

Is there any way to watch a variable in Xcode using LLDB ? Or is this only possible with GDB ? I'm trying to use the command watchpoint set variable but I get the message: invalid command 'watchpoint set'
the Reverend
  • 12,305
  • 10
  • 66
  • 121
21
votes
1 answer

What are the advantages of LLDB over GDB in iOS development?

In Xcode 4.3, now you can enable using LLDB as the debugger for iOS targets. What advantages does it have over using the good old GDB? GDB still works with LLVM and I cannot see any obvious differences in "everyday" debugging tasks.
Imre Kelényi
  • 22,113
  • 5
  • 35
  • 45
21
votes
1 answer

Debugging closures in Swift with Xcode LLDB console

I stuck with an interesting behavior of Xcode LLDB debug console. When I use weak self + guard self statement for preventing memory leaks then I run into strange behavior while debugging my code when trying to print closure parameter (like the…
m3rk
  • 653
  • 6
  • 12
21
votes
4 answers

Strange mixing of system + homebrew Python with LLDB

When I attempt to run the Python interpretter within lldb, I'm seeing: $ lldb (lldb) script Traceback (most recent call last): File "", line 1, in File…
Kevin Ushey
  • 20,530
  • 5
  • 56
  • 88