Improved error message.
http://reviews.llvm.org/D4430
Files:
source/Commands/CommandObjectTarget.cpp
Index: source/Commands/CommandObjectTarget.cpp
===================================================================
--- source/Commands/CommandObjectTarget.cpp
+++ source/Commands/CommandObjectTarget.cpp
@@ -545,9 +545,16 @@
}
else
{
- result.AppendErrorWithFormat ("index %u is out of range, valid target indexes are 0 - %u\n",
- target_idx,
- num_targets - 1);
+ if (num_targets > 0)
+ {
+ result.AppendErrorWithFormat ("index %u is out of range, valid target indexes are 0 - %u\n",
+ target_idx,
+ num_targets - 1);
+ } else
+ {
+ result.AppendErrorWithFormat ("index %u is out of range since there are no active targets\n",
+ target_idx);
+ }
result.SetStatus (eReturnStatusFailed);
}
}
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits