Commit 1477165e authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Debugger: Fix StackFrame.usable for CDB

parent abbb4469
......@@ -40,6 +40,7 @@
#include <utils/savedaction.h>
#include <QtCore/QDebug>
#include <QtCore/QFileInfo>
enum { debug = 0 };
......@@ -100,14 +101,14 @@ 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.function = coreFrame.function;
frame.from = coreFrame.module;
frame.address = coreFrame.address;
rc.push_back(frame);
......
......@@ -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());
......
......@@ -29,7 +29,6 @@
#include "cdbparsehelpers.h"
#include "breakpoint.h"
#include "stackframe.h"
#include "threadshandler.h"
#include "registerhandler.h"
#include "bytearrayinputstream.h"
......
......@@ -44,7 +44,6 @@ namespace Debugger {
namespace Internal {
class BreakpointData;
class BreakpointParameters;
class StackFrame;
struct ThreadData;
class Register;
class GdbMi;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment