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

Debug iOS application on device without symbols

I need to debug the startup for an ios application on an actual device... and by start up I mean the very first instruction that is is executed when the OS hands control over to the app. Not "main". Also, this application doesn't have any symbols…
Allen Bauer
  • 16,657
  • 2
  • 56
  • 74
30
votes
2 answers

Setting disassembly flavour to Intel in LLDB

Is there a way to set the disassembly flavour like there is in GDB within LLDB so that it spits out Intel style assembly rather than AT&T style? set disassembly-flavor intel # GDB but for LLDB.
X-Istence
  • 16,324
  • 6
  • 57
  • 74
30
votes
3 answers

LLDB equivalent to GDB's "info malloc-history
" command?

I am trying to resolve a "message sent to deallocated instance " error in iOS.
user1274177
  • 311
  • 1
  • 4
  • 4
30
votes
3 answers

How to debug EXC_BAD_ACCESS bug

I received an error EXC_BAD_ACCESS code=2 at0xb0987654 I am wondering how to print out the value at 0xb0987654?
Adam Lee
  • 24,710
  • 51
  • 156
  • 236
29
votes
2 answers

Swift WHOLE_MODULE_OPTIMIZATION improves compile time, but causes lldb/Xcode crash

TL;DR Before SWIFT_WHOLE_MODULE_OPTIMIZATION = NO Debug compile takes 10-15 minutes Release compile takes 25+ minutes po works fine in LLDB After SWIFT_WHOLE_MODULE_OPTIMIZATION = YES Debug compile takes 1-2 minutes Release compile takes ~8…
LunaCodeGirl
  • 5,432
  • 6
  • 30
  • 36
29
votes
5 answers

Xcode LLDB Print Statements Fail - NSUndoManager

I have a breakpoint set and want to print my UITextField's superview. I type po myTextField.superview but I receive the following error: error: instance method 'undoManager' has incompatible result types in different translation units ('id' vs.…
rizzes
  • 1,532
  • 20
  • 33
28
votes
1 answer

How to skip a couple of lines code with lldb?

Is there a way to skip over lines of code while debugging with lldb without having to recompile?
BollMose
  • 3,002
  • 4
  • 32
  • 41
27
votes
4 answers

Visual Studio Code LLDB on macOS error when starting debugging session

I'm trying to configure Visual Studio Code for compiling/debugging C++ programs on macOS. I am using the following launch.json file: When I try and start a debugging session, I get the following error: Warning: Debuggee TargetArchitecture not…
Jr795
  • 691
  • 1
  • 8
  • 15
27
votes
2 answers

LLDB not showing source code

I am trying to debug a C++ program I am writing, but when I run it in LLDB and stop the program, it only shows me the assembler, not the original source. e.g. after the crash I’m trying to debug: Process 86122 stopped * thread #13: tid = 0x142181,…
Leo
  • 4,217
  • 4
  • 25
  • 41
27
votes
1 answer

Xcode: how to exit lldb swift repl

I made a typo debugging my project and appeared in lldb swift REPL now I don't know how to exit it and simultaneously do not exit from my program which I debug. So I typed expr -r -- myVariable instead of expr -R -- myVariable. and below is what I…
dev_null
  • 1,907
  • 1
  • 16
  • 25
26
votes
2 answers

lldb : Printing a variable's address

I am trying to print a variable's address with lldb. However, calling print &(myVar) prints the variable's content instead of its address. (lldb) print &(myVar) (const string *) $18 = "hello" Same for expression &(myVar). (lldb) expression…
Gael Lorieul
  • 3,006
  • 4
  • 25
  • 50
26
votes
7 answers

How to use _printHierarchy in LLDB console with Swift?

Apple added a private helper _printHierarchy in iOS8 that can be used in LLDB console: po [[[UIWindow keyWindow] rootViewController] _printHierarchy] which prints out the whole view controller hierarchy in text form. This works only if you are…
Tom Kraina
  • 3,569
  • 1
  • 38
  • 58
26
votes
1 answer

Watch points on memory address

With the new change from gdb to lldb , I can't find a way how to set watch points on some memory addresses . In gdb I used this watch -location *0x123456 Doing the same in lldb w s e *0x123456 Isn't working for me . So what can I use to run the…
user3001909
  • 331
  • 1
  • 4
  • 8
25
votes
4 answers

Getting info about bad memory address in LLDB

I am trying to debug an EXC_BAD_ACCESS in my iPhone app. It is crashing on a method call and on the line of the method is EXC_BAD_ACCESS (code=1, address = xxx). Before, I would have just used gdb info malloc-history to start debugging, but…
Ross Kimes
  • 1,234
  • 1
  • 12
  • 34
25
votes
2 answers

How to disable android native debugger in Android studio

Using Studio 2.3, gradle:2.2.1 When I try to attached debugger to app, it shows Android Hybrid Debugger -> Now Launching Native Debug Session Attention! No symbol directories found - please check your native debug Start hybrid debugger. And…
Qamar
  • 4,959
  • 1
  • 30
  • 49