Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
break "filename:line" will not work in the futher gdb
ollydbg:
--- Quote from: oBFusCATed on March 26, 2012, 06:34:21 am ---If it is not an official release, you're on your own, sorry. No time to support random gdb-testing-versions.
--- End quote ---
Ok, never mind.
I will follow the discussions in gdb maillist, and response if the break command has changed.
Thanks.
PS: I'm looking forward to test/try your gdb mi plugin when they are ready. :)
oBFusCATed:
You can get it for here: svn://cmpt.benbmp.org/cb_gdb_mi
It should be relatively usable.
thomas:
Does "filename":line not make a lot more sense anyway, even now? That's assuming the current version supports that, of course.
If the present version supports this variant, I don't see why we should not use it. A line number should not contain anything that needs quoting, only a filename might. Insofar, only quoting the filename is a kind of sensible approach.
ollydbg:
--- Quote from: thomas on March 26, 2012, 12:06:23 pm ---Does "filename":line not make a lot more sense anyway, even now? That's assuming the current version supports that, of course.
If the present version supports this variant, I don't see why we should not use it. A line number should not contain anything that needs quoting, only a filename might. Insofar, only quoting the filename is a kind of sensible approach.
--- End quote ---
The gdb developer Keith strongly suggest that the line number should not be quoted.
This feature "filename":line does not exist in the current gdb CVS or 7.4 branch, but I guess they still need some test. (Currently, the new line specification has already pass all the gdb build-in tests)
Change our debugger branch code is quite simple. For the
--- Code: ---break filename:line
--- End code ---
Here is the patch:
--- Code: ---Index: E:/code/cb/cb_debugger_branch/src/plugins/debuggergdb/gdb_commands.h
===================================================================
--- E:/code/cb/cb_debugger_branch/src/plugins/debuggergdb/gdb_commands.h (revision 7909)
+++ E:/code/cb/cb_debugger_branch/src/plugins/debuggergdb/gdb_commands.h (working copy)
@@ -131,7 +131,7 @@
// Breakpoint 1 at 0x4013d6: file main.cpp, line 8.
static wxRegEx reBreakpoint(_T("Breakpoint ([0-9]+) at (0x[0-9A-Fa-f]+)"));
// 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\\."));
+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
@@ -448,7 +448,7 @@
m_Cmd << _T("break ");
else
m_Cmd << _T("tbreak ");
- m_Cmd << _T('"') << out << _T(":") << wxString::Format(_T("%d"), m_BP->line) << _T('"');
+ m_Cmd << out << _T(":") << wxString::Format(_T("%d"), m_BP->line);
}
else if (m_BP->type == DebuggerBreakpoint::bptData)
{
--- End code ---
This patch works under both the official gdb or the gdb-line-spec-branch.
For
--- Code: ---break "filename":line
--- End code ---
It should also be quite easy to implement. :)
To my point: I think mostly quote is not needed. (I exclude the case that file name does not contain spaces :), I'm not sure gdb support this)
oBFusCATed:
The quote was added because some people have their projects inside paths containing "code::blocks" and this is regarded as method/function specification.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version