[Lldb-commits] [lldb] 5034102 - Log the NSError str and object description on app launch fail
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Tue May 5 15:52:15 PDT 2020
Author: Jason Molenda
Date: 2020-05-05T15:51:50-07:00
New Revision: 5034102b249f850109ccd7b2c8a02a246edcd95a
URL: https://github.com/llvm/llvm-project/commit/5034102b249f850109ccd7b2c8a02a246edcd95a
DIFF: https://github.com/llvm/llvm-project/commit/5034102b249f850109ccd7b2c8a02a246edcd95a.diff
LOG: Log the NSError str and object description on app launch fail
Update CallBoardSystemServiceOpenApplication to unconditionally log
the NSError's localizedDescription to Console on app launch failure
(as it was already doing), and also to log the NSError object's
full description to the console, which may contain additional nested
error messages. I'm experimenting to find cases where we will get
more detailed information from app launch failures and will start
by logging both to the console.
<rdar://problem/62709160>
Added:
Modified:
lldb/tools/debugserver/source/MacOSX/MachProcess.mm
Removed:
################################################################################
diff --git a/lldb/tools/debugserver/source/MacOSX/MachProcess.mm b/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
index c862de973829..032f2a877903 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
+++ b/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
@@ -164,16 +164,18 @@ static bool CallBoardSystemServiceOpenApplication(NSString *bundleIDNSStr,
[(NSString *)[bks_error localizedDescription] UTF8String];
if (error_str) {
open_app_error_string = error_str;
+ DNBLogError("In app launch attempt, got error "
+ "localizedDescription '%s'.", error_str);
+ const char *obj_desc =
+ [NSString stringWithFormat:@"%@", bks_error].UTF8String;
+ DNBLogError("In app launch attempt, got error "
+ "NSError object description: '%s'.",
+ obj_desc);
}
DNBLogThreadedIf(LOG_PROCESS, "In completion handler for send "
"event, got error \"%s\"(%ld).",
error_str ? error_str : "<unknown error>",
open_app_error);
- // REMOVE ME
- DNBLogError("In completion handler for send event, got error "
- "\"%s\"(%ld).",
- error_str ? error_str : "<unknown error>",
- open_app_error);
}
[system_service release];
More information about the lldb-commits
mailing list