Commit Graph

330 Commits

Author SHA1 Message Date
hjk
fa4693fd29 Debugger: Fix insertion of backend generated breakpoints
Change-Id: Ifb46995a787c111620b5270b2b60e4e7f39eb552
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-29 12:20:07 +00:00
hjk
9492066a31 Debugger: Identify a breakpoint's requested parameters with preset data
This removes the ability to have different enabled/disabled states
for the same breakpoint in concurrently running engines, but make
the behavior less surprising.

At least currently people *do* expect breakpoint changes in a running
engine to persist after the engine dies.

Change-Id: I911594765b24f2ce58f6747ae5ecab3e608882b8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-29 11:06:26 +00:00
hjk
a68e8c5b69 Debugger: Move session load/restore handling
... to breakpoint and watchhandler.

More modular this way.

Change-Id: I4a45481fcc2bfde67b164bd7274fb7b2a12cb7ac
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-29 09:38:38 +00:00
hjk
fd25bbd99d Debugger: Re-enable breakpoint enabling via gutter context menu
Task-number: QTCREATORBUG-20970
Change-Id: Ie8fc2af8e99e82018a9b4262fe6053cb714e7d60
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-08-24 06:20:06 +00:00
hjk
7dcfe86c34 Debugger: Re-enable breakpoint property editing before debugger start
Amends 3b5ecac23.

Task-number: QTCREATORBUG-20970
Change-Id: I8206b16bc17a4d3830b8e517c7e952efabcf4609
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-08-21 06:29:51 +00:00
hjk
6203fb5db1 Debugger: Make breakpoint property dialogs less dependent on engine
... so they can be reused for global/preset breakpoints later.

Change-Id: I34493f3b702605054c1ea227f56ed286eb77fcca
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-08-21 06:13:13 +00:00
hjk
3b5ecac238 Debugger: Make most views per-engine instead of singletons
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>
2018-08-17 12:35:15 +00:00
Alessandro Portale
0558db7b54 Debugger: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init
modernize-use-equals-default

Change-Id: I91a6874f0d7b94e9079ab4ef07c23c60c80be9c0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-07-25 12:52:43 +00:00
hjk
4feb2259d9 Debugger: Code cosmetics
Sprinkling in const and ranged for.

Change-Id: I5d11d57f64140021397c23734c7373544ebebb6f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-31 07:10:47 +00:00
Eike Ziller
45f8d221bf Use FileName in TextMark
Change-Id: I3666d95dc8ef3b7da099d6d30f5cb4678a349493
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-03 06:51:47 +00:00
Tobias Hunger
980fd54ea1 Fix warnings about unused lambda captures
Change-Id: Ib9bcf180fd8ceffbf88836a62fc9532e6f7fc656
Reviewed-by: hjk <hjk@qt.io>
2018-02-21 13:06:08 +00:00
Christian Stenger
b039026214 Debugger: Handle double click of sub break points
Double clicking on a child break point (e.g. multi location
break point) now jumps to the respective parent break point.

Change-Id: I93497f8eec78408909dddd159002e171805814d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-02-01 11:30:17 +00:00
hjk
1b87d19a64 Debugger: Modernize
Mostly nullptr instead of 0, but also a few bits of collateral damage.

Change-Id: I921991272aca921dcdecf302dfff3716e79dfc24
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-01 10:28:54 +00:00
hjk
7c41720479 Debugger: Allow disabling individual breakpoint locations
... 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>
2018-02-01 10:20:33 +00:00
Robert Loehning
9e066c7b17 Move HTML out of translated strings
Change-Id: I4664427086619f33e9a882eb3f0a5f2f52e1b42a
Reviewed-by: Jochen Becher <jochen_becher@gmx.de>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-24 10:18:28 +00:00
Ulf Hermann
47886969cc Drop unused variables and lambda captures
Also, add context to connect() expressions where we are or were
capturing "this".

Change-Id: I6e006ba6f83d532478018550d148ee93eca59605
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-09-08 09:06:53 +00:00
David Schulz
4322990926 Editor: Simplify text marks
Moving defaultToolTip and color from TextMarkRegistry to TextMark.
Allowing every instance of a TextMark object to define these
information.

