Commit Graph

467 Commits

Author SHA1 Message Date
hjk
24e25e92fa Debugger: Fix crash when trying to insert iname-less WatchItems
The actual problem here was a wrong use of the recursive
findItem() (instead of a check of the direct children).
That went unnoticed, as the recursive search happens
to find the right child *unless* the iname was empty,
which usually should not happen, but did here, since the
LLDB output was not as well-formed as expected.

Task-number: QTCREATORBUG-14660
Change-Id: I368d92c058354d829aab52c6cc37c7f350223dbe
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-03 12:28:37 +00:00
Christian Stenger
90656ea455 Debugger: Delete pointer if no more needed
Introduced with 2b19081cb0

Change-Id: I817ec48b9098f46ca703a6075d4657f0b7eb9948
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-06-16 11:31:45 +00:00
Orgad Shaneh
7a6b1114f2 Debugger: Fix display of fields in returned value
Change-Id: Ic69ea19f4ea5b73f846d02765454f41cd3588133
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-12 07:02:40 +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
hjk
5309e217e4 Debugger: Consolidate GDB and LLDB "updateLocals" code paths
This splits the bool setToolTipExpression() operation into
a bool canHandleToolTip(), and the actual processing of
the request, which is mostly identical to the handling of
a watcher.

Handling a watcher is now mostly the same as a full Locals
update, except for the 'partial' flag. Pushing the handling
of that down to the bridges gives identical code paths
in the gdb and lldbengine. Move that to the
DebuggerEngine base class.

Change-Id: I3861b43e8630c7e7bd57fcd549b2a2387e3d4869
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-10 07:40:27 +00:00
hjk
3737986a88 Debugger: Add a comment on what WatchHandler::resetValueCache does
Change-Id: I7bb67fd91fb1338f2d42ceee3e47bad20b36a81b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-09 07:13:50 +00:00
hjk
952a66bf41 Debugger: Remove WatchModel double sorting
Change-Id: Ia26cdcddf086546650525c779c21b0100a616af3
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-06-05 06:18:42 +00:00
Eike Ziller
3858c33d74 Merge remote-tracking branch 'origin/3.4'
Change-Id: I35ba4cc7f7052699c3006545514c866be3cb5fdd
2015-05-26 15:12:42 +02:00
David Schulz
a33db02a36 Debugger: Optimize insert watch item.
Change-Id: If15afbbc7bcf33367755cfd61d47670a28038e6f
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-05-21 11:08:00 +00:00
Eike Ziller
6c2c505228 Merge remote-tracking branch 'origin/3.4' 2015-04-23 09:39:09 +02:00
hjk
2b19081cb0 TreeModel: More API cleanup
- introduce topLevelItemCount (similar to QTreeWidget)
- squash untypedTreeLevelItems()
- rename removeItems() to clear()
- rename removeItem() to takeItem()
- rename treeLevelItems<> to itemsAtLevel<>

Change-Id: I0f1bb4110f7687b20da3d92e3d943858645a9fa2
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-04-22 13:48:18 +00:00
hjk
89b0e4c069 TreeModel: API cleanup
- rename index{From->For}Item
- rename item{From->For}Index
- remove ununsed setColumnCount

Change-Id: I1cce9657e476dd1e8ffa9f7cdb2e646fab6884ab
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-04-22 12:08:37 +00:00
hjk
bb02fba9c9 Debugger: Fix WatchItem color display
Name and type columns were not properly grayed out.

Change-Id: I4120329e6d8f4e6fa33859056cafd07f69b642bd
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-16 11:01:20 +00:00
hjk
3658bdac89 Debugger: Use primitive internal widget instead of matplotview
This practically removes any functionality beyond plain plot display,
but does that at least reliably, cross-platform, without dependency
on 3rd party python packages.

Change-Id: Iaff2f78595394522f32264c642df20dd48b83f8b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-02 12:25:04 +00:00
hjk
c12593efc4 Debugger: Show unsigned chars as unsigned values
Task-number: QTCREATORBUG-13809
Change-Id: I5dbb85c44cdc801edee1f33bc0c0cf47ec9916a3
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-04-01 09:30:56 +00:00
hjk
d66e063165 Debugger: Make C array data plottable
Change-Id: Ib4519f0e64504ec0e3dccd89978acca5134b2932
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-01 09:09:43 +00:00
hjk
1bdaa78fa5 Debugger: Add format names for some special local display formats
Untranslated for now due to the 3.4 string freeze.

