Репозитории ALT
S: | 3.0.1-alt1 |
5.1: | 2.1.1-alt2 |
4.1: | 2.1.0-alt1 |
4.0: | 2.0.5-alt1 |
3.0: | 1.2.10-alt1.1 |
Группа :: Разработка/Прочее
Пакет: kdbg
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: kdbg-2.0.4-fix_receive_gdb_output.patch
Скачать
Скачать
diff -Naur kdbg-2.0.4-orig/kdbg/dbgdriver.cpp kdbg-2.0.4/kdbg/dbgdriver.cpp
--- kdbg-2.0.4-orig/kdbg/dbgdriver.cpp 2006-10-16 13:02:37.000000000 +0400
+++ kdbg-2.0.4/kdbg/dbgdriver.cpp 2006-10-16 13:00:26.000000000 +0400
@@ -386,7 +386,7 @@
promptStart = m_outputLen-m_promptMinLen;
}
} else {
- QString output = QString::fromLatin1(m_output, m_outputLen);
+ QString output = QString::fromLocal8Bit(m_output, m_outputLen);
#if QT_VERSION >= 300
promptStart = m_promptRE.search(output);
#else
diff -Naur kdbg-2.0.4-orig/kdbg/exprwnd.cpp kdbg-2.0.4/kdbg/exprwnd.cpp
--- kdbg-2.0.4-orig/kdbg/exprwnd.cpp 2006-05-27 16:25:56.000000000 +0400
+++ kdbg-2.0.4/kdbg/exprwnd.cpp 2006-10-16 13:01:48.000000000 +0400
@@ -180,7 +180,7 @@
return;
}
const QString& typeName =
- FROM_LATIN1(start+1, p-start-3) // minus 3 chars
+ QString::fromLocal8Bit(start+1, p-start-3) // minus 3 chars
.stripWhiteSpace();
m_type = typeTable.lookup(typeName);
if (m_type == 0) {
diff -Naur kdbg-2.0.4-orig/kdbg/gdbdriver.cpp kdbg-2.0.4/kdbg/gdbdriver.cpp
--- kdbg-2.0.4-orig/kdbg/gdbdriver.cpp 2006-05-27 16:25:56.000000000 +0400
+++ kdbg-2.0.4/kdbg/gdbdriver.cpp 2006-10-16 13:01:34.000000000 +0400
@@ -676,7 +676,7 @@
const char* endMsg = strchr(output, '\n');
if (endMsg == 0)
endMsg = output + strlen(output);
- variable->m_value = FROM_LATIN1(output, endMsg-output);
+ variable->m_value = QString::fromLocal8Bit(output, endMsg-output);
} else {
variable = 0;
}
@@ -776,7 +776,7 @@
if (p == 0)
goto error;
p++; /* skip '>' */
- repeatCount = FROM_LATIN1(start, p-start);
+ repeatCount = QString::fromLocal8Bit(start, p-start);
while (isspace(*p) || *p == ',')
p++;
}
@@ -1089,7 +1089,7 @@
if (*p == '<') {
skipNestedAngles(p);
- name = FROM_LATIN1(s, p - s);
+ name = QString::fromLocal8Bit(s, p - s);
kind = VarTree::NKtype;
}
else
@@ -1115,7 +1115,7 @@
}
len = p - s;
}
- name = FROM_LATIN1(s, len);
+ name = QString::fromLocal8Bit(s, len);
}
// return the new position
s = p;
@@ -1138,7 +1138,7 @@
{
const char* start = s;
skipNested(s, '{', '}');
- variable->m_value = FROM_LATIN1(start, s-start);
+ variable->m_value = QString::fromLocal8Bit(start, s-start);
variable->m_value += ' '; // add only a single space
while (isspace(*s))
s++;
@@ -1189,7 +1189,7 @@
while (isspace(*p))
p++;
- variable->m_value = FROM_LATIN1(s, p - s);
+ variable->m_value = QString::fromLocal8Bit(s, p - s);
}
bool reference = false;
@@ -1297,7 +1297,7 @@
if (*p == '(')
skipNested(p, '(', ')');
}
- variable->m_value += FROM_LATIN1(start, p - start);
+ variable->m_value += QString::fromLocal8Bit(start, p - start);
// remove line breaks from the value; this is ok since
// string values never contain a literal line break
@@ -1321,7 +1321,7 @@
if (p != start) {
// there is always a blank before the string,
// which we will include in the final string value
- variable->m_value += FROM_LATIN1(start-1, (p - start)+1);
+ variable->m_value += QString::fromLocal8Bit(start-1, (p - start)+1);
// if this was a pointer, reset that flag since we
// now got the value
variable->m_varKind = VarTree::VKsimple;
@@ -1500,7 +1500,7 @@
p++;
while (isxdigit(*p))
p++;
- address = FROM_LATIN1(start, p-start);
+ address = QString::fromLocal8Bit(start, p-start);
if (strncmp(p, " in ", 4) == 0)
p += 4;
} else {
@@ -1509,7 +1509,7 @@
const char* start = p;
// check for special signal handler frame
if (strncmp(p, "<signal handler called>", 23) == 0) {
- func = FROM_LATIN1(start, 23);
+ func = QString::fromLocal8Bit(start, 23);
file = QString();
lineNo = -1;
s = p+23;
@@ -1586,7 +1586,7 @@
do {
--colon;
} while (*colon != ':');
- file = FROM_LATIN1(fileStart, colon-fileStart);
+ file = QString::fromLocal8Bit(fileStart, colon-fileStart);
lineNo = atoi(colon+1)-1;
// skip new-line
if (*p != '\0')
@@ -1609,7 +1609,7 @@
if (*p == '\0') {
func = start;
} else {
- func = FROM_LATIN1(start, p-start-1); /* don't include \n */
+ func = QString::fromLocal8Bit(start, p-start-1); /* don't include \n */
}
s = p;
@@ -1761,7 +1761,7 @@
const char* start = p;
while (*p != '\0' && !isspace(*p))
p++;
- address = FROM_LATIN1(start, p-start);
+ address = QString::fromLocal8Bit(start, p-start);
while (isspace(*p) && *p != '\n')
p++;
if (*p == '\0')
@@ -1778,7 +1778,7 @@
location = p;
p += location.length();
} else {
- location = FROM_LATIN1(p, end-p).stripWhiteSpace();
+ location = QString::fromLocal8Bit(p, end-p).stripWhiteSpace();
p = end+1; /* skip over \n */
}
@@ -1801,7 +1801,7 @@
} else if (strncmp(p, "stop only if ", 13) == 0) {
// extract condition
p += 13;
- condition = FROM_LATIN1(p, end-p).stripWhiteSpace();
+ condition = QString::fromLocal8Bit(p, end-p).stripWhiteSpace();
TRACE("condition: "+condition);
} else if (strncmp(p, "ignore next ", 12) == 0) {
// extract ignore count
@@ -1810,7 +1810,7 @@
TRACE(QString().sprintf("ignore count %d", ignoreCount));
} else {
// indeed a continuation
- location += " " + FROM_LATIN1(p, end-p).stripWhiteSpace();
+ location += " " + QString::fromLocal8Bit(p, end-p).stripWhiteSpace();
}
p = end;
if (*p != '\0')
@@ -1875,7 +1875,7 @@
// syntax error; bail out
return true;
}
- systag = FROM_LATIN1(p, end-p);
+ systag = QString::fromLocal8Bit(p, end-p);
p = end+2;
/*
@@ -1950,7 +1950,7 @@
p += 6;
while (isxdigit(*p))
++p;
- address = FROM_LATIN1(start, p-start);
+ address = QString::fromLocal8Bit(start, p-start);
}
// file name
@@ -1961,7 +1961,7 @@
// line number
char* numStart = strstr(fileStart, ", line ");
- QString fileName = FROM_LATIN1(fileStart, numStart-fileStart);
+ QString fileName = QString::fromLocal8Bit(fileStart, numStart-fileStart);
numStart += 7;
int line = strtoul(numStart, &p, 10);
if (numStart == p)
@@ -1986,7 +1986,7 @@
p += 2;
// all the rest on the line is the expression
- expr = FROM_LATIN1(p, strlen(p)).stripWhiteSpace();
+ expr = QString::fromLocal8Bit(p, strlen(p)).stripWhiteSpace();
return true;
}
@@ -2125,7 +2125,7 @@
const char* endOfMessage = strchr(start, '\n');
if (endOfMessage == 0)
endOfMessage = start + strlen(start);
- message = FROM_LATIN1(start, endOfMessage-start);
+ message = QString::fromLocal8Bit(start, endOfMessage-start);
} else if (strncmp(start, "Breakpoint ", 11) == 0) {
/*
* We stopped at a (permanent) breakpoint (gdb doesn't tell us
@@ -2181,7 +2181,7 @@
output = strchr(output, '\n');
if (output == 0)
output = start + strlen(start);
- shlibName = FROM_LATIN1(start, output-start);
+ shlibName = QString::fromLocal8Bit(start, output-start);
if (*output != '\0')
output++;
shlibs.append(shlibName);
@@ -2231,7 +2231,7 @@
output++;
if (*output == '\0')
break;
- regName = FROM_LATIN1(start, output-start);
+ regName = QString::fromLocal8Bit(start, output-start);
// skip space
while (isspace(*output))
@@ -2248,7 +2248,7 @@
{
start = output;
skipNested(output, '{', '}');
- value = FROM_LATIN1(start, output-start).simplifyWhiteSpace();
+ value = QString::fromLocal8Bit(start, output-start).simplifyWhiteSpace();
// skip space, but not the end of line
while (isspace(*output) && *output != '\n')
output++;
@@ -2265,7 +2265,7 @@
start = output;
skipNested(output, '{', '}');
- value = FROM_LATIN1(start, output-start).simplifyWhiteSpace();
+ value = QString::fromLocal8Bit(start, output-start).simplifyWhiteSpace();
} else {
// for gdb 5.3
// find first type that does not have an array, this is the RAW value
@@ -2282,7 +2282,7 @@
end=cur;
while (*end && (*end!='}') && (*end!=',') && (*end!='\n'))
end++;
- QString rawValue = FROM_LATIN1(cur, end-cur).simplifyWhiteSpace();
+ QString rawValue = QString::fromLocal8Bit(cur, end-cur).simplifyWhiteSpace();
reg->rawValue = rawValue;
if (rawValue.left(2)=="0x") {
@@ -2294,7 +2294,7 @@
while (*cur!='{' && *cur!=' ')
cur--;
cur++;
- reg->type=FROM_LATIN1(cur, end-cur);
+ reg->type=QString::fromLocal8Bit(cur, end-cur);
}
// end while loop
@@ -2319,7 +2319,7 @@
output = strchr(output,'\n');
if (output == 0)
output = start + strlen(start);
- value = FROM_LATIN1(start, output-start).simplifyWhiteSpace();
+ value = QString::fromLocal8Bit(start, output-start).simplifyWhiteSpace();
/*
* We split the raw from the cooked values.
@@ -2370,7 +2370,7 @@
const char* p = start;
while (*p != '\0' && !isspace(*p))
p++;
- addrFrom = FROM_LATIN1(start, p-start);
+ addrFrom = QString::fromLocal8Bit(start, p-start);
start = strstr(p, "and ends at ");
if (start == 0) {
@@ -2382,7 +2382,7 @@
p = start;
while (*p != '\0' && !isspace(*p))
p++;
- addrTo = FROM_LATIN1(start, p-start);
+ addrTo = QString::fromLocal8Bit(start, p-start);
return true;
}
@@ -2420,7 +2420,7 @@
// address
while (p != end && !isspace(*p))
p++;
- address = FROM_LATIN1(start, p-start);
+ address = QString::fromLocal8Bit(start, p-start);
// function name (enclosed in '<>', followed by ':')
while (p != end && *p != '<')
@@ -2443,7 +2443,7 @@
DisassembledCode* c = new DisassembledCode;
c->address = address;
- c->code = FROM_LATIN1(start, p-start);
+ c->code = QString::fromLocal8Bit(start, p-start);
code.append(c);
}
}
@@ -2465,7 +2465,7 @@
const char* start = p;
while (*p != '\0' && *p != ':' && !isspace(*p))
p++;
- addr = FROM_LATIN1(start, p-start);
+ addr = QString::fromLocal8Bit(start, p-start);
if (*p != ':') {
// parse function offset
while (isspace(*p))
@@ -2473,7 +2473,7 @@
start = p;
while (*p != '\0' && !(*p == ':' && isspace(p[1])))
p++;
- addr.fnoffs = FROM_LATIN1(start, p-start);
+ addr.fnoffs = QString::fromLocal8Bit(start, p-start);
}
if (*p == ':')
p++;
@@ -2483,10 +2483,10 @@
// everything to the end of the line is the memory dump
const char* end = strchr(p, '\n');
if (end != 0) {
- dump = FROM_LATIN1(p, end-p);
+ dump = QString::fromLocal8Bit(p, end-p);
p = end+1;
} else {
- dump = FROM_LATIN1(p, strlen(p));
+ dump = QString::fromLocal8Bit(p, strlen(p));
p += strlen(p);
}
MemoryDump* md = new MemoryDump;
@@ -2536,10 +2536,10 @@
++s;
if (*s == '"') {
// a string
- return FROM_LATIN1(start, end-start);
+ return QString::fromLocal8Bit(start, end-start);
} else {
// other pointer
- return FROM_LATIN1(start, strlen(start));
+ return QString::fromLocal8Bit(start, strlen(start));
}
}
diff -Naur kdbg-2.0.4-orig/kdbg/procattach.cpp kdbg-2.0.4/kdbg/procattach.cpp
--- kdbg-2.0.4-orig/kdbg/procattach.cpp 2006-10-16 13:02:37.000000000 +0400
+++ kdbg-2.0.4/kdbg/procattach.cpp 2006-10-16 13:00:26.000000000 +0400
@@ -70,7 +70,7 @@
{
// push a tokens onto the line
if (!m_token.isEmpty()) {
- m_line.push_back(QString::fromLatin1(m_token));
+ m_line.push_back(QString::fromLocal8Bit(m_token));
m_token = "";
}
// and insert the line in the list
@@ -84,7 +84,7 @@
{
// push a token onto the line
if (!m_token.isEmpty()) {
- m_line.push_back(QString::fromLatin1(m_token));
+ m_line.push_back(QString::fromLocal8Bit(m_token));
m_token = "";
}
do {
diff -Naur kdbg-2.0.4-orig/kdbg/ttywnd.cpp kdbg-2.0.4/kdbg/ttywnd.cpp
--- kdbg-2.0.4-orig/kdbg/ttywnd.cpp 2006-10-16 13:02:37.000000000 +0400
+++ kdbg-2.0.4/kdbg/ttywnd.cpp 2006-10-16 13:00:26.000000000 +0400
@@ -196,7 +196,7 @@
++len;
}
if (len > 0) {
- QString str = QString::fromLatin1(start, len);
+ QString str = QString::fromLocal8Bit(start, len);
// update last line
str = m_texts[m_texts.size()-1] + str;
replaceLine(m_texts.size()-1, str);
diff -Naur kdbg-2.0.4-orig/kdbg/xsldbgdriver.cpp kdbg-2.0.4/kdbg/xsldbgdriver.cpp
--- kdbg-2.0.4-orig/kdbg/xsldbgdriver.cpp 2006-05-27 16:25:56.000000000 +0400
+++ kdbg-2.0.4/kdbg/xsldbgdriver.cpp 2006-10-16 13:01:15.000000000 +0400
@@ -714,7 +714,7 @@
if (endMsg == 0)
endMsg = output + strlen(output);
- variable->m_value = FROM_LATIN1(output, endMsg - output);
+ variable->m_value = QString::fromLocal8Bit(output, endMsg - output);
} else {
variable = 0;
}
@@ -774,7 +774,7 @@
TRACE("Found print expr");
if (nextLine) {
p = p + 2; /* skip the "= " */
- name = FROM_LATIN1(p, nextLine - p);
+ name = QString::fromLocal8Bit(p, nextLine - p);
kind = VarTree::NKplain;
p = nextLine + 1;
variable = new VarTree(name, kind);
@@ -857,7 +857,7 @@
}
- name = FROM_LATIN1(s, len);
+ name = QString::fromLocal8Bit(s, len);
/* XSL variables will have a $ prefix to be evaluated
* properly */
//TRACE(QString("parseName got name" ) + name);