Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

break "filename:line" will not work in the futher gdb

<< < (6/6)

ollydbg:

--- Quote from: oBFusCATed on April 08, 2012, 11:22:35 am ---I'm not really sure about the number of \ in this. This is a copy paste from the second line in the regex testbed plugin.
The thing I want in there is (\"?), so it is clear that the " is optional.

--- End quote ---

I did further test, and I can confirm that

--- Code: ---\\\"
--- End code ---
can be replaced by
--- Code: ---\"
--- End code ---
, everything works OK.
This is because
--- Code: ---"
--- End code ---
is not a special character in regular expression.

I will commit the patch below if there is no objections in a few days.

--- Code: ---Index: E:/code/cb/cb_trunk/src/plugins/debuggergdb/gdb_commands.h
===================================================================
--- E:/code/cb/cb_trunk/src/plugins/debuggergdb/gdb_commands.h (revision 7925)
+++ E:/code/cb/cb_trunk/src/plugins/debuggergdb/gdb_commands.h (working copy)
@@ -130,8 +130,11 @@
 static wxRegEx reBT4(_T("#([0-9]+)[ \\t]+(.+)[ \\t]in[ \\t](.+)")); // case #11
 // Breakpoint 1 at 0x4013d6: file main.cpp, line 8.
 static wxRegEx reBreakpoint(_T("Breakpoint ([0-9]+) at (0x[0-9A-Fa-f]+)"));
+// GDB7.4 and before will return:
 // Breakpoint 1 ("/home/jens/codeblocks-build/codeblocks-1.0svn/src/plugins/debuggergdb/gdb_commands.h:125) pending.
-static wxRegEx rePendingBreakpoint(_T("Breakpoint ([0-9]+)[ \t]\\(\\\"(.+):([0-9]+)\\)[ \t]pending\\."));
+// GDB7.5 and later will return:
+// Breakpoint 4 ("E:/code/cb/test_code/DebugDLLTest/TestDLL/dllmain.cpp:29") pending.
+static wxRegEx rePendingBreakpoint(_T("Breakpoint ([0-9]+)[ \t]\\(\"(.+):([0-9]+)(\"?)\\)[ \t]pending\\."));
 // Hardware assisted breakpoint 1 at 0x4013d6: file main.cpp, line 8.
 static wxRegEx reHWBreakpoint(_T("Hardware assisted breakpoint ([0-9]+) at (0x[0-9A-Fa-f]+)"));
 // Hardware watchpoint 1: expr

--- End code ---

oBFusCATed:
Go on...

ollydbg:

--- Quote from: oBFusCATed on April 08, 2012, 02:14:55 pm ---Go on...

--- End quote ---
Done in rev7926.

Navigation

[0] Message Index

[*] Previous page

Go to full version