summaryrefslogtreecommitdiff
blob: 3f056edc4e5d3547ebf1e6e262b52e018bdd17b9 (plain)
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.2.0/kdbg/gdbdriver.cpp kdbg-2.2.0.new/kdbg/gdbdriver.cpp
--- kdbg-2.2.0/kdbg/gdbdriver.cpp	2009-05-20 15:24:10.000000000 -0400
+++ kdbg-2.2.0.new/kdbg/gdbdriver.cpp	2009-10-04 01:18:28.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
@@ -1856,8 +1856,10 @@ std::list<ThreadInfo> GdbDriver::parseTh
 	    p++;
 	    // there follows only whitespace
 	}
-	char* end;
-	thr.id = strtol(p, &end, 10);
+	const char* end;
+	char *temp_end = NULL; /* we need a non-const 'end' for strtol to use...*/
+	thr.id = strtol(p, &temp_end, 10);
+	end = temp_end;
 	if (p == end) {
 	    // syntax error: no number found; bail out
 	    return threads;
diff -rupN kdbg-2.2.0/kdbg/xsldbgdriver.cpp kdbg-2.2.0.new/kdbg/xsldbgdriver.cpp
--- kdbg-2.2.0/kdbg/xsldbgdriver.cpp	2009-05-20 15:24:10.000000000 -0400
+++ kdbg-2.2.0.new/kdbg/xsldbgdriver.cpp	2009-10-04 01:18:56.000000000 -0400
@@ -115,7 +115,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
@@ -771,7 +771,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) {