Commit bf0e0d80 authored by hjk's avatar hjk Committed by Ray Donnelly
Browse files

Debugger: Don't skip first char after "This GDB was configured as \""

sizeof(needle) includes the \0 terminator, so the first letter of the
target triplet was being skipped too. This caused the architecture to
be mis-detected and (for us on MSYS2) the 32bit GDB to be selected in
64bit Kits.

Change-Id: Id54bc320baf6cc604f2d41fa7ff05aca0756a296
Reviewed-by: default avatarhjk <>
Reviewed-by: default avatarRay Donnelly <>
parent ffc00e5e
......@@ -110,7 +110,7 @@ void DebuggerItem::reinitializeFromFile()
// or "i686-linux-gnu"
int pos1 = ba.indexOf(needle);
if (pos1 != -1) {
pos1 += int(sizeof(needle));
pos1 += int(strlen(needle));
int pos2 = ba.indexOf('"', pos1 + 1);
QByteArray target = ba.mid(pos1, pos2 - pos1);
int pos3 = target.indexOf("--target=");
Supports Markdown
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