lldb

Swift, error EXC_BREAKPOINT (code=1, subcode=0x100695474)

与世无争的帅哥 提交于 2019-12-05 03:23:45
I'm trying to create a game in Swift (Xcode 6.4) and I'm getting this error: EXC_BREAKPOINT (code=1, subcode=0x100695474) In console: false 2015-08-02 11:14:35.248 Taxi Smash[3996:1485308] G 1019 fatal error: unexpectedly found nil while unwrapping an Optional value (lldb) Screen: Continue of the log: libswiftCore.dylib`function signature specialization <Arg[0] = Exploded, Arg[1] = Exploded, Arg[2] = Dead, Arg[3] = Dead> of Swift._fatalErrorMessage (Swift.StaticString, Swift.StaticString, Swift.StaticString, Swift.UInt) -> (): 0x100695448 <+0>: stp x29, x30, [sp, #-16]! 0x10069544c <+4>: mov

How to debug Clang plugin using lldb (or gdb)

拜拜、爱过 提交于 2019-12-05 03:18:49
问题 I want to debug Clang plugin. However, I can't find informations about debugging of Clang plugin. If you know how to debug Clang plugin, Could you tell me that information? thanks. 回答1: Just a small outline as i'm trying this myself atm. I am using lldb. I am currently able to stop at any given function in the plugin but the source code is missing. It only shows the assembly. When you invoke clang with -Xclang -plugin (...) it will fork into a child process. When invoking your plugin pass

Access a Swift REPL in Cocoa programs

落花浮王杯 提交于 2019-12-05 02:11:42
问题 I can attach LLDB to a program written in Swift and access the REPL, either from within Xcode or by running: lldb -n ProcessName (lldb) repl 1> However, if I attach LLDB to a process which doesn't have the Swift runtime, the REPL isn't very useful. For example: lldb -n Finder Process 218 stopped Executable module set to "/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder". Architecture set to: x86_64-apple-macosx. (lldb) repl 1> import Cocoa error: Couldn't lookup symbols: __swift

How to create and use temp NSRange in lldb?

▼魔方 西西 提交于 2019-12-05 01:45:48
NSRange is just a C struct. I want to create a temporary one in lldb in Xcode at a breakpoint. Specifically for use in NSArray method objectAtIndex:inRange: This does not work. (lldb) expr NSRange $tmpRange = (NSRange){0,4} (lldb) expr $tmpRange (NSRange) $tmpRange = location=0, length=4 (lldb) expr -o -- [items indexOfObject:item4 inRange:$tmpRange] error: no matching constructor for initialization of 'NSRange' (aka '_NSRange') error: 1 errors parsing expression My code has an NSRange var named badRange at the breakpoint, and passing that one in works. Thus: (lldb) expr -o -- [items

warning: Swift error in module. Debug info from this module will be unavailable in the debugger

你说的曾经没有我的故事 提交于 2019-12-05 00:23:09
I have no debugging values in my console for my swift + obj-c app, and I get a really unhelpful message that explains why the debugger isn't working: "warning: Swift error in module XXX.". XXX is the name of my module, not a 3rd party that I include. My app has been around before swift. I used the bridging header to start using swift, and I recently use the xcode tool to migrate all the swift 2 files to swift 3. (but I still have obj-c legacy in there). I use cocoa pods, which may be contributing to the problem. (lldb) po self warning: Swift error in module XXX. Debug info from this module

lldb python handle breakpoint hit

落爺英雄遲暮 提交于 2019-12-04 19:14:35
I was looking through this huge LLDB python reference manual, and can't find still how to handle breakpoint hit with my code. I mean, I want to run my foo() when some breakpoint was hit. Please help me with some code snippets! Or point me the needed class in Python reference manual. Thanx! On the page: http://lldb.llvm.org/python-reference.html there is a section titled: RUNNING A PYTHON SCRIPT WHEN A BREAKPOINT GETS HIT which has some useful info. What you are doing is "adding a command to your breakpoint". The lldb command for this is "breakpoint command add". All the basic lldb commands are

LLDB display of NSDate is inconsistent?

筅森魡賤 提交于 2019-12-04 18:42:45
I am puzzled by the differences underlined in red below: How come this very same NSDate object is displayed in BST in the debug pane, but in GMT in the LLDB terminal when asked to '"Print description of "date"' ? This is with Xcode 4.6.1 An NSDate represents a specific moment in time, without any consideration of what human beings call that moment. If you look at NSDate , you'll notice that there aren't even hour , minute , or second properties, let alone a timeZone property. The time zone is a feature of the NSCalendar used to interpret that NSDate for display. (You may be more familiar with

Exception Breakpoints - LLDB Results vs. GDB

送分小仙女□ 提交于 2019-12-04 17:49:08
I have searched for topics specifically to this question but have not found anything close to my experience. Forgive me if I have overlooked the answer. I am familiar with GDB and exception points, break points, etc... but the following test of debugging in GDB vs LDB left me without a plausible response. Global Test Values Xcode 4.2.1 New Single Window Project (Default template w/no changes) Arc Enabled Storyboard Enabled Case 1 - GDB Debugger Exception Breakpoint Values: Exception - All Break on - Throw Arguments - None Result - No Crash Case 2 - LLDB Debugger Exception Breakpoint Values:

How do I switch from lldb to gdb debugger types?

霸气de小男生 提交于 2019-12-04 17:46:11
I have been looking around for quite a while trying to figure out how to switch from lldb to gdb and could not find anything on how to switch between the 2 in Xcode 6.1. I am trying to debug my app and I might be able to figure it out if I use gdb instead of lldb but I don't know if it will help me. Any suggestions on which type of debugging is better and how to switch between the 2. Any input would be greatly appreciated. Thanks in advance. zaph The debugger for Xcode 6 is lldb, there is no switching to gdb. There is no reason to need gdb. What is your problem with lldb, most of the commands

In Xcode 4 GM, how do I turn on LLDB? All I see is GDB

泄露秘密 提交于 2019-12-04 16:02:10
问题 In the scheme run debugger popup, all it shows is 'None' and 'GDB'. This is for an iPad 4.2 simulator built with LLVM. 回答1: You can't. In words of an Apple employee, LLDB is not available for iOS development yet. As of july 2011 it is unknown when LLDB will become available for iOS. In Xcode 4.0.2 your only option is GDB. In Xcode 4.2 you have LLDB as an option, but you can't use it: The LLDB project doesn't list a date for iOS support. The FAQ says: Q: What targets does LLDB currently