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

How to change variables value while debugging with LLDB in Xcode?

In Xcode, GDB allows you to change local variables while debugging (see how to change NSString value while debugging in XCode?). Does LLDB offer a similar functionality? If so, how can we use it?
Eric
  • 16,003
  • 15
  • 87
  • 139
126
votes
12 answers

LLDB (Swift): Casting Raw Address into Usable Type

Is there an LLDB command that can cast a raw address into a usable Swift class? For example: (lldb) po 0x7df67c50 as MKPinAnnotationView I know that this address points to a MKPinAnnotationView, but it is not in a frame that I can select. But, I…
jarrodparkes
  • 2,378
  • 2
  • 18
  • 26
89
votes
9 answers

View array in LLDB: equivalent of GDB's '@' operator in Xcode 4.1

I would like to view an array of elements pointed to by a pointer. In GDB this can be done by treating the pointed memory as an artificial array of a given length using the operator '@' as *pointer @ length where length is the number of elements I…
midinastasurazz
  • 1,317
  • 2
  • 10
  • 12
84
votes
4 answers

Xcode/LLDB: How to get information about an exception that was just thrown?

OK, so imagine that my breakpoint in objc_exception_throw has just triggered. I'm sitting at the debugger prompt, and I want to get some more information about the exception object. Where do I find it?
Karoy Lorentey
  • 4,843
  • 2
  • 28
  • 28
77
votes
2 answers

How to call methods or execute code in LLDB debugger?

I know I can type print someFloatVariable when I set a breakpoint or po [self someIvarHoldingAnObject], but I can't do useful things like: [self setAlpha:1]; Then it spits out: error: '[self' is not a valid command. Weird thing is that I can call…
Proud Member
  • 40,078
  • 47
  • 146
  • 231
74
votes
15 answers

What is LLDB RPC Server ? When does it crash in Xcode? Why it crashes?

I am getting a message in my debugger: The LLDB RPC server has crashed. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log.
Kumar Utsav
  • 2,761
  • 4
  • 24
  • 38
71
votes
6 answers

Xcode - Error creating LLDB target

I'm getting this error whenever I build in XCode 6 beta 4. It seems to be making my app insanely slow. Warning: Error creating LLDB target at path '/***/***/***/***.app'- using an empty LLDB target which can cause slow memory reads from remote…
Jake
  • 13,097
  • 9
  • 44
  • 73
68
votes
2 answers

GDB Vs LLDB debuggers

What is the difference between GDB & LLDB debuggers? I recently upgraded my Xcode version from 4.2 to 4.3 & started getting warning to upgrade my debugger from GDB to LLDB.
Abhinav
  • 37,684
  • 43
  • 191
  • 309
63
votes
5 answers

How to print the contents of a memory address using LLDB?

I am using LLDB and wondering how to print the contents of a specific memory address, for example 0xb0987654.
Adam Lee
  • 24,710
  • 51
  • 156
  • 236
61
votes
3 answers

lldb: Breakpoint on exceptions (equivalent of gdb's catch throw)

I am trying to use lldb for c++ debugging and I want to halt if an exception is thrown, like gdb's catch throw, and I cannot find an equivalent in the lldb documentation.
plaisthos
  • 6,255
  • 6
  • 35
  • 63
60
votes
2 answers

po command in Xcode does not generate output

At some point during my work, Xcode's po and p commands stopped working. No matter what I enter, it doesn't generate output: (gdb) po self (gdb) po [self name] (gdb) po [UITableView class] (gdb) po @"Hello" (gdb) p indexPath.row (gdb) print…
Jonas Sourlier
  • 13,684
  • 16
  • 77
  • 148
56
votes
4 answers

Is there a "TUI" mode for standalone lldb?

Since gdb is getting onerous to work with on a Mac these days (at least I feel like I am fighting uphill against Apple), I've started to play around with lldb. Is there an equivalent mode to gdb -tui that shows a nice, persistent view of the source…
Gabriel Perdue
  • 1,553
  • 2
  • 15
  • 23
56
votes
8 answers

Why can't LLDB print view.bounds?

Things like this drive me crazy when debugging: (lldb) p self.bounds error: unsupported expression with unknown type error: unsupported expression with unknown type error: 2 errors parsing expression (lldb) p (CGRect)self.bounds error: unsupported…
an0
  • 17,191
  • 12
  • 86
  • 136
55
votes
8 answers

LLDB: Couldn't IRGen expression

When I'm running a unit test and want to debug something, I set a breakpoint and type for instance "po myVariable". The response I get from LLDB is: error: Couldn't IRGen expression, no additional error Example: I have the smallest little unit…
niklassaers
  • 8,480
  • 20
  • 99
  • 146
54
votes
1 answer

Is it possible to debug a gcc-compiled program using lldb, or debug a clang-compiled program using gdb?

(Preface: I'm pretty new to C/C++ and I don't really know how debugging in native code actually works.) Some sources say that gdb and lldb can debug any program compiled to machine code. Others say that to debug with gdb you must compile in gcc with…
Neil Traft
  • 18,367
  • 15
  • 63
  • 70
1
2 3
99 100