Debugger: Fix StackFrame.usable for CDB

This commit is contained in:
Friedemann Kleint
2010-12-01 16:37:34 +01:00
parent abbb4469d5
commit 1477165e1c
4 changed files with 4 additions and 4 deletions

View File

@@ -40,6 +40,7 @@
#include <utils/savedaction.h>
#include <QtCore/QDebug>
#include <QtCore/QFileInfo>
enum { debug = 0 };
@@ -100,12 +101,12 @@ QList<StackFrame> CdbStackTraceContext::stackFrames() const
// Convert from Core data structures
QList<StackFrame> rc;
const int count = frameCount();
const QString hexPrefix = QLatin1String("0x");
for(int i = 0; i < count; i++) {
const CdbCore::StackFrame &coreFrame = stackFrameAt(i);
StackFrame frame;
frame.level = i;
frame.file = coreFrame.fileName;
frame.usable = !frame.file.isEmpty() && QFileInfo(frame.file).isFile();
frame.line = coreFrame.line;
frame.function = coreFrame.function;
frame.from = coreFrame.module;

View File

@@ -1801,6 +1801,7 @@ static StackFrames parseFrames(const QByteArray &data)
if (fullName.isValid()) {
frame.file = QFile::decodeName(fullName.data());
frame.line = frameMi.findChild("line").data().toInt();
frame.usable = QFileInfo(frame.file).isFile();
}
frame.function = QLatin1String(frameMi.findChild("func").data());
frame.from = QLatin1String(frameMi.findChild("from").data());

View File

@@ -29,7 +29,6 @@
#include "cdbparsehelpers.h"
#include "breakpoint.h"
#include "stackframe.h"
#include "threadshandler.h"
#include "registerhandler.h"
#include "bytearrayinputstream.h"

View File

@@ -44,7 +44,6 @@ namespace Debugger {
namespace Internal {
class BreakpointData;
class BreakpointParameters;
class StackFrame;
struct ThreadData;
class Register;
class GdbMi;