Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NSLog no output in LLDB. Works in GDB

Since recent update Xcode 4.3 now seems to default to LLDB debugger. I just found that my NSLog statements are not showing in the console. After searching the for answers, finding none, I switched back to GDB and it works fine. I find others mention NSLog in LLDB so I don't' understand why it fails in my case. Should it not work the same? Is there a different method for LLDB?

like image 473
Dean Davids Avatar asked Mar 01 '12 16:03

Dean Davids


People also ask

Is LLDB compatible with GDB?

The standard LLDB installation provides you with an extensive set of commands designed to be compatible with familiar GDB commands. In addition to using the standard configuration, you can easily customize LLDB to suit your needs. Both GDB and LLDB are of course excellent debuggers without doubt.

What is GDB LLDB?

Definition. LLDB is the debugger component of the LLVM project. But, GDB is a portable debugger that runs on many UNIX like systems and works for many programming languages. Thus, this is the main difference between LLDB and GDB.

Does Xcode use GDB?

Xcode 5.1 no longer officially supports GDB, instead defaulting only to LLDB. The problem with LLDB is that it shows no useful debug information on app crashes. Furthermore, all Exception Breakpoints simply break on main.

What is the difference between gdb and LLDB?

Both gdb and lldb are excellent debuggers. GDB is part of the GNU framework, and was created to work alongside of g++, which is the GNU C++ compiler. LLDB is part of the LLVM framework, and was created to work alongside of clang++, which is the LLVM C++ compiler.

Why is LLDB not working in Linux?

There are lots of reasons why LLDB might not be able to attach, which is why it points you to the system log rather than trying to diagnose the issue itself. These mostly boil down to the way that the program is signed. For example, consider this: … CodeDirectory v=20500 size=1365 flags=0x10000 (runtime) … …

What is the standard LLDB installation?

The standard LLDB installation provides you with an extensive set of commands designed to be compatible with familiar GDB commands. In addition to using the standard configuration, you can easily customize LLDB to suit your needs. LLDB is fully integrated with Xcode 5 for source development and the build-and-run debugging experience.

What is LLDB in Xcode?

LLDB is fully integrated with Xcode 5 for source development and the build-and-run debugging experience. You access its wealth of capabilities using the controls provided by the Xcode UI and with commands issued from the Xcode debugging console. With the LLDB command language, you can use LLDB’s advanced features.


1 Answers

Switching from LLDB back to GDB also worked for me.

For those who are not familiar with xcode, to change the runtime debugger back to GDB:

  1. Cmd ⌘ + Option ⌥ + R to bring up the pane

  2. Change the Debugger to 'GDB'

This will have to do until the bug is fixed.

like image 176
Liam George Betsworth Avatar answered Oct 06 '22 07:10

Liam George Betsworth