Am 04.11.2012 00:04, schrieb Philip Ashmore:
> Please find attached kdbg.txt that I obtained when I ran
> 
>    kdbg -t kdbg.txt build/sb/sb-designer/.libs/sb-designer

Thanks!

One problem is that KDbg does not understand the response "Note:
breakpoints 4 and 5 also set at pc 0x41f0ce." This ultimately leads to
the accumulation of many breakpoints each time the session is started.

> This one's even more bizarre - I get to main but can't step into a
> function several levels down.

The transcript does not show evidence that you even attempted to "step
into" some functions. With the above deficiency in mind, the transcript
and the screenshot look totally normal.

> I don't know if this is a factor, but I renamed one of the files that
> had breakpoints set for it
> - No source file named project-file-treemodel.cpp.

By itself, this does not cause the problem, but it adds to the symptoms,
I think.

The attached patch should cure the above-mentioned problem about
"Note:...". Can you please test it? Do other problems mentioned in this
bug report still occur?

diff --git a/kdbg/gdbdriver.cpp b/kdbg/gdbdriver.cpp
index 73b87f8..2c8c242 100644
--- a/kdbg/gdbdriver.cpp
+++ b/kdbg/gdbdriver.cpp
@@ -2036,25 +2036,26 @@ static bool parseNewWatchpoint(const char* o, int& id,
 bool GdbDriver::parseBreakpoint(const char* output, int& id,
 				QString& file, int& lineNo, QString& address)
 {
-    const char* o = output;
     // skip lines of that begin with "(Cannot find"
-    while (strncmp(o, "(Cannot find", 12) == 0) {
-	o = strchr(o, '\n');
-	if (o == 0)
+    while (strncmp(output, "(Cannot find", 12) == 0 ||
+	   strncmp(output, "Note: breakpoint", 16) == 0)
+    {
+	output = strchr(output, '\n');
+	if (output == 0)
 	    return false;
-	o++;				/* skip newline */
+	output++;			/* skip newline */
     }
 
-    if (strncmp(o, "Breakpoint ", 11) == 0) {
+    if (strncmp(output, "Breakpoint ", 11) == 0) {
 	output += 11;			/* skip "Breakpoint " */
 	return ::parseNewBreakpoint(output, id, file, lineNo, address);
-    } else if (strncmp(o, "Temporary breakpoint ", 21) == 0) {
+    } else if (strncmp(output, "Temporary breakpoint ", 21) == 0) {
 	output += 21;
 	return ::parseNewBreakpoint(output, id, file, lineNo, address);
-    } else if (strncmp(o, "Hardware watchpoint ", 20) == 0) {
+    } else if (strncmp(output, "Hardware watchpoint ", 20) == 0) {
 	output += 20;
 	return ::parseNewWatchpoint(output, id, address);
-    } else if (strncmp(o, "Watchpoint ", 11) == 0) {
+    } else if (strncmp(output, "Watchpoint ", 11) == 0) {
 	output += 11;
 	return ::parseNewWatchpoint(output, id, address);
     }

Reply via email to