Fixes 30 seconds freeze when stopping the terminal
during debugging (when being interrupted on some
breakpoint).
Fixes also the freeze on closing the preferences
dialog after opening the remote shell via
"Open Remote Shell" and keeping it open.
Fixes: QTCREATORBUG-28365
Change-Id: I15dfd9cba02d03e0ba65878c5285ea8cc96d8aad
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
And instead of qgetenv.
Takes Qt Creator's setting at "Environment > System > Environment" into
account, which makes it easier on some platforms to set them (e.g.
macOS), can be configured differently in different settings paths, and
potentially can be changed at runtime (depending on usage).
Change-Id: I3ea7623fb528e13a202afa2f89b00e5ee83962d8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Instead of connecting to errorOccurred() and finished() signals.
Change-Id: I3c96c61fab4dd23e75b773d6347eb3aa62ce3dd0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This includes replacing DeviceProcess terminal handling with base
member.
Change-Id: Id1541bfce33c71dddc71b4816ad0b174dce3879c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
There is no need for TerminalRunner::setRunAsRoot()
as debugger is already being run as root.
Implement runAsRoot for non-terminal QtcProcess, too.
Fixes: QTCREATORBUG-26964
Change-Id: Id5110db86b7b809a5608714464241cee73875f2b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Since it's not possible to use directly ICore::settings()
inside Utils lib, make setSettings() a static member.
This simplifies the API of other static methods.
Set the settings just once now, inside main().
Change-Id: I2bcc58d4d29b5aba4a1a21a98a9f4245b24b530f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
This is a preliminary step before merging ConsoleProcess
into QtcProcess.
Don't return bool from start(), all callers ignored it.
Rename stop() to stopProcess().
Change-Id: I2fda1337e6f490685669fbd7ad6987a97866fdbe
Reviewed-by: hjk <hjk@qt.io>
This is a preliminary step before merging ConsoleProcess
into QtcProcess.
Rename applicationPID() to processId().
Change-Id: I1f9a28e768505c08c2ca3529c2ff0432f2a62c78
Reviewed-by: hjk <hjk@qt.io>
This is a preliminary step before merging ConsoleProcess
into QtcProcess.
Remove processError() signal, use errorOccurred() instead.
Change-Id: If11064944228c82a9099fffdba942c4276690085
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This is a preliminary step before merging ConsoleProcess
into QtcProcess.
Rename:
processStarted() -> started()
processFinished() -> finished()
Change-Id: Ifd94722822c7628fc8130e3a6377d55d24db6eb3
Reviewed-by: hjk <hjk@qt.io>
There can be modifications in the environment between the decision
to use a terminal and its start. We want them taken into account.
Change-Id: I5622614c5fac3bdd8167c29e7b618b5e42a28287
Reviewed-by: David Schulz <david.schulz@qt.io>
Previously, the starting inferior was sent a SIGSTOP to avoid
progress before the debugger could attach.
However, these signals are then also visible in the debugger and
need to be ignored as part of the startup handling in Creator.
The waiting effect can be achieved less intrusively by waiting
on a pipe read between fork() and exec().
Task-number: QTCREATORBUG-25073
Task-number: QTCREATORBUG-25082
Task-number: QTCREATORBUG-25227
Change-Id: Ie70b9eb5ea865f85411c26b0dbf377a019fec8d5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
For local run and GDB debug, with or without terminal.
Task-number: QTCREATORBUG-2831
Task-number: QTCREATORBUG-25330
Change-Id: I9b5d2156bcffea4f358474ecdbcad580a4419917
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This will be handy once we want to debug processes running as root.
The mechanism is the same as for "killProcess", and currently unused.
Change-Id: I2c5e5b77577ca32ed1118fcc81c03c6320db8800
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
For some reason, Q_UNUSED includes already a semicolon, adding one
on the user side creates an additional empty statement.
Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
It has been an obsolete alias for setId for a while and downstream
uses have been adapted.
Change-Id: I467370aa67054599c7771e8275d28e62ddc461fa
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This is a step towards properly supporting multiple debugger
sessions side-by-side.
The combined C++-and-QML engine has been removed, instead a
combined setup creates now two individual engines, under a single
DebuggerRunTool but mostly independent with no combined state
machine. This requires a few more clicks in some cases, but
makes it easier to direct e.g. interrupt requests to the
interesting engine.
Care has been taken to not change the UX of the single debugger
session use case if possible. The fat debug button operates
as-before in that case, i.e. switches to Interrupt if the
single active runconfiguration runs in the debugger etc.
Most views are made per-engine, running an engine creates
a new Perspective, which is destroyed when the run control dies.
The snapshot view remains global and becomes primary source
of information on a "current engine" that receives all menu
and otherwise global input.
There is a new global "Breakpoint Preset" view containing
all "static" breakpoint data. When an engine starts up it
"claims" breakpoint it believes it can handle, but operates
on a copy of the static data. The markers of the static
version are suppressed as long as an engine controls a
breakpoint (that inclusive all resolved locations), but are
re-instatet once the engine quits.
The old Breakpoint class that already contained this split
per-instance was split into a new Breakpoint and a
GlobalBreakpoint class, with a per-engine model for Breakpoints,
and a singleton model containing GlobalBreakpoints.
There is a new CppDebuggerEngine intermediate level serving as
base for C++ (or, rather, "compiled") binary debugging, i.e.
{Gdb,Lldb,Cdb}Engine, taking over bits of the current DebuggerEngine
base that are not applicable to non-binary debuggers.
Change-Id: I9994f4c188379b4aee0c4f379edd4759fbb0bd43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Mostly nullptr instead of 0, but also a few bits of collateral damage.
Change-Id: I921991272aca921dcdecf302dfff3716e79dfc24
Reviewed-by: David Schulz <david.schulz@qt.io>
Do not wait until the stub exits.
Task-number: QTCREATORBUG-19056
Change-Id: I7c4c3438c960a6e418ccd6c9d96d01d9621e9b02
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Added full stops to ends of messages.
Used book-style capitalization for message box titles.
Wrote "operating system" in lower case.
Change-Id: I8cee1a1c7f4ae55952daa507395845feae203ab9
Reviewed-by: hjk <hjk@theqtcompany.com>
This is experimental for now and requires QTC_USE_PTY=1
in the environment to be used.
Change-Id: I460ce7b9283467d481e903f731f4243b7e5ec094
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>