From: Lars Knoll Date: Fri, 12 Oct 2012 06:51:02 +0000 (+0200) Subject: Send all debug output to stderr X-Git-Tag: upstream/5.2.1~669^2~659^2~991 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f17248441dbdfb6b0d5986cec2fb8fbfc3f9ef56;p=platform%2Fupstream%2Fqtdeclarative.git Send all debug output to stderr qDebug() was used for part of the logging, which uses stderr. Send everything else there as well. Change-Id: I363dff3d2e4dd6f95bf0347f1df589ae2528fd32 Reviewed-by: Simon Hausmann --- diff --git a/masm/stubs/WTFStubs.cpp b/masm/stubs/WTFStubs.cpp index 2c642ac..e4009b8 100644 --- a/masm/stubs/WTFStubs.cpp +++ b/masm/stubs/WTFStubs.cpp @@ -27,7 +27,7 @@ uint32_t cryptographicallyRandomNumber() return 0; } -static FILE* s_dataFile = stdout; +static FILE* s_dataFile = stderr; void setDataFile(FILE* f) { diff --git a/qv4isel_masm.cpp b/qv4isel_masm.cpp index e633497..98b9a71 100644 --- a/qv4isel_masm.cpp +++ b/qv4isel_masm.cpp @@ -19,7 +19,7 @@ using namespace QQmlJS::MASM; using namespace QQmlJS::VM; namespace { -QTextStream qout(stdout, QIODevice::WriteOnly); +QTextStream qout(stderr, QIODevice::WriteOnly); } static void printDisassmbleOutputWithCalls(const char* output, const QHash& functions) @@ -31,7 +31,7 @@ static void printDisassmbleOutputWithCalls(const char* output, const QHashcodeRef = linkBuffer.finalizeCodeWithDisassembly("operator()(IR::Function*)"); + QByteArray name = _function->name->toUtf8(); + if (name.startsWith('%')) + name.prepend('%'); + _function->codeRef = linkBuffer.finalizeCodeWithDisassembly(name.data()); - WTF::setDataFile(stdout); + WTF::setDataFile(stderr); fclose(disasmStream); #if CPU(X86) || CPU(X86_64) printDisassmbleOutputWithCalls(disasmOutput, functions);