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 <utils/savedaction.h>
|
||||||
|
|
||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
|
#include <QtCore/QFileInfo>
|
||||||
|
|
||||||
enum { debug = 0 };
|
enum { debug = 0 };
|
||||||
|
|
||||||
@@ -100,12 +101,12 @@ QList<StackFrame> CdbStackTraceContext::stackFrames() const
|
|||||||
// Convert from Core data structures
|
// Convert from Core data structures
|
||||||
QList<StackFrame> rc;
|
QList<StackFrame> rc;
|
||||||
const int count = frameCount();
|
const int count = frameCount();
|
||||||
const QString hexPrefix = QLatin1String("0x");
|
|
||||||
for(int i = 0; i < count; i++) {
|
for(int i = 0; i < count; i++) {
|
||||||
const CdbCore::StackFrame &coreFrame = stackFrameAt(i);
|
const CdbCore::StackFrame &coreFrame = stackFrameAt(i);
|
||||||
StackFrame frame;
|
StackFrame frame;
|
||||||
frame.level = i;
|
frame.level = i;
|
||||||
frame.file = coreFrame.fileName;
|
frame.file = coreFrame.fileName;
|
||||||
|
frame.usable = !frame.file.isEmpty() && QFileInfo(frame.file).isFile();
|
||||||
frame.line = coreFrame.line;
|
frame.line = coreFrame.line;
|
||||||
frame.function = coreFrame.function;
|
frame.function = coreFrame.function;
|
||||||
frame.from = coreFrame.module;
|
frame.from = coreFrame.module;
|
||||||
|
|||||||
@@ -1801,6 +1801,7 @@ static StackFrames parseFrames(const QByteArray &data)
|
|||||||
if (fullName.isValid()) {
|
if (fullName.isValid()) {
|
||||||
frame.file = QFile::decodeName(fullName.data());
|
frame.file = QFile::decodeName(fullName.data());
|
||||||
frame.line = frameMi.findChild("line").data().toInt();
|
frame.line = frameMi.findChild("line").data().toInt();
|
||||||
|
frame.usable = QFileInfo(frame.file).isFile();
|
||||||
}
|
}
|
||||||
frame.function = QLatin1String(frameMi.findChild("func").data());
|
frame.function = QLatin1String(frameMi.findChild("func").data());
|
||||||
frame.from = QLatin1String(frameMi.findChild("from").data());
|
frame.from = QLatin1String(frameMi.findChild("from").data());
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
|
|
||||||
#include "cdbparsehelpers.h"
|
#include "cdbparsehelpers.h"
|
||||||
#include "breakpoint.h"
|
#include "breakpoint.h"
|
||||||
#include "stackframe.h"
|
|
||||||
#include "threadshandler.h"
|
#include "threadshandler.h"
|
||||||
#include "registerhandler.h"
|
#include "registerhandler.h"
|
||||||
#include "bytearrayinputstream.h"
|
#include "bytearrayinputstream.h"
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ namespace Debugger {
|
|||||||
namespace Internal {
|
namespace Internal {
|
||||||
class BreakpointData;
|
class BreakpointData;
|
||||||
class BreakpointParameters;
|
class BreakpointParameters;
|
||||||
class StackFrame;
|
|
||||||
struct ThreadData;
|
struct ThreadData;
|
||||||
class Register;
|
class Register;
|
||||||
class GdbMi;
|
class GdbMi;
|
||||||
|
|||||||
Reference in New Issue
Block a user