Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-20789

All breakpoints which are set before debug session on Android device is launched require some delay at GdbEngine startup. Otherwise they are ignored.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • Qt Creator 4.8.0-beta1
    • Debugger
    • Android

    Description

      When I set up any breakpoint and then launch debug session, in most cases the function GdbEngine::handleResponse(const QString &buff) does not receive gdb response message "breakpoint-modified" and the breakpoint is ignored. But if the GdbEngine source code is modified in the following way:

      void GdbEngine::setupInferior()
      {
          CHECK_STATE(EngineSetupRequested);

          const DebuggerRunParameters &rp = runParameters();

          //runCommand("set follow-exec-mode new");
          if (rp.breakOnMain)
              runCommand({"tbreak " + mainFunction()});

          // Initial attempt to set breakpoints.
          if (rp.startMode != AttachCore) {
              showStatusMessage(tr("Setting breakpoints..."));
              showMessage(tr("Setting breakpoints..."));

      ///////////////////added by mine////////
              QThread::msleep(2000);

      //////////////////////////////////////////////////
              attemptBreakpointSynchronization();
          }

      .....................so forth with GdbEngine::setupInferior()

       

      Then the response message "breakpoint-modified" is received, and breakpoints are successfully activated. The longer delay, the success probability is higher.

      I do not understand the internal reason of the phenomenon and I suppose, that the problem should be fixed in some other way.

      Grateful in advance. 

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hjk hjk
            sergeylogunov sergeylogunov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes