diff --git a/share/qtcreator/gdbmacros/gdbmacros.cpp b/share/qtcreator/gdbmacros/gdbmacros.cpp
index f6cc8f95ede11193219cced963b6b3e3e5da8b7a..5576b36c6f2991e1f41ee6e1fdb7aea05e415086 100644
--- a/share/qtcreator/gdbmacros/gdbmacros.cpp
+++ b/share/qtcreator/gdbmacros/gdbmacros.cpp
@@ -555,7 +555,7 @@ void QDumper::addCommaIfNeeded()
         put(',');
 }
 
-void QDumper::putBase64Encoded(const char *buf, int n)
+void QDumper::putBase64Encoded(const char *buf, int n, char delim)
 {
     const char alphabet[] = "ABCDEFGH" "IJKLMNOP" "QRSTUVWX" "YZabcdef"
                             "ghijklmn" "opqrstuv" "wxyz0123" "456789+/";
diff --git a/src/plugins/debugger/gdbengine.cpp b/src/plugins/debugger/gdbengine.cpp
index 177df2e2c5929dc1acf897d000d862e3f6fed8bb..1924de930384f3295f1290e113cc7911634508b8 100644
--- a/src/plugins/debugger/gdbengine.cpp
+++ b/src/plugins/debugger/gdbengine.cpp
@@ -2761,14 +2761,17 @@ static void setWatchDataValue(WatchData &data, const GdbMi &mi,
                 break;
             case 1: //  base64 encoded 8 bit data
                 ba = QByteArray::fromBase64(mi.data());
+                ba = '"' + ba + '"';
                 break;
             case 2: //  base64 encoded 16 bit data
                 ba = QByteArray::fromBase64(mi.data());
                 ba = QString::fromUtf16((ushort *)ba.data(), ba.size() / 2).toUtf8();
+                ba = '"' + ba + '"';
                 break;
             case 3: //  base64 encoded 32 bit data
                 ba = QByteArray::fromBase64(mi.data());
                 ba = QString::fromUcs4((uint *)ba.data(), ba.size() / 4).toUtf8();
+                ba = '"' + ba + '"';
                 break;
         }
        data.setValue(ba);
@@ -3550,14 +3553,10 @@ void GdbEngine::handleDumpCustomValue2(const GdbResultRecord &record,
         data1.iname = data.iname + "." + data1.name;
         if (!data1.name.isEmpty() && data1.name.at(0).isDigit())
             data1.name = '[' + data1.name + ']';
-        //qDebug() << "NAMEENCODED: " << item.findChild("nameencoded").data()
-        //    << item.findChild("nameencoded").data()[1];
-        if (item.findChild("nameencoded").data()[0] == '1')
-            data1.name = QByteArray::fromBase64(data1.name.toUtf8());
         QString key = item.findChild("key").data();
         if (!key.isEmpty()) {
             if (item.findChild("keyencoded").data()[0] == '1')
-                key = QByteArray::fromBase64(key.toUtf8());
+                key = '"' + QByteArray::fromBase64(key.toUtf8()) + '"';
             data1.name += " (" + key + ")";
         }
         setWatchDataType(data1, item.findChild("type"));