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

Omitting a OpenOCD config file is not allowed (but should be)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: Qt Creator 4.4.0-rc1
    • Fix Version/s: Qt Creator 4.4.0
    • Component/s: Debugger
    • Labels:
      None
    • Commits:
      494769bad6d037f0c25bd3db1e79848256afd3e7

      Description

      If I try to omit the config file in the configuration of OpenOCD as a GDB-Server for a bare metal device I can not select this OpenOCD configuration as a GDB provider for a device. The solution to this would simply be to avoid checking for an empty config file in the isValid() function (see diff below). I've compiled QT-Creator with this simple patch and it works as expected now. It should be save to omit the check for an empty file because there already is a check in OpenOcdGdbServerProvider::arguments() (which also correctly omits a "-f" as an argument).

       

      I have found a few more issues with the configuration of the bare metal plugin that are somewhat related to this one but will report them separately. By the way I'm really loving QT-Creator for bare metal development. It's awesome!

       Edit:
      Since the autoformatting of this board completely screws up the (really small) diff I have also attached it. I've furthermore attached to screenshots to make clear what I mean. openocd_new_config.png shows a configuration that should also be allowed and which I also tested with the patch. Right now it only works the way shown in openocd_old_config.png, although one can omit the scripts path.

      diff --git a/src/plugins/baremetal/openocdgdbserverprovider.cpp b/src/plugins/baremetal/openocdgdbserverprovider.cpp
      index 91b869f..cca6d99 100644
      --- a/src/plugins/baremetal/openocdgdbserverprovider.cpp
      +++ b/src/plugins/baremetal/openocdgdbserverprovider.cpp
      @@ -164,7 +164,7 @@ bool OpenOcdGdbServerProvider::isValid() const
       }
       
       if (m == StartupOnNetwork || m == StartupOnPipe) \{
      - if (m_executableFile.isEmpty() || m_configurationFile.isEmpty())
      + if (m_executableFile.isEmpty())
       return false;
       }

        Attachments

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

          Activity

            People

            Assignee:
            hjk hjk
            Reporter:
            rizztopher Christopher Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes