Files
qt-creator/src/plugins/baremetal/baremetaldebugsupport.cpp

203 lines
6.4 KiB
C++
Raw Normal View History

BareMetal: Allow to manage configurations of HW GDB servers The user has only one possibility to setup of the remote GDB server when a new device is created (or to modify it for existing device). It is possible only in the host/port fields for connection to the GDB server. It is a little inconvenient for the user. If the user wants to use other configuration of the GDB server, then need every time to edit the current configuration. Improving this it is introduction a new concept with a new entity named as "GDB server provider". Now to the device debugging purpose the user can choose any of the GDB provider from the list (by analogy with toolchain and so on). Each configuration of GDB provider is created by the user manually on the new "GDB Server Provider" options page. This can be made before or after creation of device. A GDB server provider can work in three startup modes (depends on implementation of concrete provider): 1) NoStartup mode. This means that we do not want to startup a provider, we just trying to connect to the already started GDB provider server. This mode uses the TCP/IP connection with manually specifying of remote host and port. 2) StartupOnNetwork mode. This means that we want to launch of the GDB provider automatically before connect to it in process of remote debugging. This mode also uses the TCP/IP protocol. In addition to it, a GDB provider can has additional options which are contains a paths to provider executable file, to configuration files and so on (it is depends on concrete provider implementation). This mode (with NoStartup) covers about 90% of usecase, and is supported by most set of the GDB server providers. 3) StartupOnPipe mode. This is similar to StartupOnNetwork mode and we also automatically starts the GDB server provider before debugging. But in this case is used the Pipe mode instead of TCP/IP. Not each of the GDB provider can support debugging via pipes. This patch has concrete implementations for a following set of the GDB server providers: * "Default" provider which supports only the NoStartup mode. * "Open On-Chip Debugger" (http://openocd.sourceforge.net/) provider which supports all modes. * "STLinkUtil" (https://github.com/texane/stlink) provider which supports NoStartup and StartupOnNetwork modes. Tested on Windows and Linux with: * target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2 * provider: OpenOCD v0.8.0 (tested on Windows and Linux) * provider: STLink-Util (tested on Linux only) * toolchain: ARM GCC v4.9.2 * debugger: GDB v7.8.1 (with Python support) * QtCreator with QBS project Task-number: QTCREATORBUG-13686 Change-Id: I59c775d91b0a4227d931188879850c536290e1ba Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
2014-12-20 19:10:02 +00:00
/****************************************************************************
**
** Copyright (C) 2016 Denis Shienkov <denis.shienkov@gmail.com>
** Contact: https://www.qt.io/licensing/
BareMetal: Allow to manage configurations of HW GDB servers The user has only one possibility to setup of the remote GDB server when a new device is created (or to modify it for existing device). It is possible only in the host/port fields for connection to the GDB server. It is a little inconvenient for the user. If the user wants to use other configuration of the GDB server, then need every time to edit the current configuration. Improving this it is introduction a new concept with a new entity named as "GDB server provider". Now to the device debugging purpose the user can choose any of the GDB provider from the list (by analogy with toolchain and so on). Each configuration of GDB provider is created by the user manually on the new "GDB Server Provider" options page. This can be made before or after creation of device. A GDB server provider can work in three startup modes (depends on implementation of concrete provider): 1) NoStartup mode. This means that we do not want to startup a provider, we just trying to connect to the already started GDB provider server. This mode uses the TCP/IP connection with manually specifying of remote host and port. 2) StartupOnNetwork mode. This means that we want to launch of the GDB provider automatically before connect to it in process of remote debugging. This mode also uses the TCP/IP protocol. In addition to it, a GDB provider can has additional options which are contains a paths to provider executable file, to configuration files and so on (it is depends on concrete provider implementation). This mode (with NoStartup) covers about 90% of usecase, and is supported by most set of the GDB server providers. 3) StartupOnPipe mode. This is similar to StartupOnNetwork mode and we also automatically starts the GDB server provider before debugging. But in this case is used the Pipe mode instead of TCP/IP. Not each of the GDB provider can support debugging via pipes. This patch has concrete implementations for a following set of the GDB server providers: * "Default" provider which supports only the NoStartup mode. * "Open On-Chip Debugger" (http://openocd.sourceforge.net/) provider which supports all modes. * "STLinkUtil" (https://github.com/texane/stlink) provider which supports NoStartup and StartupOnNetwork modes. Tested on Windows and Linux with: * target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2 * provider: OpenOCD v0.8.0 (tested on Windows and Linux) * provider: STLink-Util (tested on Linux only) * toolchain: ARM GCC v4.9.2 * debugger: GDB v7.8.1 (with Python support) * QtCreator with QBS project Task-number: QTCREATORBUG-13686 Change-Id: I59c775d91b0a4227d931188879850c536290e1ba Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
2014-12-20 19:10:02 +00:00
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
BareMetal: Allow to manage configurations of HW GDB servers The user has only one possibility to setup of the remote GDB server when a new device is created (or to modify it for existing device). It is possible only in the host/port fields for connection to the GDB server. It is a little inconvenient for the user. If the user wants to use other configuration of the GDB server, then need every time to edit the current configuration. Improving this it is introduction a new concept with a new entity named as "GDB server provider". Now to the device debugging purpose the user can choose any of the GDB provider from the list (by analogy with toolchain and so on). Each configuration of GDB provider is created by the user manually on the new "GDB Server Provider" options page. This can be made before or after creation of device. A GDB server provider can work in three startup modes (depends on implementation of concrete provider): 1) NoStartup mode. This means that we do not want to startup a provider, we just trying to connect to the already started GDB provider server. This mode uses the TCP/IP connection with manually specifying of remote host and port. 2) StartupOnNetwork mode. This means that we want to launch of the GDB provider automatically before connect to it in process of remote debugging. This mode also uses the TCP/IP protocol. In addition to it, a GDB provider can has additional options which are contains a paths to provider executable file, to configuration files and so on (it is depends on concrete provider implementation). This mode (with NoStartup) covers about 90% of usecase, and is supported by most set of the GDB server providers. 3) StartupOnPipe mode. This is similar to StartupOnNetwork mode and we also automatically starts the GDB server provider before debugging. But in this case is used the Pipe mode instead of TCP/IP. Not each of the GDB provider can support debugging via pipes. This patch has concrete implementations for a following set of the GDB server providers: * "Default" provider which supports only the NoStartup mode. * "Open On-Chip Debugger" (http://openocd.sourceforge.net/) provider which supports all modes. * "STLinkUtil" (https://github.com/texane/stlink) provider which supports NoStartup and StartupOnNetwork modes. Tested on Windows and Linux with: * target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2 * provider: OpenOCD v0.8.0 (tested on Windows and Linux) * provider: STLink-Util (tested on Linux only) * toolchain: ARM GCC v4.9.2 * debugger: GDB v7.8.1 (with Python support) * QtCreator with QBS project Task-number: QTCREATORBUG-13686 Change-Id: I59c775d91b0a4227d931188879850c536290e1ba Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
2014-12-20 19:10:02 +00:00
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
BareMetal: Allow to manage configurations of HW GDB servers The user has only one possibility to setup of the remote GDB server when a new device is created (or to modify it for existing device). It is possible only in the host/port fields for connection to the GDB server. It is a little inconvenient for the user. If the user wants to use other configuration of the GDB server, then need every time to edit the current configuration. Improving this it is introduction a new concept with a new entity named as "GDB server provider". Now to the device debugging purpose the user can choose any of the GDB provider from the list (by analogy with toolchain and so on). Each configuration of GDB provider is created by the user manually on the new "GDB Server Provider" options page. This can be made before or after creation of device. A GDB server provider can work in three startup modes (depends on implementation of concrete provider): 1) NoStartup mode. This means that we do not want to startup a provider, we just trying to connect to the already started GDB provider server. This mode uses the TCP/IP connection with manually specifying of remote host and port. 2) StartupOnNetwork mode. This means that we want to launch of the GDB provider automatically before connect to it in process of remote debugging. This mode also uses the TCP/IP protocol. In addition to it, a GDB provider can has additional options which are contains a paths to provider executable file, to configuration files and so on (it is depends on concrete provider implementation). This mode (with NoStartup) covers about 90% of usecase, and is supported by most set of the GDB server providers. 3) StartupOnPipe mode. This is similar to StartupOnNetwork mode and we also automatically starts the GDB server provider before debugging. But in this case is used the Pipe mode instead of TCP/IP. Not each of the GDB provider can support debugging via pipes. This patch has concrete implementations for a following set of the GDB server providers: * "Default" provider which supports only the NoStartup mode. * "Open On-Chip Debugger" (http://openocd.sourceforge.net/) provider which supports all modes. * "STLinkUtil" (https://github.com/texane/stlink) provider which supports NoStartup and StartupOnNetwork modes. Tested on Windows and Linux with: * target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2 * provider: OpenOCD v0.8.0 (tested on Windows and Linux) * provider: STLink-Util (tested on Linux only) * toolchain: ARM GCC v4.9.2 * debugger: GDB v7.8.1 (with Python support) * QtCreator with QBS project Task-number: QTCREATORBUG-13686 Change-Id: I59c775d91b0a4227d931188879850c536290e1ba Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
2014-12-20 19:10:02 +00:00
**
****************************************************************************/
#include "baremetaldebugsupport.h"
#include "baremetalrunconfiguration.h"
#include "baremetaldevice.h"
#include "gdbserverprovider.h"
#include "gdbserverprovidermanager.h"
#include <debugger/debuggerruncontrol.h>
#include <debugger/debuggerstartparameters.h>
#include <projectexplorer/runnables.h>
#include <utils/qtcprocess.h>
using namespace ProjectExplorer;
BareMetal: Allow to manage configurations of HW GDB servers The user has only one possibility to setup of the remote GDB server when a new device is created (or to modify it for existing device). It is possible only in the host/port fields for connection to the GDB server. It is a little inconvenient for the user. If the user wants to use other configuration of the GDB server, then need every time to edit the current configuration. Improving this it is introduction a new concept with a new entity named as "GDB server provider". Now to the device debugging purpose the user can choose any of the GDB provider from the list (by analogy with toolchain and so on). Each configuration of GDB provider is created by the user manually on the new "GDB Server Provider" options page. This can be made before or after creation of device. A GDB server provider can work in three startup modes (depends on implementation of concrete provider): 1) NoStartup mode. This means that we do not want to startup a provider, we just trying to connect to the already started GDB provider server. This mode uses the TCP/IP connection with manually specifying of remote host and port. 2) StartupOnNetwork mode. This means that we want to launch of the GDB provider automatically before connect to it in process of remote debugging. This mode also uses the TCP/IP protocol. In addition to it, a GDB provider can has additional options which are contains a paths to provider executable file, to configuration files and so on (it is depends on concrete provider implementation). This mode (with NoStartup) covers about 90% of usecase, and is supported by most set of the GDB server providers. 3) StartupOnPipe mode. This is similar to StartupOnNetwork mode and we also automatically starts the GDB server provider before debugging. But in this case is used the Pipe mode instead of TCP/IP. Not each of the GDB provider can support debugging via pipes. This patch has concrete implementations for a following set of the GDB server providers: * "Default" provider which supports only the NoStartup mode. * "Open On-Chip Debugger" (http://openocd.sourceforge.net/) provider which supports all modes. * "STLinkUtil" (https://github.com/texane/stlink) provider which supports NoStartup and StartupOnNetwork modes. Tested on Windows and Linux with: * target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2 * provider: OpenOCD v0.8.0 (tested on Windows and Linux) * provider: STLink-Util (tested on Linux only) * toolchain: ARM GCC v4.9.2 * debugger: GDB v7.8.1 (with Python support) * QtCreator with QBS project Task-number: QTCREATORBUG-13686 Change-Id: I59c775d91b0a4227d931188879850c536290e1ba Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
2014-12-20 19:10:02 +00:00
namespace BareMetal {
namespace Internal {
BareMetalDebugSupport::BareMetalDebugSupport(Debugger::DebuggerRunControl *runControl)
BareMetal: Allow to manage configurations of HW GDB servers The user has only one possibility to setup of the remote GDB server when a new device is created (or to modify it for existing device). It is possible only in the host/port fields for connection to the GDB server. It is a little inconvenient for the user. If the user wants to use other configuration of the GDB server, then need every time to edit the current configuration. Improving this it is introduction a new concept with a new entity named as "GDB server provider". Now to the device debugging purpose the user can choose any of the GDB provider from the list (by analogy with toolchain and so on). Each configuration of GDB provider is created by the user manually on the new "GDB Server Provider" options page. This can be made before or after creation of device. A GDB server provider can work in three startup modes (depends on implementation of concrete provider): 1) NoStartup mode. This means that we do not want to startup a provider, we just trying to connect to the already started GDB provider server. This mode uses the TCP/IP connection with manually specifying of remote host and port. 2) StartupOnNetwork mode. This means that we want to launch of the GDB provider automatically before connect to it in process of remote debugging. This mode also uses the TCP/IP protocol. In addition to it, a GDB provider can has additional options which are contains a paths to provider executable file, to configuration files and so on (it is depends on concrete provider implementation). This mode (with NoStartup) covers about 90% of usecase, and is supported by most set of the GDB server providers. 3) StartupOnPipe mode. This is similar to StartupOnNetwork mode and we also automatically starts the GDB server provider before debugging. But in this case is used the Pipe mode instead of TCP/IP. Not each of the GDB provider can support debugging via pipes. This patch has concrete implementations for a following set of the GDB server providers: * "Default" provider which supports only the NoStartup mode. * "Open On-Chip Debugger" (http://openocd.sourceforge.net/) provider which supports all modes. * "STLinkUtil" (https://github.com/texane/stlink) provider which supports NoStartup and StartupOnNetwork modes. Tested on Windows and Linux with: * target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2 * provider: OpenOCD v0.8.0 (tested on Windows and Linux) * provider: STLink-Util (tested on Linux only) * toolchain: ARM GCC v4.9.2 * debugger: GDB v7.8.1 (with Python support) * QtCreator with QBS project Task-number: QTCREATORBUG-13686 Change-Id: I59c775d91b0a4227d931188879850c536290e1ba Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
2014-12-20 19:10:02 +00:00
: QObject(runControl)
, m_appLauncher(new ProjectExplorer::ApplicationLauncher(this))
BareMetal: Allow to manage configurations of HW GDB servers The user has only one possibility to setup of the remote GDB server when a new device is created (or to modify it for existing device). It is possible only in the host/port fields for connection to the GDB server. It is a little inconvenient for the user. If the user wants to use other configuration of the GDB server, then need every time to edit the current configuration. Improving this it is introduction a new concept with a new entity named as "GDB server provider". Now to the device debugging purpose the user can choose any of the GDB provider from the list (by analogy with toolchain and so on). Each configuration of GDB provider is created by the user manually on the new "GDB Server Provider" options page. This can be made before or after creation of device. A GDB server provider can work in three startup modes (depends on implementation of concrete provider): 1) NoStartup mode. This means that we do not want to startup a provider, we just trying to connect to the already started GDB provider server. This mode uses the TCP/IP connection with manually specifying of remote host and port. 2) StartupOnNetwork mode. This means that we want to launch of the GDB provider automatically before connect to it in process of remote debugging. This mode also uses the TCP/IP protocol. In addition to it, a GDB provider can has additional options which are contains a paths to provider executable file, to configuration files and so on (it is depends on concrete provider implementation). This mode (with NoStartup) covers about 90% of usecase, and is supported by most set of the GDB server providers. 3) StartupOnPipe mode. This is similar to StartupOnNetwork mode and we also automatically starts the GDB server provider before debugging. But in this case is used the Pipe mode instead of TCP/IP. Not each of the GDB provider can support debugging via pipes. This patch has concrete implementations for a following set of the GDB server providers: * "Default" provider which supports only the NoStartup mode. * "Open On-Chip Debugger" (http://openocd.sourceforge.net/) provider which supports all modes. * "STLinkUtil" (https://github.com/texane/stlink) provider which supports NoStartup and StartupOnNetwork modes. Tested on Windows and Linux with: * target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2 * provider: OpenOCD v0.8.0 (tested on Windows and Linux) * provider: STLink-Util (tested on Linux only) * toolchain: ARM GCC v4.9.2 * debugger: GDB v7.8.1 (with Python support) * QtCreator with QBS project Task-number: QTCREATORBUG-13686 Change-Id: I59c775d91b0a4227d931188879850c536290e1ba Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
2014-12-20 19:10:02 +00:00
, m_runControl(runControl)
, m_state(BareMetalDebugSupport::Inactive)
{
Q_ASSERT(runControl);
connect(m_runControl.data(), &Debugger::DebuggerRunControl::requestRemoteSetup,
BareMetal: Allow to manage configurations of HW GDB servers The user has only one possibility to setup of the remote GDB server when a new device is created (or to modify it for existing device). It is possible only in the host/port fields for connection to the GDB server. It is a little inconvenient for the user. If the user wants to use other configuration of the GDB server, then need every time to edit the current configuration. Improving this it is introduction a new concept with a new entity named as "GDB server provider". Now to the device debugging purpose the user can choose any of the GDB provider from the list (by analogy with toolchain and so on). Each configuration of GDB provider is created by the user manually on the new "GDB Server Provider" options page. This can be made before or after creation of device. A GDB server provider can work in three startup modes (depends on implementation of concrete provider): 1) NoStartup mode. This means that we do not want to startup a provider, we just trying to connect to the already started GDB provider server. This mode uses the TCP/IP connection with manually specifying of remote host and port. 2) StartupOnNetwork mode. This means that we want to launch of the GDB provider automatically before connect to it in process of remote debugging. This mode also uses the TCP/IP protocol. In addition to it, a GDB provider can has additional options which are contains a paths to provider executable file, to configuration files and so on (it is depends on concrete provider implementation). This mode (with NoStartup) covers about 90% of usecase, and is supported by most set of the GDB server providers. 3) StartupOnPipe mode. This is similar to StartupOnNetwork mode and we also automatically starts the GDB server provider before debugging. But in this case is used the Pipe mode instead of TCP/IP. Not each of the GDB provider can support debugging via pipes. This patch has concrete implementations for a following set of the GDB server providers: * "Default" provider which supports only the NoStartup mode. * "Open On-Chip Debugger" (http://openocd.sourceforge.net/) provider which supports all modes. * "STLinkUtil" (https://github.com/texane/stlink) provider which supports NoStartup and StartupOnNetwork modes. Tested on Windows and Linux with: * target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2 * provider: OpenOCD v0.8.0 (tested on Windows and Linux) * provider: STLink-Util (tested on Linux only) * toolchain: ARM GCC v4.9.2 * debugger: GDB v7.8.1 (with Python support) * QtCreator with QBS project Task-number: QTCREATORBUG-13686 Change-Id: I59c775d91b0a4227d931188879850c536290e1ba Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
2014-12-20 19:10:02 +00:00
this, &BareMetalDebugSupport::remoteSetupRequested);
connect(runControl, &Debugger::DebuggerRunControl::finished,
this, &BareMetalDebugSupport::debuggingFinished);
}
BareMetalDebugSupport::~BareMetalDebugSupport()
{
setFinished();
}
void BareMetalDebugSupport::remoteSetupRequested()
{
QTC_ASSERT(m_state == Inactive, return);
startExecution();
}
void BareMetalDebugSupport::debuggingFinished()
{
setFinished();
reset();
}
void BareMetalDebugSupport::remoteOutputMessage(const QByteArray &output)
{
QTC_ASSERT(m_state == Inactive || m_state == Running, return);
showMessage(QString::fromUtf8(output), Debugger::AppOutput);
}
void BareMetalDebugSupport::remoteErrorOutputMessage(const QByteArray &output)
{
QTC_ASSERT(m_state == Inactive, return);
showMessage(QString::fromUtf8(output), Debugger::AppError);
// FIXME: Should we here parse an outputn?
}
void BareMetalDebugSupport::remoteProcessStarted()
{
QTC_ASSERT(m_state == StartingRunner, return);
adapterSetupDone();
}
void BareMetalDebugSupport::appRunnerFinished(bool success)
{
if (m_state == Inactive)
return;
if (m_state == Running) {
if (!success)
m_runControl->notifyInferiorIll();
} else if (m_state == StartingRunner) {
Debugger::RemoteSetupResult result;
result.success = false;
result.reason = tr("Debugging failed.");
m_runControl->notifyEngineRemoteSetupFinished(result);
}
reset();
}
void BareMetalDebugSupport::progressReport(const QString &progressOutput)
{
showMessage(progressOutput + QLatin1Char('\n'), Debugger::LogStatus);
}
void BareMetalDebugSupport::appRunnerError(const QString &error)
{
if (m_state == Running) {
showMessage(error, Debugger::AppError);
m_runControl->notifyInferiorIll();
} else if (m_state != Inactive) {
adapterSetupFailed(error);
}
}
void BareMetalDebugSupport::adapterSetupDone()
{
m_state = Running;
Debugger::RemoteSetupResult result;
result.success = true;
m_runControl->notifyEngineRemoteSetupFinished(result);
}
void BareMetalDebugSupport::adapterSetupFailed(const QString &error)
{
debuggingFinished();
Debugger::RemoteSetupResult result;
result.success = false;
result.reason = tr("Initial setup failed: %1").arg(error);
m_runControl->notifyEngineRemoteSetupFinished(result);
}
void BareMetalDebugSupport::startExecution()
{
auto dev = qSharedPointerCast<const BareMetalDevice>(m_runControl->device());
BareMetal: Allow to manage configurations of HW GDB servers The user has only one possibility to setup of the remote GDB server when a new device is created (or to modify it for existing device). It is possible only in the host/port fields for connection to the GDB server. It is a little inconvenient for the user. If the user wants to use other configuration of the GDB server, then need every time to edit the current configuration. Improving this it is introduction a new concept with a new entity named as "GDB server provider". Now to the device debugging purpose the user can choose any of the GDB provider from the list (by analogy with toolchain and so on). Each configuration of GDB provider is created by the user manually on the new "GDB Server Provider" options page. This can be made before or after creation of device. A GDB server provider can work in three startup modes (depends on implementation of concrete provider): 1) NoStartup mode. This means that we do not want to startup a provider, we just trying to connect to the already started GDB provider server. This mode uses the TCP/IP connection with manually specifying of remote host and port. 2) StartupOnNetwork mode. This means that we want to launch of the GDB provider automatically before connect to it in process of remote debugging. This mode also uses the TCP/IP protocol. In addition to it, a GDB provider can has additional options which are contains a paths to provider executable file, to configuration files and so on (it is depends on concrete provider implementation). This mode (with NoStartup) covers about 90% of usecase, and is supported by most set of the GDB server providers. 3) StartupOnPipe mode. This is similar to StartupOnNetwork mode and we also automatically starts the GDB server provider before debugging. But in this case is used the Pipe mode instead of TCP/IP. Not each of the GDB provider can support debugging via pipes. This patch has concrete implementations for a following set of the GDB server providers: * "Default" provider which supports only the NoStartup mode. * "Open On-Chip Debugger" (http://openocd.sourceforge.net/) provider which supports all modes. * "STLinkUtil" (https://github.com/texane/stlink) provider which supports NoStartup and StartupOnNetwork modes. Tested on Windows and Linux with: * target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2 * provider: OpenOCD v0.8.0 (tested on Windows and Linux) * provider: STLink-Util (tested on Linux only) * toolchain: ARM GCC v4.9.2 * debugger: GDB v7.8.1 (with Python support) * QtCreator with QBS project Task-number: QTCREATORBUG-13686 Change-Id: I59c775d91b0a4227d931188879850c536290e1ba Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
2014-12-20 19:10:02 +00:00
QTC_ASSERT(dev, return);
const GdbServerProvider *p = GdbServerProviderManager::instance()->findProvider(
dev->gdbServerProviderId());
QTC_ASSERT(p, return);
m_state = StartingRunner;
showMessage(tr("Starting GDB server...") + QLatin1Char('\n'), Debugger::LogStatus);
connect(m_appLauncher, &ProjectExplorer::ApplicationLauncher::remoteStderr,
BareMetal: Allow to manage configurations of HW GDB servers The user has only one possibility to setup of the remote GDB server when a new device is created (or to modify it for existing device). It is possible only in the host/port fields for connection to the GDB server. It is a little inconvenient for the user. If the user wants to use other configuration of the GDB server, then need every time to edit the current configuration. Improving this it is introduction a new concept with a new entity named as "GDB server provider". Now to the device debugging purpose the user can choose any of the GDB provider from the list (by analogy with toolchain and so on). Each configuration of GDB provider is created by the user manually on the new "GDB Server Provider" options page. This can be made before or after creation of device. A GDB server provider can work in three startup modes (depends on implementation of concrete provider): 1) NoStartup mode. This means that we do not want to startup a provider, we just trying to connect to the already started GDB provider server. This mode uses the TCP/IP connection with manually specifying of remote host and port. 2) StartupOnNetwork mode. This means that we want to launch of the GDB provider automatically before connect to it in process of remote debugging. This mode also uses the TCP/IP protocol. In addition to it, a GDB provider can has additional options which are contains a paths to provider executable file, to configuration files and so on (it is depends on concrete provider implementation). This mode (with NoStartup) covers about 90% of usecase, and is supported by most set of the GDB server providers. 3) StartupOnPipe mode. This is similar to StartupOnNetwork mode and we also automatically starts the GDB server provider before debugging. But in this case is used the Pipe mode instead of TCP/IP. Not each of the GDB provider can support debugging via pipes. This patch has concrete implementations for a following set of the GDB server providers: * "Default" provider which supports only the NoStartup mode. * "Open On-Chip Debugger" (http://openocd.sourceforge.net/) provider which supports all modes. * "STLinkUtil" (https://github.com/texane/stlink) provider which supports NoStartup and StartupOnNetwork modes. Tested on Windows and Linux with: * target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2 * provider: OpenOCD v0.8.0 (tested on Windows and Linux) * provider: STLink-Util (tested on Linux only) * toolchain: ARM GCC v4.9.2 * debugger: GDB v7.8.1 (with Python support) * QtCreator with QBS project Task-number: QTCREATORBUG-13686 Change-Id: I59c775d91b0a4227d931188879850c536290e1ba Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
2014-12-20 19:10:02 +00:00
this, &BareMetalDebugSupport::remoteErrorOutputMessage);
connect(m_appLauncher, &ProjectExplorer::ApplicationLauncher::remoteStdout,
BareMetal: Allow to manage configurations of HW GDB servers The user has only one possibility to setup of the remote GDB server when a new device is created (or to modify it for existing device). It is possible only in the host/port fields for connection to the GDB server. It is a little inconvenient for the user. If the user wants to use other configuration of the GDB server, then need every time to edit the current configuration. Improving this it is introduction a new concept with a new entity named as "GDB server provider". Now to the device debugging purpose the user can choose any of the GDB provider from the list (by analogy with toolchain and so on). Each configuration of GDB provider is created by the user manually on the new "GDB Server Provider" options page. This can be made before or after creation of device. A GDB server provider can work in three startup modes (depends on implementation of concrete provider): 1) NoStartup mode. This means that we do not want to startup a provider, we just trying to connect to the already started GDB provider server. This mode uses the TCP/IP connection with manually specifying of remote host and port. 2) StartupOnNetwork mode. This means that we want to launch of the GDB provider automatically before connect to it in process of remote debugging. This mode also uses the TCP/IP protocol. In addition to it, a GDB provider can has additional options which are contains a paths to provider executable file, to configuration files and so on (it is depends on concrete provider implementation). This mode (with NoStartup) covers about 90% of usecase, and is supported by most set of the GDB server providers. 3) StartupOnPipe mode. This is similar to StartupOnNetwork mode and we also automatically starts the GDB server provider before debugging. But in this case is used the Pipe mode instead of TCP/IP. Not each of the GDB provider can support debugging via pipes. This patch has concrete implementations for a following set of the GDB server providers: * "Default" provider which supports only the NoStartup mode. * "Open On-Chip Debugger" (http://openocd.sourceforge.net/) provider which supports all modes. * "STLinkUtil" (https://github.com/texane/stlink) provider which supports NoStartup and StartupOnNetwork modes. Tested on Windows and Linux with: * target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2 * provider: OpenOCD v0.8.0 (tested on Windows and Linux) * provider: STLink-Util (tested on Linux only) * toolchain: ARM GCC v4.9.2 * debugger: GDB v7.8.1 (with Python support) * QtCreator with QBS project Task-number: QTCREATORBUG-13686 Change-Id: I59c775d91b0a4227d931188879850c536290e1ba Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
2014-12-20 19:10:02 +00:00
this, &BareMetalDebugSupport::remoteOutputMessage);
connect(m_appLauncher, &ProjectExplorer::ApplicationLauncher::remoteProcessStarted,
BareMetal: Allow to manage configurations of HW GDB servers The user has only one possibility to setup of the remote GDB server when a new device is created (or to modify it for existing device). It is possible only in the host/port fields for connection to the GDB server. It is a little inconvenient for the user. If the user wants to use other configuration of the GDB server, then need every time to edit the current configuration. Improving this it is introduction a new concept with a new entity named as "GDB server provider". Now to the device debugging purpose the user can choose any of the GDB provider from the list (by analogy with toolchain and so on). Each configuration of GDB provider is created by the user manually on the new "GDB Server Provider" options page. This can be made before or after creation of device. A GDB server provider can work in three startup modes (depends on implementation of concrete provider): 1) NoStartup mode. This means that we do not want to startup a provider, we just trying to connect to the already started GDB provider server. This mode uses the TCP/IP connection with manually specifying of remote host and port. 2) StartupOnNetwork mode. This means that we want to launch of the GDB provider automatically before connect to it in process of remote debugging. This mode also uses the TCP/IP protocol. In addition to it, a GDB provider can has additional options which are contains a paths to provider executable file, to configuration files and so on (it is depends on concrete provider implementation). This mode (with NoStartup) covers about 90% of usecase, and is supported by most set of the GDB server providers. 3) StartupOnPipe mode. This is similar to StartupOnNetwork mode and we also automatically starts the GDB server provider before debugging. But in this case is used the Pipe mode instead of TCP/IP. Not each of the GDB provider can support debugging via pipes. This patch has concrete implementations for a following set of the GDB server providers: * "Default" provider which supports only the NoStartup mode. * "Open On-Chip Debugger" (http://openocd.sourceforge.net/) provider which supports all modes. * "STLinkUtil" (https://github.com/texane/stlink) provider which supports NoStartup and StartupOnNetwork modes. Tested on Windows and Linux with: * target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2 * provider: OpenOCD v0.8.0 (tested on Windows and Linux) * provider: STLink-Util (tested on Linux only) * toolchain: ARM GCC v4.9.2 * debugger: GDB v7.8.1 (with Python support) * QtCreator with QBS project Task-number: QTCREATORBUG-13686 Change-Id: I59c775d91b0a4227d931188879850c536290e1ba Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
2014-12-20 19:10:02 +00:00
this, &BareMetalDebugSupport::remoteProcessStarted);
connect(m_appLauncher, &ProjectExplorer::ApplicationLauncher::finished,
BareMetal: Allow to manage configurations of HW GDB servers The user has only one possibility to setup of the remote GDB server when a new device is created (or to modify it for existing device). It is possible only in the host/port fields for connection to the GDB server. It is a little inconvenient for the user. If the user wants to use other configuration of the GDB server, then need every time to edit the current configuration. Improving this it is introduction a new concept with a new entity named as "GDB server provider". Now to the device debugging purpose the user can choose any of the GDB provider from the list (by analogy with toolchain and so on). Each configuration of GDB provider is created by the user manually on the new "GDB Server Provider" options page. This can be made before or after creation of device. A GDB server provider can work in three startup modes (depends on implementation of concrete provider): 1) NoStartup mode. This means that we do not want to startup a provider, we just trying to connect to the already started GDB provider server. This mode uses the TCP/IP connection with manually specifying of remote host and port. 2) StartupOnNetwork mode. This means that we want to launch of the GDB provider automatically before connect to it in process of remote debugging. This mode also uses the TCP/IP protocol. In addition to it, a GDB provider can has additional options which are contains a paths to provider executable file, to configuration files and so on (it is depends on concrete provider implementation). This mode (with NoStartup) covers about 90% of usecase, and is supported by most set of the GDB server providers. 3) StartupOnPipe mode. This is similar to StartupOnNetwork mode and we also automatically starts the GDB server provider before debugging. But in this case is used the Pipe mode instead of TCP/IP. Not each of the GDB provider can support debugging via pipes. This patch has concrete implementations for a following set of the GDB server providers: * "Default" provider which supports only the NoStartup mode. * "Open On-Chip Debugger" (http://openocd.sourceforge.net/) provider which supports all modes. * "STLinkUtil" (https://github.com/texane/stlink) provider which supports NoStartup and StartupOnNetwork modes. Tested on Windows and Linux with: * target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2 * provider: OpenOCD v0.8.0 (tested on Windows and Linux) * provider: STLink-Util (tested on Linux only) * toolchain: ARM GCC v4.9.2 * debugger: GDB v7.8.1 (with Python support) * QtCreator with QBS project Task-number: QTCREATORBUG-13686 Change-Id: I59c775d91b0a4227d931188879850c536290e1ba Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
2014-12-20 19:10:02 +00:00
this, &BareMetalDebugSupport::appRunnerFinished);
connect(m_appLauncher, &ProjectExplorer::ApplicationLauncher::reportProgress,
BareMetal: Allow to manage configurations of HW GDB servers The user has only one possibility to setup of the remote GDB server when a new device is created (or to modify it for existing device). It is possible only in the host/port fields for connection to the GDB server. It is a little inconvenient for the user. If the user wants to use other configuration of the GDB server, then need every time to edit the current configuration. Improving this it is introduction a new concept with a new entity named as "GDB server provider". Now to the device debugging purpose the user can choose any of the GDB provider from the list (by analogy with toolchain and so on). Each configuration of GDB provider is created by the user manually on the new "GDB Server Provider" options page. This can be made before or after creation of device. A GDB server provider can work in three startup modes (depends on implementation of concrete provider): 1) NoStartup mode. This means that we do not want to startup a provider, we just trying to connect to the already started GDB provider server. This mode uses the TCP/IP connection with manually specifying of remote host and port. 2) StartupOnNetwork mode. This means that we want to launch of the GDB provider automatically before connect to it in process of remote debugging. This mode also uses the TCP/IP protocol. In addition to it, a GDB provider can has additional options which are contains a paths to provider executable file, to configuration files and so on (it is depends on concrete provider implementation). This mode (with NoStartup) covers about 90% of usecase, and is supported by most set of the GDB server providers. 3) StartupOnPipe mode. This is similar to StartupOnNetwork mode and we also automatically starts the GDB server provider before debugging. But in this case is used the Pipe mode instead of TCP/IP. Not each of the GDB provider can support debugging via pipes. This patch has concrete implementations for a following set of the GDB server providers: * "Default" provider which supports only the NoStartup mode. * "Open On-Chip Debugger" (http://openocd.sourceforge.net/) provider which supports all modes. * "STLinkUtil" (https://github.com/texane/stlink) provider which supports NoStartup and StartupOnNetwork modes. Tested on Windows and Linux with: * target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2 * provider: OpenOCD v0.8.0 (tested on Windows and Linux) * provider: STLink-Util (tested on Linux only) * toolchain: ARM GCC v4.9.2 * debugger: GDB v7.8.1 (with Python support) * QtCreator with QBS project Task-number: QTCREATORBUG-13686 Change-Id: I59c775d91b0a4227d931188879850c536290e1ba Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
2014-12-20 19:10:02 +00:00
this, &BareMetalDebugSupport::progressReport);
connect(m_appLauncher, &ProjectExplorer::ApplicationLauncher::reportError,
BareMetal: Allow to manage configurations of HW GDB servers The user has only one possibility to setup of the remote GDB server when a new device is created (or to modify it for existing device). It is possible only in the host/port fields for connection to the GDB server. It is a little inconvenient for the user. If the user wants to use other configuration of the GDB server, then need every time to edit the current configuration. Improving this it is introduction a new concept with a new entity named as "GDB server provider". Now to the device debugging purpose the user can choose any of the GDB provider from the list (by analogy with toolchain and so on). Each configuration of GDB provider is created by the user manually on the new "GDB Server Provider" options page. This can be made before or after creation of device. A GDB server provider can work in three startup modes (depends on implementation of concrete provider): 1) NoStartup mode. This means that we do not want to startup a provider, we just trying to connect to the already started GDB provider server. This mode uses the TCP/IP connection with manually specifying of remote host and port. 2) StartupOnNetwork mode. This means that we want to launch of the GDB provider automatically before connect to it in process of remote debugging. This mode also uses the TCP/IP protocol. In addition to it, a GDB provider can has additional options which are contains a paths to provider executable file, to configuration files and so on (it is depends on concrete provider implementation). This mode (with NoStartup) covers about 90% of usecase, and is supported by most set of the GDB server providers. 3) StartupOnPipe mode. This is similar to StartupOnNetwork mode and we also automatically starts the GDB server provider before debugging. But in this case is used the Pipe mode instead of TCP/IP. Not each of the GDB provider can support debugging via pipes. This patch has concrete implementations for a following set of the GDB server providers: * "Default" provider which supports only the NoStartup mode. * "Open On-Chip Debugger" (http://openocd.sourceforge.net/) provider which supports all modes. * "STLinkUtil" (https://github.com/texane/stlink) provider which supports NoStartup and StartupOnNetwork modes. Tested on Windows and Linux with: * target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2 * provider: OpenOCD v0.8.0 (tested on Windows and Linux) * provider: STLink-Util (tested on Linux only) * toolchain: ARM GCC v4.9.2 * debugger: GDB v7.8.1 (with Python support) * QtCreator with QBS project Task-number: QTCREATORBUG-13686 Change-Id: I59c775d91b0a4227d931188879850c536290e1ba Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
2014-12-20 19:10:02 +00:00
this, &BareMetalDebugSupport::appRunnerError);
StandardRunnable r;
r.executable = p->executable();
// We need to wrap the command arguments depending on a host OS,
// as the bare metal's GDB servers are launched on a host,
// but not on a target.
r.commandLineArguments = Utils::QtcProcess::joinArgs(p->arguments(), Utils::HostOsInfo::hostOs());
m_appLauncher->start(r, dev);
BareMetal: Allow to manage configurations of HW GDB servers The user has only one possibility to setup of the remote GDB server when a new device is created (or to modify it for existing device). It is possible only in the host/port fields for connection to the GDB server. It is a little inconvenient for the user. If the user wants to use other configuration of the GDB server, then need every time to edit the current configuration. Improving this it is introduction a new concept with a new entity named as "GDB server provider". Now to the device debugging purpose the user can choose any of the GDB provider from the list (by analogy with toolchain and so on). Each configuration of GDB provider is created by the user manually on the new "GDB Server Provider" options page. This can be made before or after creation of device. A GDB server provider can work in three startup modes (depends on implementation of concrete provider): 1) NoStartup mode. This means that we do not want to startup a provider, we just trying to connect to the already started GDB provider server. This mode uses the TCP/IP connection with manually specifying of remote host and port. 2) StartupOnNetwork mode. This means that we want to launch of the GDB provider automatically before connect to it in process of remote debugging. This mode also uses the TCP/IP protocol. In addition to it, a GDB provider can has additional options which are contains a paths to provider executable file, to configuration files and so on (it is depends on concrete provider implementation). This mode (with NoStartup) covers about 90% of usecase, and is supported by most set of the GDB server providers. 3) StartupOnPipe mode. This is similar to StartupOnNetwork mode and we also automatically starts the GDB server provider before debugging. But in this case is used the Pipe mode instead of TCP/IP. Not each of the GDB provider can support debugging via pipes. This patch has concrete implementations for a following set of the GDB server providers: * "Default" provider which supports only the NoStartup mode. * "Open On-Chip Debugger" (http://openocd.sourceforge.net/) provider which supports all modes. * "STLinkUtil" (https://github.com/texane/stlink) provider which supports NoStartup and StartupOnNetwork modes. Tested on Windows and Linux with: * target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2 * provider: OpenOCD v0.8.0 (tested on Windows and Linux) * provider: STLink-Util (tested on Linux only) * toolchain: ARM GCC v4.9.2 * debugger: GDB v7.8.1 (with Python support) * QtCreator with QBS project Task-number: QTCREATORBUG-13686 Change-Id: I59c775d91b0a4227d931188879850c536290e1ba Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
2014-12-20 19:10:02 +00:00
}
void BareMetalDebugSupport::setFinished()
{
if (m_state == Inactive)
return;
if (m_state == Running)
m_appLauncher->stop();
BareMetal: Allow to manage configurations of HW GDB servers The user has only one possibility to setup of the remote GDB server when a new device is created (or to modify it for existing device). It is possible only in the host/port fields for connection to the GDB server. It is a little inconvenient for the user. If the user wants to use other configuration of the GDB server, then need every time to edit the current configuration. Improving this it is introduction a new concept with a new entity named as "GDB server provider". Now to the device debugging purpose the user can choose any of the GDB provider from the list (by analogy with toolchain and so on). Each configuration of GDB provider is created by the user manually on the new "GDB Server Provider" options page. This can be made before or after creation of device. A GDB server provider can work in three startup modes (depends on implementation of concrete provider): 1) NoStartup mode. This means that we do not want to startup a provider, we just trying to connect to the already started GDB provider server. This mode uses the TCP/IP connection with manually specifying of remote host and port. 2) StartupOnNetwork mode. This means that we want to launch of the GDB provider automatically before connect to it in process of remote debugging. This mode also uses the TCP/IP protocol. In addition to it, a GDB provider can has additional options which are contains a paths to provider executable file, to configuration files and so on (it is depends on concrete provider implementation). This mode (with NoStartup) covers about 90% of usecase, and is supported by most set of the GDB server providers. 3) StartupOnPipe mode. This is similar to StartupOnNetwork mode and we also automatically starts the GDB server provider before debugging. But in this case is used the Pipe mode instead of TCP/IP. Not each of the GDB provider can support debugging via pipes. This patch has concrete implementations for a following set of the GDB server providers: * "Default" provider which supports only the NoStartup mode. * "Open On-Chip Debugger" (http://openocd.sourceforge.net/) provider which supports all modes. * "STLinkUtil" (https://github.com/texane/stlink) provider which supports NoStartup and StartupOnNetwork modes. Tested on Windows and Linux with: * target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2 * provider: OpenOCD v0.8.0 (tested on Windows and Linux) * provider: STLink-Util (tested on Linux only) * toolchain: ARM GCC v4.9.2 * debugger: GDB v7.8.1 (with Python support) * QtCreator with QBS project Task-number: QTCREATORBUG-13686 Change-Id: I59c775d91b0a4227d931188879850c536290e1ba Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
2014-12-20 19:10:02 +00:00
m_state = Inactive;
}
void BareMetalDebugSupport::reset()
{
m_appLauncher->disconnect(this);
BareMetal: Allow to manage configurations of HW GDB servers The user has only one possibility to setup of the remote GDB server when a new device is created (or to modify it for existing device). It is possible only in the host/port fields for connection to the GDB server. It is a little inconvenient for the user. If the user wants to use other configuration of the GDB server, then need every time to edit the current configuration. Improving this it is introduction a new concept with a new entity named as "GDB server provider". Now to the device debugging purpose the user can choose any of the GDB provider from the list (by analogy with toolchain and so on). Each configuration of GDB provider is created by the user manually on the new "GDB Server Provider" options page. This can be made before or after creation of device. A GDB server provider can work in three startup modes (depends on implementation of concrete provider): 1) NoStartup mode. This means that we do not want to startup a provider, we just trying to connect to the already started GDB provider server. This mode uses the TCP/IP connection with manually specifying of remote host and port. 2) StartupOnNetwork mode. This means that we want to launch of the GDB provider automatically before connect to it in process of remote debugging. This mode also uses the TCP/IP protocol. In addition to it, a GDB provider can has additional options which are contains a paths to provider executable file, to configuration files and so on (it is depends on concrete provider implementation). This mode (with NoStartup) covers about 90% of usecase, and is supported by most set of the GDB server providers. 3) StartupOnPipe mode. This is similar to StartupOnNetwork mode and we also automatically starts the GDB server provider before debugging. But in this case is used the Pipe mode instead of TCP/IP. Not each of the GDB provider can support debugging via pipes. This patch has concrete implementations for a following set of the GDB server providers: * "Default" provider which supports only the NoStartup mode. * "Open On-Chip Debugger" (http://openocd.sourceforge.net/) provider which supports all modes. * "STLinkUtil" (https://github.com/texane/stlink) provider which supports NoStartup and StartupOnNetwork modes. Tested on Windows and Linux with: * target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2 * provider: OpenOCD v0.8.0 (tested on Windows and Linux) * provider: STLink-Util (tested on Linux only) * toolchain: ARM GCC v4.9.2 * debugger: GDB v7.8.1 (with Python support) * QtCreator with QBS project Task-number: QTCREATORBUG-13686 Change-Id: I59c775d91b0a4227d931188879850c536290e1ba Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
2014-12-20 19:10:02 +00:00
m_state = Inactive;
}
void BareMetalDebugSupport::showMessage(const QString &msg, int channel)
{
if (m_state != Inactive)
m_runControl->showMessage(msg, channel);
}
} // namespace Internal
} // namespace BareMetal