News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Crash in debugger plugin

Started by 280Z28, January 09, 2006, 05:18:07 PM

Previous topic - Next topic

280Z28

It seems it doesn't turn off it's message logging when the message manager closes, so it crashed in DebuggerGDB::Log(). It's hard for me to reproduce this bug (I'm guessing it's been there for a long time, but this is the first time I've seen it). This seems to be a solution, but maybe what really needs to be done is have the debugger stop making logging calls after the manager closes? Y'all would know better than me on this.


void DebuggerGDB::Log(const wxString& msg)
{
    Manager* manager = Manager::Get();
    if (!manager)
        return;
    MessageManager* msgmanager = manager->GetMessageManager();
    if (!msgmanager)
        return;
    msgmanager->Log(m_PageIndex, msg);
}

void DebuggerGDB::DebugLog(const wxString& msg)
{
    // gdb debug messages
    if (m_HasDebugLog)
    {
        Manager* manager = Manager::Get();
        if (!manager)
            return;
        MessageManager* msgmanager = manager->GetMessageManager();
        if (!msgmanager)
            return;
        msgmanager->Log(m_DbgPageIndex, msg);
    }
}
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
Check out The Sam Zone :cool:

mandrav

Quote from: 280Z28Y'all would know better than me on this.

Hehe, I just might :)

void DebuggerGDB::Log(const wxString& msg)
{
    if (m_IsAttached)
        Manager::Get()->GetMessageManager()->Log(m_PageIndex, msg);
}

void DebuggerGDB::DebugLog(const wxString& msg)
{
    // gdb debug messages
    if (m_IsAttached && m_HasDebugLog)
        Manager::Get()->GetMessageManager()->Log(m_DbgPageIndex, msg);
}


Revision 1695.
Be patient!
This bug will be fixed soon...