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>
The commands are wrapped in quotes, and if they contain quotes it gets
messed up.
Change-Id: I41cebd8cf4a57a8ea671e5f43a3295af1c73fd02
Reviewed-by: hjk <hjk@qt.io>
Passing an empty string to QFile::exists() results in
'Empty filename passed to function' to be printed on the
commandline.
Change-Id: I028f0ec18447642b30be1a51f4c70b6ae18d45b1
Reviewed-by: hjk <hjk@qt.io>
There's no actual change, the code could only be triggered when
the gdb side was active, but it triggered a stop of the combo
which then redirected to the active one.
It's always and only the gdb side that needs stopping, so do
it directly.
Change-Id: I1a6273b826be8f38993c9968d874b7b3daf0d0c7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
As all Runnables are known to be StandardRunnables, this here
essentially replaces all .is<StandardRunnable> by 'true'.
.as<StandardRunnable> by no-op, and fixes the fallout.
Change-Id: I1632f8e164fa0a9dff063df47a9e191fdf7bbb2e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
There's seems to be the possibility to actually trigger the assert
this patch removes with MinGW and mixed debugging.
While the reason for that is not clear yet, there's no need to
force the debugger to abort. The observer wrong state was InferiorRunOk,
so just continuing on the selected path will do the right thing
(i.e. attempt to interrupt the debugged process)
Change-Id: I534cedd71522e73d5f1097ddd472efbeb3b4d97f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This was useful to trigger collective attemptBreakpointSync() in the gdb
engine when gdb did not yet track pending breakpoints by itself.
That's not needed anymore.
Change-Id: I8afd2955070504c6bd6ae6c028b3f006b6eb4d7c
Reviewed-by: David Schulz <david.schulz@qt.io>
This does not involve the engine (currently).
Task-number: QTCREATORBUG-19994
Change-Id: I07a628580bf99c988eb0df165d649d5cc0869c0d
Reviewed-by: Tobias Hunger <tobias.hunger@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>
... for breakpoints that resolve to multiple locations, like templates.
Toggling is done via the the breakpoint view context menu, for now
only available with GDB and not persistent.
Change-Id: I098ae13a5518e9f671c647680f8bd4413e7e5ccc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... into a EngineShutdownFinished. They were never handled differently,
and the only option is to proceed to DebuggerFinished anyway. So
simplify the state machine a bit.
Change-Id: Ied3be86fff6750abca578dc6788e4be1d895692b
Reviewed-by: David Schulz <david.schulz@qt.io>
It was needed in the past to trigger e.g. gdbserver setup in
remote cases which is nowadays handled by separate RunWorkers.
Change-Id: I30bce071dab0779cce2e7abef7b31550d8539461
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
In constrast to the LldbEngine this did properly disconnect
on restart, but moving it to the constructor avoid the need
to disconnect and follows the intended pattern.
Change-Id: I9a5727c1f6b76c0282de159251803f6ff5e76eb4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... instead of trying to interrupt a local inferior with the same pid.
Change-Id: Ia5a3aa719f2df408f13dde48744c0d79a629addb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
GdbEngine::m_startMode should be always the same as in the RunParameters.
Change-Id: Iceac9b28b8273847f7ee518572d93e796fffeb14
Reviewed-by: David Schulz <david.schulz@qt.io>
Each engine has now the RunTool pointer, not just the master.
Change-Id: I6bab026998d5da5da82224bfaf4a93d3cfb3a898
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The only use left was a not-so-important debug message.
Change-Id: I91bd1b744fb2f173037777461dd15e7720421ccc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Multiarch GDB on Windows crashes if osabi is cygwin (the default) when
opening a core dump.
Change-Id: Ic04d508d99a3e947e05dcf3adc8bb2b265edc16b
Reviewed-by: hjk <hjk@qt.io>
After splitting out terminal and core handling they are
essentially the same.
Change-Id: I603cea74186eada5728295b430c9385812dcc4cd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Either dead code, or "Adapter" related abstractions that are not
used anymore.
Change-Id: I1f2418db13d4891d36c10b488c522582eff8afc5
Reviewed-by: hjk <hjk@qt.io>
Allow to rely on kit plus data directly specified in the dialogs.
This means, RunControls with nullptr RunConfigurations are allowed
again.
Change-Id: I0b574b397603c0520c8187a8967bff2cf5e20ae8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... and apply even more force on the second trying by forcing
ramp down of the runControl itself instead of hoping that it
would pick up hints.
Change-Id: I9d0f4130cb9a137b91c9fa81c3d255f236f98be0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The users (typically target specific DebuggerRunTool derived classes)
are meant to use the individual setter functions nowadays, not the set
up the full structure, so the members are a true implementation
detail now.
Change-Id: Ida04801e3230a2fe8bbadde8845e58c3077c87a5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Most were never re-implemented, so just for debugging purposes
in the mixed engine.
Change-Id: If569e0e553e3fdd5ef83b3bdfdbd22fd0ad5b90f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The main reason for having the adapters (complex target specific state
handling) is mostly gone now, leaving us mainly with the drawbacks
of the solution: An additional indirection, and using a hierarchy
for code sharing. So drop that, and use if/else chains instead
of virtual functions now, and start simplifying the result.
Change-Id: Idcf3a28da103c01cfa80cf9bab8ef51fe879b6d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>