Change-Id: I5c1663acb8c22c591f8809d666a84a078db3490f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-31 13:31:31 +00:00
hjk
d920ed9115 Debugger: Fix QmlInspector column width
Task-number: QTCREATORBUG-14192
Change-Id: Ic462bbcf07dc3c683b86e65628bae7ac8ac9249a
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-27 10:05:28 +00:00
hjk
b0977f8322 Debugger: Don't update watch view needlessly
Column width computation is not cheap.

Change-Id: I615e1f9888f32171c478bfa2be565a91d669e8a2
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-27 10:05:06 +00:00
hjk
a6c81b02bd Debugger: Fix regression in "Show in separate Window"
After the tree model changes, the main insertion path did
not trigger the update in the separate Window anymore.

Task-number: QTCREATORBUG-14101
Change-Id: I90d8c0874be473a67c6260ca9bf63099f5d54a06
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-25 10:50:47 +00:00
Thorben Kroeger
797af15584 Theming: debugger
Theme the text colors of
- the debugger's log window
- the debugger's watch items

In particular, the watch items were hard to read (default color was
black, color for changed value was red).

For the dark theme, the default color for watch items is now white
(the text color), changed items appear red, and invalid items
appear grey.

Change-Id: I7f9534b054c44d635b106fa0e9ac70479c9fcac5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-03-24 14:44:13 +00:00
Sergey Belyashov
7fa58f1d99 Fix missing of some translations
Task-number: QTCREATORBUG-13649
Change-Id: I69f78b3b8d2366003bfce81a2afba0068e716d22
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-03-24 07:04:46 +00:00
hjk
c097867f3c Debugger: Prevent endless recursion on output of broken dumpers
That fixes a recent regression.  If a dumper announces to have children,
but doesn't produce any we re-tried for ever. This is reproducible e.g.
by putting an 'return' before any 'if d.isExpanded():' stanza in a
dumper and triggering that dumper.

Keep track of expanded items, and only ask for children once per
location change.

Change-Id: I349fdc7380444eb3ac9fa2fae098a3f3e7658195
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-23 14:43:46 +00:00
hjk
48ac7c186b Debugger: Re-organize passing of display formats
The current setup (dumper->gui: list of descriptions,
gui->dumper: index in list) is fragile and not easily
i18n'able. Go with an enum based approach now.

Change-Id: Ie78c596065a8b2ba87ad725274da29d4be3a6da4
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-23 14:12:43 +00:00
hjk
dba12a1eab Debugger: More interface streamlining
This makes WatchModel practically a WatchHandlerPrivate.

Change-Id: Iaf3435711012af5e233a7dfc0dc0caf9c8c3ab24
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-23 07:13:46 +00:00
Orgad Shaneh
d9135665f0 Debugger: Fix removal of expression that ends with whitespace
* Start a debugging session
* Add an evaluated expression "(char*)foo "
* Delete the expression
* Press F10
* It reappears

Change-Id: I5c54ca6ab2f4be6c613880a2747e4aff653d15be
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-20 11:36:23 +00:00
hjk
a1ec5cd096 Debugger: Fix recent crash on ramp down
Change-Id: Iaa9c0b16c3f09b72d7a755a2d66c8ac1bf021283
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-20 11:27:21 +00:00
Christian Stenger
51ee57aad0 Debugger: Fix compile with MSVC2010
Change-Id: Ic75a4d6d7fc5cfd27f2a42b59b83366bb1822a39
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-20 10:41:49 +00:00
hjk
b3f88df41d Debugger: Remove most remaining occurrences of WatchData
... in WatchHandler and DebuggerEngine interface.
Adjust using code.

Change-Id: I6371f3e96ba46a783e23a5767cdde24a10d3fce7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-20 08:36:57 +00:00
hjk
3fd6e9e77c Debugger: Replace uses of one of the depracted WatchHandler members
Change-Id: I1761b75c0c2605e2d3157f318f26da5158cc6395
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-20 07:23:11 +00:00
hjk
e44378e942 Debugger: Adjust watcher column size to locals content
Change-Id: Iec6b4478862578397ee2b3953cd06730bd0db121
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-19 08:13:19 +00:00
hjk
13d425b972 Debugger: Re-enable watchers after ending a debugger run
In that state one should be able to remove them.

