forked from qt-creator/qt-creator
Debugger: Fix StackFrame.usable for CDB
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user