Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
DebuggerGDB bugfix
EricBurnett:
I do not know whether it is strictly win32 or linux as well, but the interface with the GDB debugger has problems.
Specifically: the cd command in gdb does not accept quotes, but will accept paths that include spaces
To verify: open command (file->run), then type gdb. in the gdb command line, type cd "C:/Windows", and see the error message it results in. You can also verify paths with spaces this way.
To fix:
in debuggergdb.h, add this line under protected:
--- Code: ---void StripQuotes(wxString& str);
--- End code ---
in debuggergdb.cpp, add above the cd command (line 501)
--- Code: ---StripQuotes(path); //GDB doesn't accept quotes in cd commands...spaces work fine
msgMan->Log(m_PageIndex, _("Changing directory to: %s"), path.c_str());
--- End code ---
and later, add the function implimentation:
--- Code: ---void DebuggerGDB::StripQuotes(wxString& str)
{
if (str.GetChar(0) == '\"') str = str.Mid(1, str.Length() - 2);
}
--- End code ---
I am fairly sure that the "directory" command is not working properly, but it is not giving output that can easily be checked. Through command line testing, it looks like paths will need to be converted to dos style (Docume~1 stuff), and then quotes removed. I can write this up, but would like some confirmation it is necessary, and to know how it acts on linux.
Hope this helps,
--Eric Burnett
rickg22:
Please submit this as a bug report on sourceforge.
Thank you.
EricBurnett:
Oops, didn't realize this would be better there. I'm just going to see if I can verify some of the info, then post a patch.
rickg22:
Thanks. Oh btw your implementation is flawed. What if the quotes appear only at the beginning? ;-)
EricBurnett:
Good point. I need to learn to cover everything. Getting patches to pass your scrutiny will be good practise, I guess :roll:.
Oh, and I tested on linux, and it looks like the path and directory issues are the same. As far as I know, 'directory' is doing nothing right now (on any OS), and so needs work. Still need to figure out how to get past the issues of spaces in the path (for instance '\ ' is still parsed as a space. Need to test '\032' and such later).
But rest assured, the patch is coming!
Navigation
[0] Message Index
[#] Next page
Go to full version