Commit 8e522c92 authored by hjk's avatar hjk
Browse files

debugger: really don't use curses on windows

parent 62811941
...@@ -10,8 +10,15 @@ import base64 ...@@ -10,8 +10,15 @@ import base64
import os import os
import __builtin__ 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 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 # only needed for gdb 7.0/7.0.1 that do not implement parse_and_eval
import os import os
......
...@@ -37,8 +37,7 @@ def qdump__QByteArray(d, item): ...@@ -37,8 +37,7 @@ def qdump__QByteArray(d, item):
def qdump__QChar(d, item): def qdump__QChar(d, item):
ucs = int(item.value["ucs"]) ucs = int(item.value["ucs"])
c = select(curses.ascii.isprint(ucs), ucs, '?') d.putValue("'%c' (%d)" % (printableChar(ucs), ucs))
d.putValue("'%c' (%d)" % (c, ucs))
d.putNumChild(0) d.putNumChild(0)
......
...@@ -428,7 +428,7 @@ void testQList() ...@@ -428,7 +428,7 @@ void testQList()
flist.push_back(1000); flist.push_back(1000);
flist.push_back(1001); flist.push_back(1001);
flist.push_back(1002); flist.push_back(1002);
#if 0 #if 1
QList<int> li; QList<int> li;
QList<uint> lu; QList<uint> lu;
......
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