lldb

Crash when open containing app from today extension

非 Y 不嫁゛ 提交于 2020-01-25 04:40:10
问题 I created today extension and add a button to open containing app. Inside extension view controller: @IBAction func pressed() { extensionContext?.openURL(NSURL(string:"myApp://")!, completionHandler: nil) } So, I also add URL Scheme to containing app plist: <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLSchemes</key> <array> <string>myApp</string> </array> </dict> </array> Widget works fine, but when I try to press widget my app crashes inside containing app AppDelegate.swift.

.lldbinit doesn't work in xCode

社会主义新天地 提交于 2020-01-25 02:57:08
问题 .lldbinit was used to preload some scripts before xCode start. The goal of this file is to load some script code automatically. Many people recommend it but it DOESN'T WORK . I know the script code is correct because it works on manual call: command source ~/.lldbinit Does it work no more? I tried the following simple code in xCode 6.4: expr @import UIKit Any solutions except of breakpoints calling this script manually? 回答1: The .lldbinit in your home directory is sourced in BEFORE the target

.lldbinit doesn't work in xCode

一世执手 提交于 2020-01-25 02:57:06
问题 .lldbinit was used to preload some scripts before xCode start. The goal of this file is to load some script code automatically. Many people recommend it but it DOESN'T WORK . I know the script code is correct because it works on manual call: command source ~/.lldbinit Does it work no more? I tried the following simple code in xCode 6.4: expr @import UIKit Any solutions except of breakpoints calling this script manually? 回答1: The .lldbinit in your home directory is sourced in BEFORE the target

How to execute a debugger command from within the app

旧城冷巷雨未停 提交于 2020-01-24 00:32:10
问题 In runtime I'm trying to recover an address of a function that is not exported but is available through shared library's symbols table and therefore is visible to the debugger. I'm working on advanced debugging procedure that needs to capture certain events and manipulate runtime. One of the actions requires knowledge of an address of a private function (just the address) which is used as a key elsewhere. My current solution calculates offset of that private function relative to a known

How to call class methods in the iOS simulator with lldb?

橙三吉。 提交于 2020-01-22 10:42:05
问题 I'm trying to debug an iOS app and I'm having problems with lldb in the simulator. Calling class methods doesn't seem to work. Instance methods work fine. (lldb) po Category <no result> (lldb) po [Category class] error: Couldn't prepare the expression for execution in the target (lldb) po self (TagsTableViewController *) $5 = 0x085585a0 <TagsTableViewController: 0x85585a0> I've tried the 4.3 and 5.1 simulators but both exhibit the same issues. Everything works fine when debugging on a device.

lldb调试器知多少

跟風遠走 提交于 2020-01-16 00:43:51
lldb调试器简介 lldb 是一个有着 REPL 的特性和 C++ 、Python 插件的开源调试器。lldb调试器的由来是伴随着Xcode的版本升级而来。 Xcode4.3之前使用的默认调试器是gdb, 到Xcode4.3之后便改成了lldb。gdb是UNIX及UNIX-like下的调试工具,是来自于GNU组织。 后被苹果进行优化,功能添加后,改名为lldb。可以说lldb是gdb的高版本。 lldb调试器是一个可执行Mach-O文件,因为通常是和xcode集成在一起,会让人误以为是xcode的一个功能,或者是xcode的一个插件。 然后并非如此,它是一个可执行的应用,可以任意组合,比如: Mac系统就有自带调试器lldb: /Library/Developer/CommandLineTools/usr/bin/lldb Xcode中也自带来了调试器lldb: /Applications/Xcode.app/Contents/Developer/usr/bin/lldb lldb调试器使用 在Xcode集成环境中,lldb使用方法简单; 运行Xcode工程后暂停项目,在lldb调试器窗口就可以使用lldb命令进行调试了。 如果没有Xcode集成环境怎么使用lldb呢? 这就有许多步骤需要我们手动完成了。 1.先通过ps查询当前运行的程序: 192:~ zhoufei$ ps

lldb error: use of undeclared identifier

好久不见. 提交于 2020-01-14 19:50:53
问题 Anyone know whats going on here: @implementation Test { NSData *_data; } - (id)initWithData:(NSData *)data { self = [super init]; if (self) { _data = data; } return self; // BREAKPOINT HERE } From lldb: (lldb) p data (NSData *) $1 = 0x07f911e0 30308 bytes (lldb) p _data error: use of undeclared identifier '_data' error: 1 errors parsing expression Why can't I view _data ? 回答1: I've only ever seen data fields declared in an @interface block; you appear to be defining fields in the

Watch points on memory address

本秂侑毒 提交于 2020-01-11 19:18:11
问题 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 same command in lldb ? 回答1: Omit the "dereferencing operator" * when setting the watch point in lldb, just pass the address: watchpoint set expression -- 0x123456 # short form: w s e -- 0x123456 sets a watchpoint at the memory location 0x123456 .

Watch points on memory address

可紊 提交于 2020-01-11 19:16:33
问题 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 same command in lldb ? 回答1: Omit the "dereferencing operator" * when setting the watch point in lldb, just pass the address: watchpoint set expression -- 0x123456 # short form: w s e -- 0x123456 sets a watchpoint at the memory location 0x123456 .

Watch points on memory address

Deadly 提交于 2020-01-11 19:15:41
问题 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 same command in lldb ? 回答1: Omit the "dereferencing operator" * when setting the watch point in lldb, just pass the address: watchpoint set expression -- 0x123456 # short form: w s e -- 0x123456 sets a watchpoint at the memory location 0x123456 .