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

Attaching sources to a binary dylib in Xcode

I've a framework with a dylib in my iOS app which was compiled on another machine. I checked out the sources on my machine and tried instructing lldb to map the source code path using: settings set target.source-map /source/code/path/in/dylib/prefix…
Max Raskin
  • 1,042
  • 1
  • 14
  • 26
21
votes
2 answers

Why doesn't lldb forward my environment variable anymore?

I'm working on a patch for FFmpeg and need to debug my code. I'm loading an external library, and in order to test different library versions, I have them in different folders. To select which one I want to use, I've been using…
Cornstalks
  • 37,137
  • 18
  • 79
  • 144
21
votes
7 answers

How to get NDK debugging to work in Android Studio?

Android Studio doesn't stop at breakpoints in C++ code, this is what i've done so far : In AndroidManifest.xml : android:debuggable="true" In build.gradle (this may be the problem): sourceSets.main { jniLibs.srcDir 'src/main/libs' jni.srcDirs…
PadThai
  • 225
  • 1
  • 2
  • 5
21
votes
1 answer

LLDB Error: Unable to resolve breakpoint to any actual locations

I'm trying to use LLDB (because I apparently can't use gdb anymore) to debug som of my code and each time I try to... (lldb) breakpoint set -f file.c -l 65 I get... Breakpoint 1: no locations (pending) WARNING: Unable to resolve breakpoint to any…
Stone
  • 309
  • 2
  • 3
  • 12
21
votes
2 answers

How do I set an lldb watchpoint on a property of self.view?

I want to trace when something changes the size of self.view. What's the correct format? (lldb) po self.view (UIView *) $1 = 0x0a8aba20 > (lldb) watch set…
DenverCoder9
  • 3,635
  • 3
  • 31
  • 57
21
votes
4 answers

lldb strange error

I am using xCode 4.3.1 and as soon I want to use lldb, I hardly get any debug information but get the following result instead, po-ing on a simple NSMutableDictionary property: (lldb) po _keywordCache error: instance method 'delegate' has…
Koen
  • 1,092
  • 9
  • 11
20
votes
2 answers

How do you stop the XCode debugger from autocompleting without options?

The debugger is really (de)bugging me. Every time I try to type a po ... command, it autocompletes (without giving me any options) and I end up typing stuff like po [selfelf and so on until I go mad. Is there any way of stopping this, or of always…
jrturton
  • 118,105
  • 32
  • 252
  • 268
20
votes
1 answer

Swift 5 LLDB error: warning: :12:9: warning: initialization of variable '$__lldb_error_result' was never used

Full Error Message: error: warning: :12:9: warning: initialization of variable '$__lldb_error_result' was never used; consider replacing with assignment to '_' or removing it var $__lldb_error_result = __lldb_tmp_error …
andrewbuilder
  • 3,629
  • 2
  • 24
  • 46
20
votes
3 answers

error: use of undeclared type '$__lldb_context' in NSAttributedString extension

Given the following Swift code, saved in bug.swift, and using Xcode 8.2.1 or Xcode 8.3 beta 2: import Foundation protocol MyProtocol { func foo() -> String } extension MyProtocol { func foo() -> String { return "\(self)" …
Zev Eisenberg
  • 8,080
  • 5
  • 38
  • 82
20
votes
1 answer

How can I set LLDB's default language to Swift?

I have a large Swift project that's technically a mixed project, as it has a small amount of Objective-C code. But whenever I drop into LLDB, the expression evaluator is expecting Objective-C syntax. I can use Swift with e -l swift -- but this is…
Bill
  • 44,502
  • 24
  • 122
  • 213
20
votes
2 answers

Is it possible to set watchpoints on Swift properties?

In Objective-C, I would sometimes set watchpoints in LLDB to let me know when instance variables had changed. Can I do this with Swift properties too? Right now, the only way I can achieve this is: adding a didSet handler to the property and…
Bill
  • 44,502
  • 24
  • 122
  • 213
20
votes
4 answers

How do I have a breakpoint get triggered if an instance variable in the class has its value changed?

Say I have a variable, self.position, how do I get Xcode to break whenever it changes its value (a number of methods could change it).
Doug Smith
  • 29,668
  • 57
  • 204
  • 388
20
votes
2 answers

Why does the LLDB Debugger constantly fail to attach?

I have seen a lot of answers for this question: error: failed to attach to process ID as switch to GDB. But no one addresses the reason of why it happens? Attaching works fine with the GDB debugger but the default and recommended project setting…
Lithu T.V
  • 19,955
  • 12
  • 56
  • 101
20
votes
1 answer

How to tell LLDB debugger not to handle SIGBUS?

I'm embedding MonoTouch in an Xcode project, and want to stop LLDB debugger from handling SIGBUS signals, since they are used by the mono runtime. How can I do that?
Ergwun
  • 12,579
  • 7
  • 56
  • 83
19
votes
2 answers

lldb breakpoint on all methods in class objective c

How can I automate setting a breakpoint on all methods in an Objective C class using lldb? This is useful for learning the behavior of a complicated legacy class. I am using Xcode (includes lldb) for iOS development, and it is cumbersome to manually…
tboyce12
  • 1,449
  • 14
  • 28