"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "kdbg/gdbdriver.cpp" between
kdbg-3.0.0.tar.gz and kdbg-3.0.1.tar.gz

About: KDbg is a graphical user interface to GDB, the GNU debugger (requires KDE, the K Desktop Environment).

gdbdriver.cpp  (kdbg-3.0.0):gdbdriver.cpp  (kdbg-3.0.1)
skipping to change at line 993 skipping to change at line 993
} }
} }
s = p; s = p;
} }
static bool isNumberish(const char ch) static bool isNumberish(const char ch)
{ {
return (ch>='0' && ch<='9') || ch=='.' || ch=='x'; return (ch>='0' && ch<='9') || ch=='.' || ch=='x';
} }
void skipString(const char*& p) static bool isStringPrefix(char c)
{ {
// wchar_t strings begin with L return c == 'L' || c == 'u' || c == 'U';
if (*p == 'L') }
static void skipString(const char*& p)
{
// strings can have a prefix
if (isStringPrefix(*p))
++p; ++p;
moreStrings: moreStrings:
// opening quote // opening quote
char quote = *p++; char quote = *p++;
while (*p != quote) { while (*p != quote) {
if (*p == '\\') { if (*p == '\\') {
// skip escaped character // skip escaped character
// no special treatment for octal values necessary // no special treatment for octal values necessary
p++; p++;
skipping to change at line 1108 skipping to change at line 1113
p++; p++;
} }
if (nest > 0) { if (nest > 0) {
TRACE(QString().sprintf("parse error: mismatching %c%c at %-20.20s", open ing, closing, s)); TRACE(QString().sprintf("parse error: mismatching %c%c at %-20.20s", open ing, closing, s));
} }
s = p; s = p;
} }
static void skipName(const char*& p) static void skipName(const char*& p)
{ {
// allow : (for enumeration values) and $ and . (for _vtbl.) while (isalnum(*p) || *p == '_'
while (isalnum(*p) || *p == '_' || *p == ':' || *p == '$' || *p == '.') || *p == ':' // enumeration values
|| *p == '$' || *p == '.' // _vtlb.
|| *p == '#') // param name in variadic templ
p++; p++;
} }
static void skipFunctionName(const char*& p) static void skipFunctionName(const char*& p)
{ {
while (*p) while (*p)
{ {
if (*p == '<') { if (*p == '<') {
// skip template parameter list // skip template parameter list
skipNestedAngles(p); skipNestedAngles(p);
skipping to change at line 1345 skipping to change at line 1352
// for char variables there is the char, eg. 10 '\n' // for char variables there is the char, eg. 10 '\n'
checkMultiPart = true; checkMultiPart = true;
} else if (*p == '<') { } else if (*p == '<') {
// e.g. <optimized out> // e.g. <optimized out>
skipNestedAngles(p); skipNestedAngles(p);
} else if (*p == '"' || *p == '\'') { } else if (*p == '"' || *p == '\'') {
// character may have multipart: '\000' <repeats 11 times> // character may have multipart: '\000' <repeats 11 times>
checkMultiPart = *p == '\''; checkMultiPart = *p == '\'';
// found a string // found a string
skipString(p); skipString(p);
} else if (*p == 'L' && (p[1] == '"' || p[1] == '\'')) { } else if (isStringPrefix(*p) && (p[1] == '"' || p[1] == '\'')) {
// ditto for wchar_t strings // ditto for wchar_t strings
checkMultiPart = p[1] == '\''; checkMultiPart = p[1] == '\'';
skipString(p); skipString(p);
} else if (*p == '&') { } else if (*p == '&') {
p++; p++;
if (strncmp(p, "virtual ", 8) == 0) { if (strncmp(p, "virtual ", 8) == 0) {
p += 8; p += 8;
if (strncmp(p, "table offset ", 13) == 0) { if (strncmp(p, "table offset ", 13) == 0) {
p += 13; p += 13;
skipDecimal(p); skipDecimal(p);
skipping to change at line 1415 skipping to change at line 1422
skipSpace(p); skipSpace(p);
// may be followed by a string or <...> // may be followed by a string or <...>
// if this was a pointer with a string, // if this was a pointer with a string,
// reset that pointer flag since we have now a value // reset that pointer flag since we have now a value
start = p; start = p;
checkMultiPart = false; checkMultiPart = false;
if (*p == '"' || *p == '\'') { if (*p == '"' || *p == '\'') {
skipString(p); skipString(p);
variable->m_varKind = VarTree::VKsimple; variable->m_varKind = VarTree::VKsimple;
} else if (*p == 'L' && (p[1] == '"' || p[1] == '\'')) { } else if (isStringPrefix(*p) && (p[1] == '"' || p[1] == '\'')) {
skipString(p); // wchar_t string skipString(p); // wchar_t string
variable->m_varKind = VarTree::VKsimple; variable->m_varKind = VarTree::VKsimple;
} else if (*p == '<') { } else if (*p == '<') {
// if this value is part of an array, it might be followed // if this value is part of an array, it might be followed
// by <repeats 15 times>, which we don't skip here // by <repeats 15 times>, which we don't skip here
if (strncmp(p, "<repeats ", 9) == 0) if (strncmp(p, "<repeats ", 9) == 0)
; ;
// sometimes, a reference is followed by an error message: // sometimes, a reference is followed by an error message:
// @0x100400f08: <error reading variable> // @0x100400f08: <error reading variable>
// in this case, we do not skip the text here, but leave it // in this case, we do not skip the text here, but leave it
 End of changes. 5 change blocks. 
7 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)