Page MenuHomePhabricator

lldb - fix misleading "valid target indexes are" error message
ClosedPublic

Authored by pawelo on Jul 8 2014, 11:49 PM.

Details

Reviewers
tfiala
Summary

This fixes following issue:

(lldb) target select 0
error: index 0 is out of range, valid target indexes are 0 - 4294967295
(lldb) target select 1
error: index 1 is out of range, valid target indexes are 0 - 4294967295

Due to unsigned arithmetic operation, we can see above output which is both misleading and against pure logic.

The question why there are no targets listed remains open.

Diff Detail

Event Timeline

pawelo updated this revision to Diff 11186.Jul 8 2014, 11:49 PM
pawelo retitled this revision from to lldb - fix misleading "valid target indexes are" error message.
pawelo updated this object.
pawelo edited the test plan for this revision. (Show Details)
pawelo set the repository for this revision to rL LLVM.
pawelo added a subscriber: Unknown Object (MLST).
tfiala added a subscriber: tfiala.

See comments here, Paul:
http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140825/012666.html

I'll wait to see how you adjust this per comments, then get it in.

pawelo updated this revision to Diff 13100.Aug 29 2014, 12:13 PM
pawelo set the repository for this revision to rL LLVM.

Improved error message.

tfiala accepted this revision.Aug 29 2014, 1:22 PM
tfiala edited edge metadata.
This revision is now accepted and ready to land.Aug 29 2014, 1:22 PM
tfiala closed this revision.Aug 29 2014, 1:24 PM

svn commit
Sending source/Commands/CommandObjectTarget.cpp
Transmitting file data .
Committed revision 216766.