This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 1/2] Linespec rewrite (update 2)


Hi, Keith.
Thanks for the improvement.
I'm testing your line spec rewrite branch, it works great.

When I review the log in gdb CVS HEAD:
http://sourceware.org/ml/gdb-patches/2012-03/msg00819.html

[debug]> break "E:/code/cb/cb_trunk/src/plugins/codecompletion/parser/token.cpp:64"
[debug]No source file named E:/code/cb/cb_trunk/src/plugins/codecompletion/parser/token.cpp.
[debug]Breakpoint 2 ("E:/code/cb/cb_trunk/src/plugins/codecompletion/parser/token.cpp:64) pending.

See the third line, the response from GDB does not have quote balanced. I mean, the tail quote is lost.
So, to catch such string, we have currently use the regular expression in Code::blocks' source code:

static wxRegEx rePendingBreakpoint(_T("Breakpoint ([0-9]+)[ \t]\\(\\\"(.+):([0-9]+)\\)[ \t]pending\\."));

Now, I'm using your branch, and the result is:
[debug]> break "E:/code/cb/test_code/DebugDLLTest/TestDLL/dllmain.cpp:29"
[debug]No source file named E:/code/cb/test_code/DebugDLLTest/TestDLL/dllmain.cpp.
[debug]Breakpoint 4 ("E:/code/cb/test_code/DebugDLLTest/TestDLL/dllmain.cpp:29") pending.

You can see, the third line, it does have a tail quote.
I believe adding the tail quote is the right direction. Also, I can easily adjust the regex to:

static wxRegEx rePendingBreakpoint(_T("Breakpoint ([0-9]+)[ \t]\\(\\\"(.+):([0-9]+)\\\"\\)[ \t]pending\\."));

Yuanhui Zhang
Code::blocks developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]