forked from qt-creator/qt-creator
Set breakpoints only by filename (again)
This essentially reverts 3aa0e50039 , which causes trouble
e.g. for network paths and other corner cases.
Change-Id: I12ceb5fbc68b7a3fc8010165acc910acd2d95e55
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -2546,35 +2546,6 @@ QString GdbEngine::breakLocation(const QString &file) const
|
|||||||
return where;
|
return where;
|
||||||
}
|
}
|
||||||
|
|
||||||
BreakpointPathUsage GdbEngine::defaultEngineBreakpointPathUsage() const
|
|
||||||
{
|
|
||||||
// e.g. MinGW gdb 70200 (part of Qt SDK)
|
|
||||||
// fails to set breakpoints with absolute paths if
|
|
||||||
// the source path isn't canonical
|
|
||||||
if (m_gdbVersion < 70300)
|
|
||||||
return BreakpointUseShortPath;
|
|
||||||
// Use short path for file systems with symbolic links. On Windows, main.cpp
|
|
||||||
// is potentially ambiguous (ANGLE, DLL).
|
|
||||||
if (startParameters().toolChainAbi.os() != ProjectExplorer::Abi::WindowsOS)
|
|
||||||
return BreakpointUseShortPath;
|
|
||||||
|
|
||||||
//don't set absolute breakpoints for remote targets
|
|
||||||
switch (startMode()) {
|
|
||||||
case AttachToRemoteServer:
|
|
||||||
case AttachToRemoteProcess:
|
|
||||||
case LoadRemoteCore:
|
|
||||||
case StartRemoteProcess:
|
|
||||||
case StartRemoteGdb:
|
|
||||||
case StartRemoteEngine:
|
|
||||||
return BreakpointUseShortPath;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return BreakpointUseFullPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
QByteArray GdbEngine::breakpointLocation(BreakpointModelId id)
|
QByteArray GdbEngine::breakpointLocation(BreakpointModelId id)
|
||||||
{
|
{
|
||||||
BreakHandler *handler = breakHandler();
|
BreakHandler *handler = breakHandler();
|
||||||
@@ -2596,7 +2567,7 @@ QByteArray GdbEngine::breakpointLocation(BreakpointModelId id)
|
|||||||
|
|
||||||
BreakpointPathUsage usage = data.pathUsage;
|
BreakpointPathUsage usage = data.pathUsage;
|
||||||
if (usage == BreakpointPathUsageEngineDefault)
|
if (usage == BreakpointPathUsageEngineDefault)
|
||||||
usage = defaultEngineBreakpointPathUsage();
|
usage = BreakpointUseShortPath;
|
||||||
|
|
||||||
const QString fileName = usage == BreakpointUseFullPath
|
const QString fileName = usage == BreakpointUseFullPath
|
||||||
? data.fileName : breakLocation(data.fileName);
|
? data.fileName : breakLocation(data.fileName);
|
||||||
@@ -2614,7 +2585,7 @@ QByteArray GdbEngine::breakpointLocation2(BreakpointModelId id)
|
|||||||
|
|
||||||
BreakpointPathUsage usage = data.pathUsage;
|
BreakpointPathUsage usage = data.pathUsage;
|
||||||
if (usage == BreakpointPathUsageEngineDefault)
|
if (usage == BreakpointPathUsageEngineDefault)
|
||||||
usage = defaultEngineBreakpointPathUsage();
|
usage = BreakpointUseShortPath;
|
||||||
|
|
||||||
const QString fileName = usage == BreakpointUseFullPath
|
const QString fileName = usage == BreakpointUseFullPath
|
||||||
? data.fileName : breakLocation(data.fileName);
|
? data.fileName : breakLocation(data.fileName);
|
||||||
|
|||||||
@@ -456,7 +456,6 @@ private: ////////// View & Data Stuff //////////
|
|||||||
void handleInfoLine(const GdbResponse &response);
|
void handleInfoLine(const GdbResponse &response);
|
||||||
void extractDataFromInfoBreak(const QString &output, BreakpointModelId);
|
void extractDataFromInfoBreak(const QString &output, BreakpointModelId);
|
||||||
void updateResponse(BreakpointResponse &response, const GdbMi &bkpt);
|
void updateResponse(BreakpointResponse &response, const GdbMi &bkpt);
|
||||||
BreakpointPathUsage defaultEngineBreakpointPathUsage() const;
|
|
||||||
QByteArray breakpointLocation(BreakpointModelId id); // For gdb/MI.
|
QByteArray breakpointLocation(BreakpointModelId id); // For gdb/MI.
|
||||||
QByteArray breakpointLocation2(BreakpointModelId id); // For gdb/CLI fallback.
|
QByteArray breakpointLocation2(BreakpointModelId id); // For gdb/CLI fallback.
|
||||||
QString breakLocation(const QString &file) const;
|
QString breakLocation(const QString &file) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user