Commit Graph

491 Commits

Author SHA1 Message Date
Eike Ziller
5c87432260 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp

Change-Id: I6ae2d37290643d69390f679a54f7596782f3d97f
2016-04-12 11:34:46 +02:00
hjk
e73a9c1b0d Debugger: Always sort local variables alphabetically.
It was there for GDB at a time, but never for the other backends.
Fix the GDB regression and make the sorting consistent across
backends.

Task-number: QTCREATORBUG-15296
Change-Id: If728c65f0c8ca4a8378c7cf5e53f1dadbfb72b29
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-04-11 09:35:07 +00:00
hjk
c8c6c8ec50 Debugger: Replace cdb output encoding enum by strings
Change-Id: I05225f5be61fdaa448b9991b14056e89228c26a4
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-04-04 13:01:58 +00:00
Orgad Shaneh
658d29335b Debugger: Re-enable item selection in watches for core dump
In 7de7eb6bca the behavior on Unrunnable
state was changed, probably by mistake.

AddWatcherWhileRunningCapability should allow adding watchers while
running, but it should not prevent selection when not supported and
the inferior is not running.

Another missing part was that Unrunnable was considered running,
although it shouldn't.

Change-Id: I7d27b81977a6921919327b3122a865b7ffa2d0bd
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-24 15:36:49 +00:00
hjk
af55f36eaf Debugger: Also copy fallback data on Copy View Contents to Editor
Getting e.g. an object's address is better than an empty value.

Change-Id: Ia78335da8b9eadeadc2e6f1757399ae604eb6610
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-24 12:55:18 +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
3eaa734cc3 Debugger: Better support for "raw" QByteArrays and char[]
Display 'cooked' character as well as numerical value in both decimal
and hex.

Task-number: QTCREATORBUG-15549
Change-Id: I7f8f9efe07573b452ff44501bfca5e29e9ab437c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-01-07 07:14:44 +00:00
hjk
7de7eb6bca Debugger: Work on WatchModel performance
Don't instantiate repeating boilerplate item data in some
cases (such as large arrays).

This makes it necessary to access parent WatchItems in
a lot more cases than before and needs another separation of
WatchItem/WatchModel code to keep the dumper autotests
in a functional state.

For a plain std::vector<int> with 1 mio items this reduces
 extraction time from more than 2 minutes to about 3 seconds.

Change-Id: I175c5f6ee90434a6e85342d8bb71bd10a04dd271
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-01-06 09:59:11 +00:00
hjk
c2bf384ac2 Debugger: Split DebuggerEncoding enum
... into a string specifying a kind of encoding (utf8, latin1),
an optional bytesize (2-byte integers, 4-byte integers) and a
flag whether the displayed value should get "..." around it.

Scales better than adding an enum value for each new combination.

Change-Id: Iffcb1e2f148f12da96e165559a976bd34026c649
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-12-21 07:32:14 +00:00
hjk
6a71c63186 Debugger: Make display of QObject names optional
... and switch it off by default. The feature has indeterministic
performance impact and lost quite a bit of its utility since GDB
learned to extract dynamic object types most of the times.

Change-Id: I22cccb03ba67f9ff6ad757bbc06eb372d84bbffe
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-12-17 14:58:23 +00:00
hjk
beb561b8cc Debugger: Remove unusued WatchData::displayType member
Change-Id: I475c5f6ee90434a6e85342d8bb71bd10a04dd27b
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-12-17 09:14:29 +00:00
hjk
4b93663acd Debugger: Also escape special chars in elided displayed strings
Task-number: QTCREATORBUG-15486
Change-Id: Ie481b9458beb2e5ce1458abbd71d311561f961af
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-10 14:49:11 +00:00
Ulf Hermann
d5707e0e32 Debugger: Use Qt's JSON encoder for debugger protocol
The V4 debug service expects correct JSON as input and gdb, lldb, and
pdb expect Python object literals. There is a subset of JSON that is
also valid as Python object literals and we use that for the protocol
spoken with gdb, lldb, and pdb. The strings passed to CDB are tunneled
through JSON strings and converted to byte arrays before sending them.

Change-Id: I87319b5450e5c3c3b29c565b75cddaa612767611
Task-number: QTCREATORBUG-14931
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-09-15 08:28:14 +00:00
hjk
7ac99044e8 Debugger: Merge watcher request creation
... of {Gdb,Lldb,Pdb}Engine. Code is the same nowadays.

Change-Id: I874b1ddfd813c15cc16c9b91bd894c7c42b56e93
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-09-15 06:00:14 +00:00
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