Change-Id: I9c1383decb087971cdc01607c32801f6ac22f99d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-19 06:58:51 +00:00
hjk
9851484b31 Debugger: Remove new watch window timer from public interface
Change-Id: Ic9d3df22d917e5644d6302a6af06aa8eadea8b5a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-17 14:44:08 +00:00
David Schulz
fb4af50bf6 Debugger: Add delay before showing progress indicator.
Change-Id: I70dc3997800649e6920c6a6bece9aef98f2b2146
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-16 12:45:42 +00:00
hjk
51edafece5 Debugger: Rename WatchItem::{color->valueColor}
It's the color of the value field, not of the whole item.

Change-Id: I1dd63ae21469ec784aefa278d379f819280067d9
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-16 12:36:12 +00:00
David Schulz
40dd248178 Debugger: Show progress indicator while updating locals.
Change-Id: I4b26cbe71f5936f367f9add2b3a6c812446835d8
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-16 10:10:05 +00:00
David Schulz
467c441c93 Debugger: Fix using the same watcher number twice.
Counting the watcher number in a global scope, so they don't get
reinitialized incorrectly with a new engine.

Change-Id: Ifd9efb320e2c0f20b2e2845348a98961f72bf28c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-16 10:08:04 +00:00
hjk
ef894f21e2 Debugger: Rename WatchHandler::remove{Data->ItemByIName}
That's what it does.

Change-Id: If1a1bf91220630ad09e5ec8636ccb9d67c8d0947
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-09 11:52:52 +00:00
hjk
915bb5413c Debugger: Remove unused WatchHandler::removeChildren()
Change-Id: Ieef352db04978ad48dfe47178edaec7702dc373b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-09 11:52:45 +00:00
hjk
3e02f8ec2e Debugger: Fix format switching for char[]
Task-number: QTCREATORBUG-14094
Change-Id: Iea1f59d5af2fb453ead7e0cef9e04293a698794e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-09 11:17:25 +00:00
hjk
7b6ff1fed9 Debugger: Remove unneeded parameter from WatchModel::insertDataItem
All remaining uses had 'destructive' as 'true'.

Change-Id: I4eee6539c7b5e0336325a59af3379f8a3140847b
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-06 14:00:32 +00:00
hjk
e4c2582b62 Debugger: Dissolve WatchHandler::insertBulkData
Change-Id: Ie2b073531f28943e78e89157798fef1645d4aa2b
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-06 13:59:54 +00:00
hjk
3f79ae203f Debugger: Start disentangling WatchHandler::insertData
Rename the list overload. Make the single item overload use
the direct path to insertItem, hook the column resize requests
to the showing/hiding of the watchers pane.

Change-Id: I0a1940c8e1919341a815e6bccbcf55d989d663da
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-06 13:59:42 +00:00
hjk
34c807a11a Debugger: Remove WatchUpdateFlags
Only needed in the non-Python days. CDB didn't use it to start with.

Change-Id: Ia609218cc1a694f797e278c4d99ead68e6212938
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-06 13:55:55 +00:00
hjk
df00a7af64 Debugger: Move watcher modification from delegate to model
We don't need the remove/re-insert cycle in the new model,
so the expression modification can be done directly.

Change-Id: If9626f48fcfbcf75e61d332afb59b986da6c2dbc
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-06 12:47:55 +00:00
hjk
a7bf3c49a4 Debugger: Remove WatchHandler::insertIncompleteData
... and replace at caller side it with the used parts
of the code.

Change-Id: Id612c66ac6d95bfc12aba16e9247cc81991dd779
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-06 10:40:30 +00:00
hjk
9e0a27207c Debugger: Fix display name of undereferenced pointers
This was a regression introduced by the migration of the WatchHandler
to the new tree models.

Task-number: QTCREATORBUG-14098
Change-Id: Id97c3927e7e19d501a8e7e01e12b28ffe2a66c68
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-05 14:25:04 +00:00
hjk
518a44a780 Debugger: Remove some soft asserts
They can legitimately appear in regular use right now.

Task-number: QTCREATORBUG-13938
Change-Id: Id7097c82866375060545db6ddbbecbf1fbf5da6d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-03 09:49:39 +00:00
hjk
aa67078276 Debugger: Implement basic value assignment for PdbEngine
Change-Id: I505c3e9c4a239ed381d525b5acaf1acf3a06a59a
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-13 17:05:29 +00:00
Eike Ziller
56aadc407d Merge remote-tracking branch 'origin/3.3'
Conflicts:
	src/plugins/debugger/watchhandler.cpp
	src/plugins/projectexplorer/kitmodel.cpp
	src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
	src/shared/qbs

Change-Id: I6a68090993a264e93ac7850858cc24ba6bdb5602
2015-02-12 17:36:29 +01:00