[Lldb-commits] [lldb] r121235 - /lldb/trunk/source/Target/TargetList.cpp
Greg Clayton
gclayton at apple.com
Tue Dec 7 20:55:11 PST 2010
Author: gclayton
Date: Tue Dec 7 22:55:11 2010
New Revision: 121235
URL: http://llvm.org/viewvc/llvm-project?rev=121235&view=rev
Log:
Fixed up the error message for when a file is not supported.
Modified:
lldb/trunk/source/Target/TargetList.cpp
Modified: lldb/trunk/source/Target/TargetList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/TargetList.cpp?rev=121235&r1=121234&r2=121235&view=diff
==============================================================================
--- lldb/trunk/source/Target/TargetList.cpp (original)
+++ lldb/trunk/source/Target/TargetList.cpp Tue Dec 7 22:55:11 2010
@@ -78,23 +78,33 @@
if (!Host::ResolveExecutableInBundle (resolved_file))
resolved_file = file;
- error = ModuleList::GetSharedModule(resolved_file,
- arch,
- uuid_ptr,
- NULL,
- 0,
- exe_module_sp,
- NULL,
- NULL);
+ error = ModuleList::GetSharedModule (resolved_file,
+ arch,
+ uuid_ptr,
+ NULL,
+ 0,
+ exe_module_sp,
+ NULL,
+ NULL);
if (exe_module_sp)
{
if (exe_module_sp->GetObjectFile() == NULL)
{
- error.SetErrorStringWithFormat("%s%s%s: doesn't contain architecture %s",
- file.GetDirectory().AsCString(),
- file.GetDirectory() ? "/" : "",
- file.GetFilename().AsCString(),
- arch.AsCString());
+ if (arch.IsValid())
+ {
+ error.SetErrorStringWithFormat("\"%s%s%s\" doesn't contain architecture %s",
+ file.GetDirectory().AsCString(),
+ file.GetDirectory() ? "/" : "",
+ file.GetFilename().AsCString(),
+ arch.AsCString());
+ }
+ else
+ {
+ error.SetErrorStringWithFormat("unsupported file type \"%s%s%s\"",
+ file.GetDirectory().AsCString(),
+ file.GetDirectory() ? "/" : "",
+ file.GetFilename().AsCString());
+ }
return error;
}
target_sp.reset(new Target(debugger));
More information about the lldb-commits
mailing list