lldb

iOS app crashes with no error, just (lldb)

爱⌒轻易说出口 提交于 2019-12-14 00:33:45
问题 My application lately seems to randomly crash with no error or exceptions. The console just shows (lldb) in light blue. I have uncaught exception handling and still nothing. It happens at random times. I can do the same task over and over and sometimes it will happen and sometimes it won't. Also sometimes it will happen in random places within the application. So far what I have read is it is possibly just the lldb debugger crashing and not my app however I haven't noticed it before. Any

Define DTrace compatible structs for Objective-C objects

烂漫一生 提交于 2019-12-13 15:50:21
问题 I'm trying to write a DTrace script that will show me the parameter passed to -[NSURLConnection sendSynchronousRequest:returningResponse:error:] and I can't find a struct that works for extracting the string out of the passed in NSString parameter. This question has an answer that works for OS X applications, but it does not work for my application which is using the iOS simulator. Although I'm looking for a solution to this specific example, I'm much more interested in learning the best way

NSDictionary-like pretty-print in the debugger (or log)

笑着哭i 提交于 2019-12-13 13:15:07
问题 This has been bugging me for a while. How do I counteract the ugly escaping that happens when dumping objects in the debugger with po foo (or via NSLog ). I've tried numerous approaches to implementing -description or -debugDescription to no avail. Given this simple class @interface Foo : NSObject @property NSDictionary* dict; @end @implementation Foo - (NSString *)description { // super.description for the <{classname} pointer> output return [NSString stringWithFormat:@"%@ %@", super

lldb breakpoint commands not working in XCode 8

混江龙づ霸主 提交于 2019-12-13 13:07:52
问题 EDIT: It now appears that it's not limited to frame info but in fact, NONE of the breakpoint command add commands work. They will only work if typed in manually at an (lldb) command prompt I set some breakpoints in LLDB via the XCode console, to examine a class and how it's used in code. (lldb) breakpoint set --func-regex "DVLayer" Breakpoint 7: 73 locations. (lldb) breakpoint command add 7 Enter your debugger command(s). Type 'DONE' to end. frame info continue DONE This has worked fine in

How to use lldb “memory find” command?

本小妞迷上赌 提交于 2019-12-13 11:47:45
问题 According to the lldb online help, memory find should work like this: Find a value in the memory of the process being debugged. Syntax: memory find <cmd-options> <address> <value> [<value> [...]] Command Options Usage: memory find <address> <value> [<value> [...]] memory find [-e <expr>] [-s <name>] [-c <count>] [-o <offset>] <address> <value> [<value> [...]] -c <count> ( --count <count> ) How many times to perform the search. -e <expr> ( --expression <expr> ) Evaluate an expression to obtain

Does liblldb-core.a really need to be 763MB in size?

荒凉一梦 提交于 2019-12-13 06:03:39
问题 This definitely takes the cake in terms of being the largest single piece of executable code I have ever seen. Now it was a bit easier to get this whole thing built on my Mac here (I have been trying to build LLDB on a Linux as well, and currently I'm fighting with linking to Python there), for which I am thankful, but this astoundingly large executable file has me second-guessing myself... Did I do something wrong? What is inside of this monstrous archive? I did run this: % otool -TV liblldb

Xcode debug issues with realm

萝らか妹 提交于 2019-12-13 04:44:15
问题 I'm a little confused as to why p self.session and po self.session are returning different values? Which one should I trust in my debugging? It would appear my object is nil but then it would also appear it isn't. Is my session.messages nil or is it set??? 回答1: Guess i should have read the docs. Debugging Debugging apps using Realm’s Swift API must be done through the LLDB console. Note that although the LLDB script installed via our Xcode Plugin allows inspecting the contents of your Realm

How to debug member variable (ie., Array, Dictionary) in LLDB?

前提是你 提交于 2019-12-13 02:33:41
问题 I've declared a Global Array/ Dictionary in Interface like below. @interface ViewController () { NSDictionary *dictionary; NSArray *array; } I'm doing API calls and storing values in these array & dictionaries. I'd like to print the contents of the array/dictionary in LLDB during Runtime. When i try to print these global variable, it gives me the following error. (lldb) po assigneeArr error: warning: Stopped in a context claiming to capture an Objective-C object pointer, but 'self' isn't

Debug information file conventions for Red Hat/Fedora?

China☆狼群 提交于 2019-12-13 00:39:30
问题 According to lothar's answer at How to generate gcc debug symbol outside the build target, I can create a two part executable - the stripped executable and the debug information file. After creating the stripped executable and the debug information file, I install the executable as normal (with make install ). But I'm not sure what to do with the debug information file for Red Hat/Fedora. I have two questions related to debugging the executable with GDB or LLDB (if debugging is needed): What

How do I use lldb to debug C++ code on Android on command line

為{幸葍}努か 提交于 2019-12-12 18:25:02
问题 I am trying to figure out to debug my Android ndk project in c++, using the lldb debugger. I am trying achieve this by using the command line only. I can not seem to find any articles or documentation on how to use lldb along with adb to debug an app from the command line. 回答1: Probably you can try below: (This example steps are based on macOS ) run gdb server and attach process //Below commands will suspend the execution on the running app, and waits for a debugger to connect to it on port