dawn removed rL LLVM as the repository for this revision. dawn updated this revision to Diff 33172. dawn added a comment.
I'm submitting this revised patch to show the alternate fix described in my previous comment. Consider this patch as a proposal; if nothing else I'd like to understand why the checks for is_dummy_target were added in svn rev.237053. - what's new in this diff - This patch keeps the resetting behavior in rev.237053 while still fixing the mix-matched platform and dummy target problem that is leaving the python API in a bad state. An additional change was made to check for user_exe_path[0] since this is common practice elsewhere in the code. http://reviews.llvm.org/D12303 Files: source/Target/TargetList.cpp Index: source/Target/TargetList.cpp =================================================================== --- source/Target/TargetList.cpp +++ source/Target/TargetList.cpp @@ -298,7 +298,7 @@ if (!platform_sp->IsCompatibleArchitecture(arch, false, &platform_arch)) { platform_sp = Platform::GetPlatformForArchitecture(arch, &platform_arch); - if (!is_dummy_target && platform_sp) + if (platform_sp) debugger.GetPlatformList().SetSelectedPlatform(platform_sp); } } @@ -310,7 +310,7 @@ if (!platform_sp->IsCompatibleArchitecture(platform_arch, false, &fixed_platform_arch)) { platform_sp = Platform::GetPlatformForArchitecture(platform_arch, &fixed_platform_arch); - if (!is_dummy_target && platform_sp) + if (platform_sp) debugger.GetPlatformList().SetSelectedPlatform(platform_sp); } } @@ -476,7 +476,7 @@ // Set argv0 with what the user typed, unless the user specified a // directory. If the user specified a directory, then it is probably a // bundle that was resolved and we need to use the resolved bundle path - if (user_exe_path) + if (user_exe_path && user_exe_path[0]) { // Use exactly what the user typed as the first argument when we exec or posix_spawn if (user_exe_path_is_bundle && resolved_bundle_exe_path[0])
Index: source/Target/TargetList.cpp =================================================================== --- source/Target/TargetList.cpp +++ source/Target/TargetList.cpp @@ -298,7 +298,7 @@ if (!platform_sp->IsCompatibleArchitecture(arch, false, &platform_arch)) { platform_sp = Platform::GetPlatformForArchitecture(arch, &platform_arch); - if (!is_dummy_target && platform_sp) + if (platform_sp) debugger.GetPlatformList().SetSelectedPlatform(platform_sp); } } @@ -310,7 +310,7 @@ if (!platform_sp->IsCompatibleArchitecture(platform_arch, false, &fixed_platform_arch)) { platform_sp = Platform::GetPlatformForArchitecture(platform_arch, &fixed_platform_arch); - if (!is_dummy_target && platform_sp) + if (platform_sp) debugger.GetPlatformList().SetSelectedPlatform(platform_sp); } } @@ -476,7 +476,7 @@ // Set argv0 with what the user typed, unless the user specified a // directory. If the user specified a directory, then it is probably a // bundle that was resolved and we need to use the resolved bundle path - if (user_exe_path) + if (user_exe_path && user_exe_path[0]) { // Use exactly what the user typed as the first argument when we exec or posix_spawn if (user_exe_path_is_bundle && resolved_bundle_exe_path[0])
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits