pisilinux-debuggergdb.patch 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. --- codeblocks-12.11release8629-orig/src/plugins/debuggergdb/gdb_driver.cpp 2012-11-23 20:58:15.000000000 +0200
  2. +++ codeblocks-12.11release8629/src/plugins/debuggergdb/gdb_driver.cpp 2013-01-23 00:16:51.780265717 +0200
  3. @@ -213,105 +213,6 @@
  4. m_pTarget = target;
  5. }
  6. -void GDB_driver::Prepare(bool isConsole, int printElements)
  7. -{
  8. - // default initialization
  9. -
  10. - // for the possibility that the program to be debugged is compiled under Cygwin
  11. - if (platform::windows)
  12. - DetectCygwinMount();
  13. -
  14. - // make sure we 're using the prompt that we know and trust ;)
  15. - QueueCommand(new DebuggerCmd(this, wxString(_T("set prompt ")) + FULL_GDB_PROMPT));
  16. -
  17. - // debugger version
  18. - QueueCommand(new DebuggerCmd(this, _T("show version")));
  19. - // no confirmation
  20. - QueueCommand(new DebuggerCmd(this, _T("set confirm off")));
  21. - // no wrapping lines
  22. - QueueCommand(new DebuggerCmd(this, _T("set width 0")));
  23. - // no pagination
  24. - QueueCommand(new DebuggerCmd(this, _T("set height 0")));
  25. - // allow pending breakpoints
  26. - QueueCommand(new DebuggerCmd(this, _T("set breakpoint pending on")));
  27. - // show pretty function names in disassembly
  28. - QueueCommand(new DebuggerCmd(this, _T("set print asm-demangle on")));
  29. - // unwind stack on signal
  30. - QueueCommand(new DebuggerCmd(this, _T("set unwindonsignal on")));
  31. - // disalbe result string truncations
  32. - QueueCommand(new DebuggerCmd(this, wxString::Format(wxT("set print elements %d"), printElements)));
  33. -
  34. - if (platform::windows && isConsole)
  35. - QueueCommand(new DebuggerCmd(this, _T("set new-console on")));
  36. -
  37. - flavour = m_pDBG->GetActiveConfigEx().GetDisassemblyFlavorCommand();
  38. - QueueCommand(new DebuggerCmd(this, flavour));
  39. -
  40. - if (m_pDBG->GetActiveConfigEx().GetFlag(DebuggerConfiguration::CatchExceptions))
  41. - {
  42. - m_catchThrowIndex = -1;
  43. - // catch exceptions
  44. - QueueCommand(new GdbCmd_SetCatch(this, wxT("throw"), &m_catchThrowIndex));
  45. - }
  46. -
  47. - // define all scripted types
  48. - m_Types.Clear();
  49. - InitializeScripting();
  50. -
  51. - // pass user init-commands
  52. - wxString init = m_pDBG->GetActiveConfigEx().GetInitCommands();
  53. - Manager::Get()->GetMacrosManager()->ReplaceMacros(init);
  54. - // commands are passed in one go, in case the user defines functions in there
  55. - // or else it would lock up...
  56. - QueueCommand(new DebuggerCmd(this, init));
  57. -// wxArrayString initCmds = GetArrayFromString(init, _T('\n'));
  58. -// for (unsigned int i = 0; i < initCmds.GetCount(); ++i)
  59. -// {
  60. -// QueueCommand(new DebuggerCmd(this, initCmds[i]));
  61. -// }
  62. -
  63. - // add search dirs
  64. - for (unsigned int i = 0; i < m_Dirs.GetCount(); ++i)
  65. - QueueCommand(new GdbCmd_AddSourceDir(this, m_Dirs[i]));
  66. -
  67. - // set arguments
  68. - if (!m_Args.IsEmpty())
  69. - QueueCommand(new DebuggerCmd(this, _T("set args ") + m_Args));
  70. -
  71. - RemoteDebugging* rd = GetRemoteDebuggingInfo();
  72. -
  73. - // send additional gdb commands before establishing remote connection
  74. - if (rd)
  75. - {
  76. - if (!rd->additionalCmdsBefore.IsEmpty())
  77. - {
  78. - wxArrayString initCmds = GetArrayFromString(rd->additionalCmdsBefore, _T('\n'));
  79. - for (unsigned int i = 0; i < initCmds.GetCount(); ++i)
  80. - QueueCommand(new DebuggerCmd(this, initCmds[i]));
  81. - }
  82. - }
  83. -
  84. - // if performing remote debugging, now is a good time to try and connect to the target :)
  85. - if (rd && rd->IsOk())
  86. - {
  87. - if (rd->connType == RemoteDebugging::Serial)
  88. - QueueCommand(new GdbCmd_RemoteBaud(this, rd->serialBaud));
  89. - QueueCommand(new GdbCmd_RemoteTarget(this, rd));
  90. - }
  91. -
  92. - // run per-target additional commands (remote debugging)
  93. - // moved after connection to remote target (if any)
  94. - if (rd)
  95. - {
  96. - if (!rd->additionalCmds.IsEmpty())
  97. - {
  98. - wxArrayString initCmds = GetArrayFromString(rd->additionalCmds, _T('\n'));
  99. - for (unsigned int i = 0; i < initCmds.GetCount(); ++i)
  100. - QueueCommand(new DebuggerCmd(this, initCmds[i]));
  101. - }
  102. - }
  103. -}
  104. -
  105. // remote debugging
  106. RemoteDebugging* GDB_driver::GetRemoteDebuggingInfo()
  107. {
  108. @@ -629,17 +530,6 @@
  109. QueueCommand(new DebuggerInfoCmd(this, _T("info signals"), _("Signals handling")));
  110. }
  111. -void GDB_driver::EnableCatchingThrow(bool enable)
  112. -{
  113. - if (enable)
  114. - QueueCommand(new GdbCmd_SetCatch(this, wxT("throw"), &m_catchThrowIndex));
  115. - else if (m_catchThrowIndex != -1)
  116. - {
  117. - QueueCommand(new DebuggerCmd(this, wxString::Format(wxT("delete %d"), m_catchThrowIndex)));
  118. - m_catchThrowIndex = -1;
  119. - }
  120. -}
  121. -
  122. void GDB_driver::SwitchThread(size_t threadIndex)
  123. {
  124. ResetCursor();