1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
diff -rupN kdbg-2.1.1.old/kdbg/gdbdriver.cpp kdbg-2.1.1.new/kdbg/gdbdriver.cpp
--- kdbg-2.1.1.old/kdbg/gdbdriver.cpp 2008-11-17 17:17:55.000000000 -0500
+++ kdbg-2.1.1.new/kdbg/gdbdriver.cpp 2009-08-01 22:08:53.000000000 -0400
@@ -133,7 +133,7 @@ GdbDriver::GdbDriver() :
#ifndef NDEBUG
// check command info array
- char* perc;
+ const char* perc;
for (int i = 0; i < NUM_CMDS; i++) {
// must be indexable by DbgCommand values, i.e. sorted by DbgCommand values
assert(i == cmds[i].cmd);
@@ -669,7 +669,7 @@ static bool parseErrorMessage(const char
// skip warnings
while (strncmp(output, "warning:", 8) == 0)
{
- char* end = strchr(output+8, '\n');
+ const char* end = strchr(output+8, '\n');
if (end == 0)
output += strlen(output);
else
@@ -1880,8 +1880,10 @@ bool GdbDriver::parseThreadList(const ch
p++;
// there follows only whitespace
}
- char* end;
- id = strtol(p, &end, 10);
+ const char* end;
+ char *end_p; /* we need a non-const version to pass to strtol */
+ id = strtol(p, &end_p, 10);
+ end = end_p;
if (p == end) {
// syntax error: no number found; bail out
return true;
diff -rupN kdbg-2.1.1.old/kdbg/xsldbgdriver.cpp kdbg-2.1.1.new/kdbg/xsldbgdriver.cpp
--- kdbg-2.1.1.old/kdbg/xsldbgdriver.cpp 2008-12-18 16:01:58.000000000 -0500
+++ kdbg-2.1.1.new/kdbg/xsldbgdriver.cpp 2009-08-01 22:09:19.000000000 -0400
@@ -114,7 +114,7 @@ DebuggerDriver(), m_gdbMajor(2), m_gdbMi
#ifndef NDEBUG
// check command info array
- char *perc;
+ const char *perc;
for (int i = 0; i < NUM_CMDS; i++) {
// must be indexable by DbgCommand values, i.e. sorted by DbgCommand values
@@ -768,7 +768,7 @@ parseVar(const char *&s)
} else if (strncmp(p, "= ", 2) == 0) {
/* we're processing the result of a "print command" */
/* find next line */
- char *nextLine = strchr(p, '\n');
+ const char *nextLine = strchr(p, '\n');
TRACE("Found print expr");
if (nextLine) {
|