diff options
author | hjk <qtc-committer@nokia.com> | 2010-03-08 13:14:23 +0100 |
---|---|---|
committer | con <qtc-committer@nokia.com> | 2010-03-08 17:45:40 +0100 |
commit | cc99038693e5fef2670830fd876c182bd85125d3 (patch) | |
tree | 0bc187a11ca17285ecb8c2ba334f8c5fc55874cb | |
parent | 763986bc431ec92f2640d25ffda2b24184dfa719 (diff) |
debugger: really don't use curses on windows
(cherry picked from commit 8e522c92eec0f83a19c0d3cbd1d77ab8a1a4f4d4)
-rw-r--r-- | share/qtcreator/gdbmacros/dumper.py | 9 | ||||
-rw-r--r-- | share/qtcreator/gdbmacros/gdbmacros.py | 3 | ||||
-rw-r--r-- | tests/manual/gdbdebugger/simple/app.cpp | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/share/qtcreator/gdbmacros/dumper.py b/share/qtcreator/gdbmacros/dumper.py index 5627c6d4fb..aa5e4dd0ee 100644 --- a/share/qtcreator/gdbmacros/dumper.py +++ b/share/qtcreator/gdbmacros/dumper.py @@ -9,8 +9,15 @@ import gdb import base64 import os -if os.name != "nt": +if os.name == "nt": + def printableChar(ucs): + if ucs >= 32 and ucs <= 126: + return ucs + return '?' +else: import curses.ascii + def printableChar(ucs): + return select(curses.ascii.isprint(ucs), ucs, '?') # only needed for gdb 7.0/7.0.1 that do not implement parse_and_eval import os diff --git a/share/qtcreator/gdbmacros/gdbmacros.py b/share/qtcreator/gdbmacros/gdbmacros.py index a72db1212d..3445b9fa62 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.py +++ b/share/qtcreator/gdbmacros/gdbmacros.py @@ -37,8 +37,7 @@ def qdump__QByteArray(d, item): def qdump__QChar(d, item): ucs = int(item.value["ucs"]) - c = select(curses.ascii.isprint(ucs), ucs, '?') - d.putValue("'%c' (%d)" % (c, ucs)) + d.putValue("'%c' (%d)" % (printableChar(ucs), ucs)) d.putNumChild(0) diff --git a/tests/manual/gdbdebugger/simple/app.cpp b/tests/manual/gdbdebugger/simple/app.cpp index a70459d11a..316ed1ce78 100644 --- a/tests/manual/gdbdebugger/simple/app.cpp +++ b/tests/manual/gdbdebugger/simple/app.cpp @@ -428,7 +428,7 @@ void testQList() flist.push_back(1000); flist.push_back(1001); flist.push_back(1002); -#if 0 +#if 1 QList<int> li; QList<uint> lu; |