debugger: really don't use curses on windows

This commit is contained in:
hjk
2010-03-08 13:14:23 +01:00
parent 62811941de
commit 8e522c92ee
3 changed files with 10 additions and 4 deletions

View File

@@ -10,8 +10,15 @@ import base64
import os
import __builtin__
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

View File

@@ -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)

View File

@@ -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;