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

Code::Blocks debugger plugin and Cygwin

<< < (2/4) > >>

MortenMacFly:

--- Quote from: cellulose on August 14, 2011, 10:23:34 pm ---As per the fix mentioned you can probably just assume "/cygdrive" for that registry value.  I don't think very many people change that.

--- End quote ---
Well, I changed it. ;-)

gamert:
when will this be fixed? I'm crazed by cygwin dbg... So I can only debug as this (http://forums.codeblocks.org/index.php/topic,15285.new.html#new)
Thank u.

oBFusCATed:
No cygwin env and I have no plans to install one.
So patches welcome if you're interested in this feature.
Keep in mind that the patch should be against the wxpropgrid_debugger branch (aka debugger_branch)!

bugshunter69:
Hello all,
I have a fix for "unable to make breapoints usable in CYGWIN",  ;) just modify this method in GDB_driver class :
void GDB_driver::AddBreakpoint(DebuggerBreakpoint* bp)
{
   wxString SaveFileName(bp->filename);
    if(platform::windows && m_CygwinPresent==true)
    {
        wxString FileName(bp->filename);

        if (FileName.GetChar(1) == _T(':'))
        {
            wxString m_CygdrivePrefixNormalized;
            if (m_CygdrivePrefix.EndsWith(_T("/"))) // for the case   "/cygdrive/"
              m_CygdrivePrefixNormalized = m_CygdrivePrefix;
            else                                    // for cases e.g. "/cygdrive"
              m_CygdrivePrefixNormalized = m_CygdrivePrefix + _T("/");
            // replace drive letter with cygwin prefix and adding the drive label back
            if (FileName.GetChar(2) == _T('/'))
                FileName.Replace(FileName.Left(1) + _T(":") + _T("/"), m_CygdrivePrefixNormalized + FileName.Left(1).Lower() + _T("/"), false);
            else
                FileName.Replace(FileName.Left(1) + _T(":"), m_CygdrivePrefixNormalized + FileName.Left(1).Lower() + _T("/"), false);

        }
        bp->filename = FileName;
    }
    if (bp->type == DebuggerBreakpoint::bptData) {
        QueueCommand(new GdbCmd_AddDataBreakpoint(this, bp));
    }
    //Workaround for GDB to break on C++ constructor/destructor
    else
    {
        if (bp->func.IsEmpty() && !bp->lineText.IsEmpty())
        {
            wxRegEx reCtorDtor(_T("([0-9A-z_]+)::([~]?)([0-9A-z_]+)[ \t\(]*"));
            if (reCtorDtor.Matches(bp->lineText))
            {
                wxString strBase = reCtorDtor.GetMatch(bp->lineText, 1);
                wxString strDtor = reCtorDtor.GetMatch(bp->lineText, 2);
                wxString strMethod = reCtorDtor.GetMatch(bp->lineText, 3);
                if (strBase.IsSameAs(strMethod))
                {
                    bp->func = strBase;
                    bp->func << _T("::");
                    bp->func << strDtor;
                    bp->func << strMethod;
    //                if (bp->temporary)
    //                    bp->temporary = false;
                    NotifyCursorChanged(); // to force breakpoints window update
                }
            }
        }
        //end GDB workaround

        QueueCommand(new GdbCmd_AddBreakpoint(this, bp));
    }
   bp->filename = SaveFileName;
}

oBFusCATed:
Your post is totally unreadable.
Please use svn diff to generate a patch file and make sure you've used the debugger branch otherwise you're just wasting your time...

See this http://wiki.codeblocks.org/index.php?title=Creating_a_patch_to_submit_to_BerliOS_%28Patch_Tracker%29 for details how to make a patch file.

And please use code tags

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version