Lines 133-139
GdbDriver::GdbDriver() :
Link Here
|
133 |
|
133 |
|
134 |
#ifndef NDEBUG |
134 |
#ifndef NDEBUG |
135 |
// check command info array |
135 |
// check command info array |
136 |
char* perc; |
136 |
const char* perc; |
137 |
for (int i = 0; i < NUM_CMDS; i++) { |
137 |
for (int i = 0; i < NUM_CMDS; i++) { |
138 |
// must be indexable by DbgCommand values, i.e. sorted by DbgCommand values |
138 |
// must be indexable by DbgCommand values, i.e. sorted by DbgCommand values |
139 |
assert(i == cmds[i].cmd); |
139 |
assert(i == cmds[i].cmd); |
Lines 669-675
static bool parseErrorMessage(const char
Link Here
|
669 |
// skip warnings |
669 |
// skip warnings |
670 |
while (strncmp(output, "warning:", 8) == 0) |
670 |
while (strncmp(output, "warning:", 8) == 0) |
671 |
{ |
671 |
{ |
672 |
char* end = strchr(output+8, '\n'); |
672 |
const char* end = strchr(output+8, '\n'); |
673 |
if (end == 0) |
673 |
if (end == 0) |
674 |
output += strlen(output); |
674 |
output += strlen(output); |
675 |
else |
675 |
else |
Lines 1880-1887
bool GdbDriver::parseThreadList(const ch
Link Here
|
1880 |
p++; |
1880 |
p++; |
1881 |
// there follows only whitespace |
1881 |
// there follows only whitespace |
1882 |
} |
1882 |
} |
1883 |
char* end; |
1883 |
const char* end; |
1884 |
id = strtol(p, &end, 10); |
1884 |
char *end_p; /* we need a non-const version to pass to strtol */ |
|
|
1885 |
id = strtol(p, &end_p, 10); |
1886 |
end = end_p; |
1885 |
if (p == end) { |
1887 |
if (p == end) { |
1886 |
// syntax error: no number found; bail out |
1888 |
// syntax error: no number found; bail out |
1887 |
return true; |
1889 |
return true; |