Change-Id: Iec1794372cf902b34d343402074e3999e7f9faf7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-22 08:42:40 +00:00
Leena Miettinen
71f2181ffb Debugger: Fix UI text capitalization
Change-Id: Iccd08dae2ef2a86c0d0d5fb5d572b24664c40431
Reviewed-by: hjk <hjk@qt.io>
2017-04-05 12:26:03 +00:00
Robert Loehning
bd9824a45c Debugger: Comment out quasi dead code
Change-Id: I8d7773d911646b05d6343241ae09882b40e861b2
Reviewed-by: hjk <hjk@qt.io>
2017-03-13 17:41:53 +00:00
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +00:00
Robert Loehning
f2a225db72 Debugger: Remove pleonasm
Change-Id: I95a4089fe042b8e5c9bdede870489613e86f52fc
Reviewed-by: hjk <hjk@qt.io>
2017-02-15 10:35:14 +00:00
Christian Stenger
2475da1bb5 Replace some more occurrences of QStringList() << pattern
Change-Id: Ic7193ac3a741763479a9ef129ed05cb7ca64f1e9
Reviewed-by: hjk <hjk@qt.io>
2017-02-08 14:27:48 +00:00
Leena Miettinen
d550cbdd40 Debugger: Fix UI text grammar and capitalization
Make some tooltips shorter.

Change-Id: Iff61402e3059360417ca0d763dbcae0ed3841e1c
Reviewed-by: hjk <hjk@qt.io>
2016-11-01 14:40:51 +00:00
David Schulz
cfa456b29a Debugger: Adding information to the breakpoint tool tip
The breakpoint condition and the command executed upon breakpoint hit
are now added to the tool tip.

Change-Id: I804faae9fe0e70f7033dc99bf4e4b3701a70505d
Reviewed-by: hjk <hjk@qt.io>
2016-09-16 06:52:12 +00:00
hjk
022120658d Debugger/Utils: Fix index passing of ItemViewEvents
... are restore 4.1 double click behavior in breakpoint view.

Change-Id: If211b9708c0173e940e4b02a9b7b27f4ed78c868
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-09-15 09:15:45 +00:00
David Schulz
8b21f687c0 Add default tool tips to text marks
The default tool tip should describe the general purpose
of the mark which is displayed in the UI when no tool tip
is explicitly set for the text mark.

Change-Id: I27aff26cf0f3458d454428e805a9b323191dc393
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-08-22 05:40:50 +00:00
hjk
53415cece1 Utils: Streamline TreeModel API
The LeveledTreeModel case is general enough to cover
the UniformTreeModel case, so merge them and rename to
TreeModel. The former TreeModel is now BaseTreeModel.

BaseTreeModels should not be instantiated directly,
a tree model with non-uniform basic items is available
as TreeModel<>.

Done-with: Eike Ziller <eike.ziller@qt.io>
Change-Id: I64a65617ab68c0cde39cf65f4bc092ef808ee6fb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-27 08:00:40 +00:00
hjk
2d79bdc29c Debugger: Remove some uses of semi-global currentEngine()
Make use of recent TreeModel improvements in various
tool views, push more operations into the engine-
owned data models, specifically context menu creation.

Change-Id: I479c97102b9fb81611c6461c6df1cec59295179a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2016-07-18 11:17:53 +00:00
hjk
7b4c7d49a9 TreeModel: Introduce a destroyItem() convenience function
Shorthand for delete takeItem(...).

Change-Id: Icb7b60e5c19aa0d21650eefff65f7eb55e9f90b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-06 11:41:55 +00:00
hjk
2a104dcfe7 Debugger: Consolidate icon storage handling
We settled now on global objects being fine for the purpose
in Core and ProjectExplorer, so there's no point in using
something more fancy in the debugger.

Change-Id: I72e45f398c09d22894419c274dfbea77da0fc153
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-28 14:28:01 +00:00
Tobias Hunger
8213a25102 Fix compile fail due to class/struct mismatch
Change-Id: Iac88272a968a202cbbc97b58df7dff7d48e62672
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-13 09:37:08 +00:00
hjk
6cd4d682b3 Debugger: Make the BreakHandler a LeveledTreeModel
Change-Id: Idcf61d63318b8a1ab768b298f1b789de13ed91b2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-13 06:55:01 +00:00
hjk
726b907cc3 Debugger: Remove debuggerstringutils.h
With QT_RESTRICTED_CAST_FROM_ASCII making GdbMi etc operate on
QString is feasible again. Take this as opportunity to move
debugger encoding handling closer to a 'conversion on input and
output if needed, storage in QString only' scheme.

Change-Id: I2f10c9fa8a6c62c44f4e6682efe3769e9fba30f7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-09 08:09:46 +00:00
hjk
36a6585fb5 Debugger: Introduce enum for columns in breakpoint view
Change-Id: I771c7fceed31739cfe504ba660796d48fb518a5e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-07 14:23:14 +00:00
Christian Stenger
1f33c0f345 Debugger: Fix updating of disabled/enabled state of breakpoints
If had been triggered on the Breakpoints view everything was fine,
but triggering on the editor this did not update the Breakpoints view.

