Color output of = command. Update help. Implement "print r" to accompany "print v" and to provide a way of getting at old print behavior (if the old help text is to be believed).

The = command has recently been changed to use standard debugger serialization rather than to invoke a customizable function, or print_r otherwise. In the process a bug crept in that made the output not colored. This fixes that bug. It also updates the help text to make it clearer that = truncates text. While looking at that I noticed that the help text for the print command suggested that it's output is formatted with print_r. Fixed the text as well, but while I was at it introduced the "print r" flag to make it possible to invoke print_r, analogously to the already existing "print v" command. While adding test cases, I noticed that the truncation logic appears to be broken, so I fixed that as well.

Differential Revision: D931565
Esse commit está contido em:
Herman Venter
2013-08-16 15:11:16 -07:00
commit de Sara Golemon
commit becb0e7784
9 arquivos alterados com 86 adições e 12 exclusões
+1 -1
Ver Arquivo
@@ -76,7 +76,7 @@ void CmdVariable::PrintVariable(DebuggerClient &client, CStrRef varName) {
String name = iter.first().toString();
if (!name.equal(varName)) continue;
String value = DebuggerClient::FormatVariable(iter.second(), 200);
client.print("%s", value.data());
client.output("%s", value.data());
}
}
}