[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdesdk/kcachegrind
From: Josef Weidendorfer <Josef.Weidendorfer () gmx ! de>
Date: 2005-08-14 19:56:31
Message-ID: 1124049391.589671.14449.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 449227 by weidendo:
Small fixes for error output
M +58 -47 kcachegrind/cachegrindloader.cpp
A tests (directory)
A tests/cg-badcompression1
A tests/cg-badcostline1
A tests/cg-badposition
--- branches/KDE/3.5/kdesdk/kcachegrind/kcachegrind/cachegrindloader.cpp #449226:449227
@@ -279,8 +279,8 @@
line.stripUInt(diff, false);
if (currentPos.fromLine < diff) {
kdError() << _filename << ":" << _lineNo
- << "- Negative line number "
- << currentPos.fromLine - diff << endl;
+ << " - Negative line number "
+ << (int)currentPos.fromLine - (int)diff << endl;
diff = currentPos.fromLine;
}
newPos.fromLine = currentPos.fromLine - diff;
@@ -347,7 +347,7 @@
int p = name.find(')');
if (p<2) {
kdError() << _filename << ":" << _lineNo
- << "- Invalid compressed ELF object ('"
+ << " - Invalid compressed ELF object ('"
<< name << "')" << endl;
return 0;
}
@@ -357,33 +357,32 @@
if ((int)name.length()>p) {
while(name.at(p).isSpace()) p++;
+ if (_objectVector.size() <= index) {
+ int newSize = index * 2;
+#if TRACE_LOADER
+ kdDebug() << " CachegrindLoader: objectVector enlarged to "
+ << newSize << endl;
+#endif
+ _objectVector.resize(newSize);
+ }
+
QString realName = checkUnknown(name.mid(p));
o = (TraceObject*) _objectVector.at(index);
if (o && (o->name() != realName)) {
kdError() << _filename << ":" << _lineNo
- << "- Redefinition of compressed ELF object index " << index
+ << " - Redefinition of compressed ELF object index " << index
<< " (was '" << o->name()
<< "') to '" << realName << "'" << endl;
}
o = _data->object(realName);
-
- if (_objectVector.size() <= index) {
- int newSize = index * 2;
-#if TRACE_LOADER
- kdDebug() << " CachegrindLoader: objectVector enlarged to "
- << newSize << endl;
-#endif
- _objectVector.resize(newSize);
- }
-
_objectVector.insert(index, o);
}
else {
if ((_objectVector.size() <= index) ||
( (o=(TraceObject*)_objectVector.at(index)) == 0)) {
kdError() << _filename << ":" << _lineNo
- << "- Undefined compressed ELF object index " << index << endl;
+ << " - Undefined compressed ELF object index " << index << endl;
return 0;
}
}
@@ -402,7 +401,7 @@
int p = name.find(')');
if (p<2) {
kdError() << _filename << ":" << _lineNo
- << "- Invalid compressed file ('"
+ << " - Invalid compressed file ('"
<< name << "')" << endl;
return 0;
}
@@ -412,33 +411,32 @@
if ((int)name.length()>p) {
while(name.at(p).isSpace()) p++;
+ if (_fileVector.size() <= index) {
+ int newSize = index * 2;
+#if TRACE_LOADER
+ kdDebug() << " CachegrindLoader::fileVector enlarged to "
+ << newSize << endl;
+#endif
+ _fileVector.resize(newSize);
+ }
+
QString realName = checkUnknown(name.mid(p));
f = (TraceFile*) _fileVector.at(index);
if (f && (f->name() != realName)) {
kdError() << _filename << ":" << _lineNo
- << "- Redefinition of compressed file index " << index
+ << " - Redefinition of compressed file index " << index
<< " (was '" << f->name()
<< "') to '" << realName << "'" << endl;
}
f = _data->file(realName);
-
- if (_fileVector.size() <= index) {
- int newSize = index * 2;
-#if TRACE_LOADER
- kdDebug() << " CachegrindLoader::fileVector enlarged to "
- << newSize << endl;
-#endif
- _fileVector.resize(newSize);
- }
-
_fileVector.insert(index, f);
}
else {
if ((_fileVector.size() <= index) ||
( (f=(TraceFile*)_fileVector.at(index)) == 0)) {
kdError() << _filename << ":" << _lineNo
- << "- Undefined compressed file index " << index << endl;
+ << " - Undefined compressed file index " << index << endl;
return 0;
}
}
@@ -460,7 +458,7 @@
int p = name.find(')');
if (p<2) {
kdError() << _filename << ":" << _lineNo
- << "- Invalid compressed function ('"
+ << " - Invalid compressed function ('"
<< name << "')" << endl;
return 0;
}
@@ -472,26 +470,25 @@
if ((int)name.length()>p) {
while(name.at(p).isSpace()) p++;
+ if (_functionVector.size() <= index) {
+ int newSize = index * 2;
+#if TRACE_LOADER
+ kdDebug() << " CachegrindLoader::functionVector enlarged to "
+ << newSize << endl;
+#endif
+ _functionVector.resize(newSize);
+ }
+
QString realName = checkUnknown(name.mid(p));
f = (TraceFunction*) _functionVector.at(index);
if (f && (f->name() != realName)) {
kdError() << _filename << ":" << _lineNo
- << "- Redefinition of compressed function index " << index
+ << " - Redefinition of compressed function index " << index
<< " (was '" << f->name()
<< "') to '" << realName << "'" << endl;
}
f = _data->function(realName, file, object);
-
- if (_functionVector.size() <= index) {
- int newSize = index * 2;
-#if TRACE_LOADER
- kdDebug() << " CachegrindLoader::functionVector enlarged to "
- << newSize << endl;
-#endif
- _functionVector.resize(newSize);
- }
-
_functionVector.insert(index, f);
#if TRACE_LOADER
@@ -506,7 +503,7 @@
if ((_functionVector.size() <= index) ||
( (f=(TraceFunction*)_functionVector.at(index)) == 0)) {
kdError() << _filename << ":" << _lineNo
- << "- Undefined compressed function index "
+ << " - Undefined compressed function index "
<< index << endl;
return 0;
}
@@ -517,7 +514,7 @@
}
else if (f->object() != object) {
kdError() << _filename << ":" << _lineNo
- << "- Redefinition of object for function " << f->name()
+ << " - Redefinition of object for function " << f->name()
<< " (was '" << f->object()->name()
<< "') to '" << object->name() << "'" << endl;
}
@@ -528,7 +525,7 @@
}
else if (f->file() != file) {
kdError() << _filename << ":" << _lineNo
- << "- Redefinition of file for function " << f->name()
+ << " - Redefinition of file for function " << f->name()
<< " (was '" << f->file()->name()
<< "') to '" << file->name() << "'" << endl;
}
@@ -1097,7 +1094,7 @@
break;
}
- kdWarning() << _filename << ":" << _lineNo
+ kdError() << _filename << ":" << _lineNo
<< " - Invalid line '" << c << QString(line) << "'" << endl;
continue;
}
@@ -1125,7 +1122,7 @@
if (!currentInstr) {
kdError() << _filename << ":" << _lineNo
- << "- Invalid address "
+ << " - Invalid address "
<< currentPos.fromAddr.toString() << endl;
continue;
@@ -1200,8 +1197,9 @@
#endif
if (!line.isEmpty()) {
- kdWarning() << _filename << ":" << _lineNo
- << " - Ignored garbage at end of cost line ('" << QString(line) << "')" << endl;
+ kdError() << _filename << ":" << _lineNo
+ << " - Garbage at end of cost line ('"
+ << QString(line) << "')" << endl;
}
}
else if (nextLineType == CallCost) {
@@ -1264,6 +1262,12 @@
currentCalledObject = 0;
currentCalledPartObject = 0;
currentCallCount = 0;
+
+ if (!line.isEmpty()) {
+ kdError() << _filename << ":" << _lineNo
+ << " - Garbage at end of call cost line ('"
+ << QString(line) << "')" << endl;
+ }
}
else { // (nextLineType == BoringJump || nextLineType == CondJump)
@@ -1309,6 +1313,13 @@
nextLineType = SelfCost;
currentJumpToFunction = 0;
currentJumpToFile = 0;
+
+ if (!line.isEmpty()) {
+ kdError() << _filename << ":" << _lineNo
+ << " - Garbage at end of jump cost line ('"
+ << QString(line) << "')" << endl;
+ }
+
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic