Patch #1814 2007-01-09 08:10

killerbot

GDB under Linux (on behalf on HillClimber)
Download
1814-GDB_under_Linu.patch (14.1 KB)
Category
Application::Bugfix
Status
Accepted
Close date
2007-01-10 12:59
Assigned to
 
Index: src/plugins/debuggergdb/debuggergdb.cpp
===================================================================
--- src/plugins/debuggergdb/debuggergdb.cpp    (revision 3466)
+++ src/plugins/debuggergdb/debuggergdb.cpp    (working copy)
@@ -336,7 +336,7 @@
 
 void DebuggerGDB::OnRelease(bool appShutDown)
 {
-    if (m_State.GetDriver())
+    if (m_State.HasDriver())
         m_State.GetDriver()->SetDebugWindows(0, 0, 0, 0, 0);
 
     if (m_pThreadsDlg)
@@ -722,7 +722,7 @@
 
 bool DebuggerGDB::IsStopped()
 {
-    return !m_State.GetDriver() || m_State.GetDriver()->IsStopped();
+    return !m_State.HasDriver() || m_State.GetDriver()->IsStopped();
 }
 
 int DebuggerGDB::Debug()
@@ -952,14 +952,14 @@
 
     // Don't issue 'run' if attaching to a process (Bug #1391904)
     if (m_PidToAttach == 0)
-        m_State.GetDriver()->Start(false);
+        m_State.GetDriver()->Start(m_BreakOnEntry);
 
     return 0;
-}
+} // Debug
 
 void DebuggerGDB::AddSourceDir(const wxString& dir)
 {
-    if (!m_State.GetDriver() || dir.IsEmpty())
+    if (!m_State.HasDriver() || dir.IsEmpty())
         return;
     wxString filename = dir;
     Manager::Get()->GetMacrosManager()->ReplaceEnvVars(filename); // apply env vars
@@ -1102,7 +1102,7 @@
     {
         case CMD_CONTINUE:
             ClearActiveMarkFromAllEditors();
-            if (m_State.GetDriver())
+            if (m_State.HasDriver())
             {
                 Manager::Get()->GetMessageManager()->Log(m_PageIndex, _("Continuing..."));
                 m_State.GetDriver()->Continue();
@@ -1112,7 +1112,7 @@
 
         case CMD_STEP:
             ClearActiveMarkFromAllEditors();
-            if (m_State.GetDriver())
+            if (m_State.HasDriver())
                 m_State.GetDriver()->Step();
 //            QueueCommand(new DebuggerCmd(this, _T("next")));
             break;
@@ -1124,35 +1124,35 @@
                 // first time users should have some help from us ;)
                 Disassemble();
             }
-            if (m_State.GetDriver())
+            if (m_State.HasDriver())
                 m_State.GetDriver()->StepInstruction();
 //            QueueCommand(new DebuggerCmd(this, _T("nexti")));
             break;
 
         case CMD_STEPIN:
             ClearActiveMarkFromAllEditors();
-            if (m_State.GetDriver())
+            if (m_State.HasDriver())
                 m_State.GetDriver()->StepIn();
 //            QueueCommand(new DebuggerCmd(this, _T("step")));
             break;
 
         case CMD_STOP:
             ClearActiveMarkFromAllEditors();
-            if (m_State.GetDriver())
+            if (m_State.HasDriver())
                 m_State.GetDriver()->Stop();
 //            QueueCommand(new DebuggerCmd(this, _T("quit")));
             break;
 
         case CMD_BACKTRACE:
 //            Manager::Get()->GetMessageManager()->Log(m_PageIndex, "Running back-trace...");
-            if (m_State.GetDriver())
+            if (m_State.HasDriver())
                 m_State.GetDriver()->Backtrace();
             break;
 
         case CMD_DISASSEMBLE:
         {
 //            Manager::Get()->GetMessageManager()->Log(m_PageIndex, "Disassemblying...");
-            if (m_State.GetDriver())
+            if (m_State.HasDriver())
                 m_State.GetDriver()->Disassemble();
             break;
         }
@@ -1160,20 +1160,20 @@
         case CMD_REGISTERS:
         {
 //            Manager::Get()->GetMessageManager()->Log(m_PageIndex, "Displaying registers...");
-            if (m_State.GetDriver())
+            if (m_State.HasDriver())
                 m_State.GetDriver()->CPURegisters();
             break;
         }
 
         case CMD_MEMORYDUMP:
         {
-            if (m_State.GetDriver())
+            if (m_State.HasDriver())
                 m_State.GetDriver()->MemoryDump();
         }
 
         case CMD_RUNNINGTHREADS:
         {
-            if (m_State.GetDriver())
+            if (m_State.HasDriver())
                 m_State.GetDriver()->RunningThreads();
         }
 
@@ -1467,7 +1467,7 @@
 
 void DebuggerGDB::ParseOutput(const wxString& output)
 {
-    if (m_State.GetDriver())
+    if (m_State.HasDriver())
     {
         m_State.GetDriver()->ParseOutput(output);
     }
@@ -1796,7 +1796,7 @@
 
 void DebuggerGDB::OnInfoFrame(wxCommandEvent& event)
 {
-    if (m_State.GetDriver())
+    if (m_State.HasDriver())
     {
         m_State.GetDriver()->InfoFrame();
     }
@@ -1804,7 +1804,7 @@
 
 void DebuggerGDB::OnInfoDLL(wxCommandEvent& event)
 {
-    if (m_State.GetDriver())
+    if (m_State.HasDriver())
     {
         m_State.GetDriver()->InfoDLL();
     }
@@ -1812,7 +1812,7 @@
 
 void DebuggerGDB::OnInfoFiles(wxCommandEvent& event)
 {
-    if (m_State.GetDriver())
+    if (m_State.HasDriver())
     {
         m_State.GetDriver()->InfoFiles();
     }
@@ -1820,7 +1820,7 @@
 
 void DebuggerGDB::OnInfoFPU(wxCommandEvent& event)
 {
-    if (m_State.GetDriver())
+    if (m_State.HasDriver())
     {
         m_State
download for full patch...
mortenmacfly 2007-01-09 12:03