User forums > Using Code::Blocks

Problem with debugger

<< < (5/9) > >>

kramed:

--- Code: ---TT         PID COMMAND
tty1      1514 -bash
tty1      1540 /bin/sh /usr/X11R6/bin/startx
tty1      1556 /usr/X11R6/bin/xinit /usr/X11R6/lib/X11/xinit/xinitrc -
tty1      1567 /bin/sh /usr/X11R6/lib/X11/xinit/xinitrc
tty1      1569 /bin/sh /opt/kde/bin/startkde
?         1597 kdeinit Running...
?         1600 dcopserver [kdeinit] --nosid
?         1604 klauncher [kdeinit] --new-startup
?         1606 kded [kdeinit] --new-startup
tty1      1619 kwrapper ksmserver
?         1621 ksmserver [kdeinit]
?         1623 kwin [kdeinit] -session 108f363330000117208531500000062
?         1627 kdesktop [kdeinit]
?         1630 kicker [kdeinit]
?         1638 kaccess [kdeinit]
?         1642 superkaramba -session 108f36333000011728590840000002728
?         1644 superkaramba -session 108f36333000011729000010000003690
?         1645 superkaramba -session 108f36333000011729000030000003690
?         1694 konqueror [kdeinit] -session 108f3633300001173327676000
?         7962 kio_file [kdeinit] file /tmp/ksocket-mark/klauncherMOSO
?         8506 konsole [kdeinit] --ls
pts/1     8507 -bash
pts/1     8609 ps x -o tty,pid,command
?        12097 kio_uiserver [kdeinit]
?        15990 xchat
?        20325 /bin/sh /usr/local/apps/firefox/firefox
?        20328 /bin/sh /usr/local/apps/firefox/run-mozilla.sh /usr/loc
?        20333 /usr/local/apps/firefox/firefox-bin
?        25985 konqueror [kdeinit] --silent
?        27119 kio_file [kdeinit] file /tmp/ksocket-mark/klauncherMOSO
?        27347 gaim

--- End code ---

Pecan:
Are you sure the line:

 cmd << 80000 + ::wxGetProcessId(); //make a unique sleep command

is in your patched code


--- Code: ---// ----------------------------------------------------------------------------
int DebuggerGDB::RunNixConsole()
// ----------------------------------------------------------------------------
{
    // start the xterm and put the shell to sleep with -e sleep 80000
    // fetch the xterm tty so we can issue to gdb a "tty /dev/pts/#"
    // redirecting program stdin/stdout/stderr to the xterm console.

  #ifndef __WXMSW__
    wxString cmd;
    wxString title = wxT("Program Console");
    m_nConsolePid = 0;
    // for non-win platforms, use m_ConsoleTerm to run the console app
    wxString term = Manager::Get()->GetConfigManager(_T("app"))->Read(_T("/console_terminal"), DEFAULT_CONSOLE_TERM);
    //term.Replace(_T("$TITLE"), _T("'") + _T("*nixConsole") + _T("'"));
    term.Replace(_T("$TITLE"), _T("'") + title + _T("'"));
    cmd << term << _T(" ");
    cmd << wxT("sleep ");
    cmd << 80000 + ::wxGetProcessId(); //make a unique sleep command

    Manager::Get()->GetMacrosManager()->ReplaceEnvVars(cmd);
    //Manager::Get()->GetMessageManager()->Log(m_PageIndex, _("Executing: %s"), cmd.c_str() );
    DebugLog(wxString::Format( _("Executing: %s"), cmd.c_str()) );



--- End code ---

kramed:
It is in there. I verified the patch and debuggergdb.cpp and debuggergdb.h

Pecan:
Something is wrong with that line. All you're getting in your log is:

"Executing: xterm -T 'Program Console' -e sleep"

It should be like this one:

"Executing: xterm -T 'Program Console' -e sleep 81234"

if the 80000+pidNumber isn't there, the console flashes as you described because no sleep seconds are specified.

Please zip up debuggerGDB.cpp and debuggerGDB.h and attach them to a message here.



kramed:
Hope you find something I dont...

Thanks for all your help.

[attachment deleted by admin]

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version