diff options
author | David Schulz <david.schulz@qt.io> | 2022-11-29 14:58:50 +0100 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2022-11-30 07:45:33 +0000 |
commit | 7373193584e1e7672ebaf5b4ad821e9e974a7b44 (patch) | |
tree | 27227f7ea43620f7808fd6fe48decf6acbf1dc1f /src/plugins/debugger/cdb/cdbparsehelpers.cpp | |
parent | f3ce23230e596c6494cba583bbeb230909e11f79 (diff) | |
download | qt-creator-7373193584e1e7672ebaf5b4ad821e9e974a7b44.tar.gz |
Debugger: map reported breakpoint file locations
Fixes: QTCREATORBUG-28521
Change-Id: I8229483df7fb0c51750e19d4558e81f5320e7f33
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/debugger/cdb/cdbparsehelpers.cpp')
-rw-r--r-- | src/plugins/debugger/cdb/cdbparsehelpers.cpp | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/src/plugins/debugger/cdb/cdbparsehelpers.cpp b/src/plugins/debugger/cdb/cdbparsehelpers.cpp index d8bf3996d8..f9e2d371cb 100644 --- a/src/plugins/debugger/cdb/cdbparsehelpers.cpp +++ b/src/plugins/debugger/cdb/cdbparsehelpers.cpp @@ -189,64 +189,6 @@ QString cdbClearBreakpointCommand(const Breakpoint &bp) return "bc " + QString::number(firstBreakPoint) + '-' + QString::number(lastBreakPoint); } -// Helper to retrieve an int child from GDBMI -static inline bool gdbmiChildToInt(const GdbMi &parent, const char *childName, int *target) -{ - const GdbMi childBA = parent[childName]; - if (childBA.isValid()) { - bool ok; - const int v = childBA.data().toInt(&ok); - if (ok) { - *target = v; - return true; - } - } - return false; -} - -// Helper to retrieve an bool child from GDBMI -static inline bool gdbmiChildToBool(const GdbMi &parent, const char *childName, bool *target) -{ - const GdbMi childBA = parent[childName]; - if (childBA.isValid()) { - *target = childBA.data() == "true"; - return true; - } - return false; -} - -// Parse extension command listing breakpoints. -// Note that not all fields are returned, since file, line, function are encoded -// in the expression (that is in addition deleted on resolving for a bp-type breakpoint). -void parseBreakPoint(const GdbMi &gdbmi, BreakpointParameters *r, - QString *expression /* = 0 */) -{ - gdbmiChildToBool(gdbmi, "enabled", &(r->enabled)); - gdbmiChildToBool(gdbmi, "deferred", &(r->pending)); - const GdbMi moduleG = gdbmi["module"]; - if (moduleG.isValid()) - r->module = moduleG.data(); - const GdbMi sourceFileName = gdbmi["srcfile"]; - if (sourceFileName.isValid()) { - r->fileName = Utils::FilePath::fromUserInput( - Utils::FileUtils::normalizedPathName(sourceFileName.data())); - const GdbMi lineNumber = gdbmi["srcline"]; - if (lineNumber.isValid()) - r->lineNumber = lineNumber.data().toULongLong(nullptr, 0); - } - if (expression) { - const GdbMi expressionG = gdbmi["expression"]; - if (expressionG.isValid()) - *expression = expressionG.data(); - } - const GdbMi addressG = gdbmi["address"]; - if (addressG.isValid()) - r->address = addressG.data().toULongLong(nullptr, 0); - if (gdbmiChildToInt(gdbmi, "passcount", &(r->ignoreCount))) - r->ignoreCount--; - gdbmiChildToInt(gdbmi, "thread", &(r->threadSpec)); -} - QString cdbWriteMemoryCommand(quint64 addr, const QByteArray &data) { QString cmd; |