Change-Id: I7f8e672bdf0f7f00cdb11183dc5e8e0eea817884
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-22 06:18:15 +00:00
hjk
c0fabbe169 Debugger: Add breakpoint commands for LLDB backend
Commands needs to be given in Python, i.e. something like

    import time
    print time.asctime()
    for i in range(1, 10):
         print(i)

works.

Task-number: QTCREATORBUG-15585
Change-Id: I7724617e4bbe85a717ae78b21014e2b55c4089c8
Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-15 10:50:45 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
hjk
b769156c19 Debugger: Mark pending C++ breakpoints with hour glass icon
Change-Id: If012953f8fb1e2705244ffe9f02c6bbbbc9d93c1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-06 14:06:43 +00:00
Alessandro Portale
033862f305 Themed Icons: Introduce Utils::Icon
Instead of describing icons via file name or in the themed icons case
via
a string that is a list of mask/color pairs, we have now a class for it.

Icons are now listed in per-plugin *icons.h headers.

RunControl::m_icon was The only place left where an icon property was in
fact a string. This patch changes that member to be a Utils::Icon.

Change-Id: Ibcfa8bb25e6d2e330c567ee7ccc0b97ead603177
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-11-25 12:30:52 +00:00
hjk
b8ae9fd46d Debugger: Adjust native mixed debugging after upstream changes
Change-Id: I4d137fadd0de2aa346f2f49932faac4ee9ed41e7
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-19 12:40:29 +00:00
hjk
525c33f999 Debugger: Infrastructure for reworked native mixed debugging
- Remove old experimental native mixed approach.
- Move some common stack parsing to Stackhandler.
- Mark gdbbridge.py debug output explicitly to remove it
  from actual reponse handling

New native mixed needs QtDeclarative changes and
QTC_DEBUGGER_NATIVE_MIXED=1 for now.

Change-Id: I09eed1da51cea878636d36756015b7bfaed34203
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-09 05:19:45 +00:00
hjk
cfb2b2186e Debugger: Fix removal of breakpoint marks in disassembler view
Task-number: QTCREATORBUG-14973
Change-Id: I6dfceefe6d8b1404c2a553dbeebd7dccefa1a624
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-01 08:16:53 +00:00
hjk
a373698b10 Debugger: Remove breakpoint mark from assembler view
... after deletion. The breakpoint itself was actually removed from
the breakpoint view but the red blob stayed until the next update
(e.g. after the next 'step')

Change-Id: I120059a6e643df7c104a8f6d96e09b9c707d14d8
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-07-21 14:08:24 +00:00
hjk
c81407f28d Debugger: Lift restriction one-shot breakpoints deletion
This was/is a workaround to not lose the extra information carefully
crafted one-shot-breakpoints might carry (e.g. conditions). However,
it gets into the way when simple one-shot breakpoints are used
automatically ("Jump to line", or native-mixed debugging),
so actually deleting the bp in the ui if it's gone on the debugger
side seems the lesser evil nowadays.

Change-Id: If00dc4e8f27881236c05b17109b57d7c53d424ab
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-16 11:52:32 +00:00
Eike Ziller
b1393d4778 TreeModel: takeItem should return the item
The usual Qt API for "takeXyz()" methods is to return the item that was
"taken".

Change-Id: Ie144051801487a301b3f13e2857735b65f58150b
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-06-10 08:05:32 +00:00
Eike Ziller
3858c33d74 Merge remote-tracking branch 'origin/3.4'
Change-Id: I35ba4cc7f7052699c3006545514c866be3cb5fdd
2015-05-26 15:12:42 +02:00
hjk
f35422169c Debugger: Remove a wrong soft assert in breakpoint handler
The code path can be triggered legitimately by removing breakpoints
without direct file association like "Break on throw" in the
breakpoint view.

Change-Id: If32a990f76d86386e40123c8f7a90613e15ca670
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-05-21 11:42:02 +00:00
David Schulz
ab2a0d74de TextEditor: Sort text marks in categories.
Also adding a color for each category.

Change-Id: I3627d13913951a95804b5a816f087a822c01bd86
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-05-21 08:23:16 +00:00
hjk
9edbd01922 Debugger: Fix crash in breakpoint view
... when double-clicking on an entry for which debug information
but no corresponding sources were found.

Change-Id: I48f57794e072752d444d7c3ccd8bfe517c9db1dd
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-05-18 10:08:35 +00:00
Eike Ziller
4058ff6fe9 Merge remote-tracking branch 'origin/3.4'
Conflicts:
	src/libs/extensionsystem/pluginview.cpp

Change-Id: I410156c1003d5dc81e915110c6d432bcd71da010
2015-05-07 14:42:46 +02:00