Commit Graph

477 Commits

Author SHA1 Message Date
Orgad Shaneh
91848f4755 Debugger: Make watchers editable in coredump
Task-number: QTCREATORBUG-15001
Change-Id: Icba8175e2f3ca0ed07815fb063dec660c722231d
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-09-03 07:01:11 +00:00
hjk
e6b2426b89 Debugger: Prevent editing of elided items in Locals view
For a long string, only the parts needed to fill the Value column is
retrieved. Trying to edit (double click on Value entry) this resulted
in truncation of the string.

Change-Id: I1e993bfe52cee933bd32c866448eedc788807bd3
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-17 11:15:01 +00:00
hjk
d98325f413 Debugger: Make Locals views entries selectable for core files
Task-number: QTCREATORBUG-14904
Change-Id: I3918979c5f7a5dd3e4fbe9e3c7444f622e26b3f3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-13 07:04:27 +00:00
hjk
7a88612a8e Debugger: Don't add a new watcher item when editing one in-place
Task-number: QTCREATORBUG-14775
Task-number: QTCREATORBUG-14851
Change-Id: I06638ffc2d5a1723e87c1c5a651592e7e0bbad22
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-08-11 13:29:29 +00:00
hjk
9130cdfc05 Debugger: Use special values for translatable strings
... when passing data from the dumpers to the GUI. This reduces
the need to guess whether a value contains a translatable string.

Change-Id: I5e2210b8d028bd71f0087a2ba5c7c5b04331b882
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-21 10:59:51 +00:00
hjk
6c4c8b8a94 Debugger: Remove cache of fetched item names in Locals Views
This was originally present to prevent multiple evaluations of
the same items when using GDB/MI varobjs. This also prevented
a proper update of child item count. Until recently this did
not negatively affect the GUI due to excessive use of reset()
in the view. This has changed, so the missing update was visible now,
solved here by removing the cache, which is not needed anyways,
since we don't use varobjs anymore.

Task-number: QTCREATORBUG-14705
Change-Id: I3bbcd0525f02c10765f20be3a55708835747b307
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-07-17 13:19:30 +00:00
hjk
c1e418c290 Debugger: Don't do unnecessary work
... after the "Sort Members of Classes Alphabetically" option is
toggled. The option only influences the contents of the "Locals
and Expressions" view, so it is sufficient to update only that.

Change-Id: I9eade679eddbfb108c7ed478cce6c13fadcca317
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-07-17 10:42:33 +00:00
hjk
63c5fc034b Debugger: Split updateWatchData() paths
There are two cases that do not coincide in asynchronous
engines such as the QmlEngine: Inserting a new watch item,
and expanding the children of an existing item.

Change-Id: Ic98a5f1e89aca37146039a241de737c407606e83
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-16 08:05:36 +00:00
hjk
69bf5e4319 Debugger: Expand items in QML Inspector on first click
Task-number: QTCREATORBUG-14210
Change-Id: I4c4409476467bb7008cb6806018371e9134437a9
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-10 07:43:29 +00:00
hjk
d48ac14fba Debugger: Simplify removal of outdated L&E items
This removes the need of bookkeeping on the engine side. It's
basically a kind of mark-and-sweep: On update begin mark items
that are expected to change as outdated, while data arrives, undo
that marking, and update end remove all remaining marked items.

Change-Id: I739b84869033d511d5c9a80605c079e87ef4f6a7
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-07-07 08:08:08 +00:00
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