Commit Graph

182 Commits

Author SHA1 Message Date
hjk
d1109c50e0 Debugger: Deactivate metaObject extraction by inferior call
This seems to have side-effects on memory contents. Right now it is
unclear what happens exactly, so revert for 4.1rc.

Change-Id: I7b1b8e376ac84b6656b1abdae720d7bead1c0b89
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-01 10:45:47 +00:00
hjk
4c4698917e Debugger: Robustify QObject detection
Change-Id: I24aa26134e674725c84f511ac610dc06a76a775d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-01 10:45:33 +00:00
hjk
7b1a1305db Debugger: Use '[d]' for artificial QObjectPrivate member
Derived classes might have a real 'd' member. '[d]' on the other hand
is not a valid identifier and also fits into the '[children]',
'[parent]' etc scheme.

Change-Id: I60650a032c49caef1bf5553ebaae8d6b7d219d44
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-01 10:18:12 +00:00
hjk
539e33da02 Debugger: Improve QObject related dumpers in release builds
Make QMeta* dumper work without debug info.
Show QObject parent and children list in this case.

QObject properties are not visible, and neither actual type
of QObject children.

Change-Id: I05417a7d78084234403a964f683db6867b6686f0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-22 08:22:03 +00:00
hjk
26fa769bab Debugger: Add dumper for QMeta{Enum,Method,Property}
Task-number: QTCREATORBUG-16593
Change-Id: Iaa710660d8ef69459596f93831cf8467913f0468
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2016-07-15 10:44:03 +00:00
hjk
a12420c995 Debugger: Improve QMetaObject dumper
Change-Id: I690e95f5f4651331f6b2407636253770a9bb92a0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2016-07-13 15:57:37 +00:00
Eike Ziller
6efd8e33e2 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	qtcreator.pri
	qtcreator.qbs

Change-Id: I6217662f0c51d04a83f7a85dc5d7c7f25e78e09a
2016-05-13 16:24:37 +02:00
hjk
0ce54ce1e4 Debugger: Guard QObject property extraction against failures
Nowadays, the [property] section contains only "top level" properties,
inherited ones are available through by expanding the base class.

Task-number: QTCREATORBUG-15798
Change-Id: I40475500a2d20f27145a47fa7ed1e61d4a592c10
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-12 11:25:04 +00:00
Eike Ziller
8a77eacf8d Merge remote-tracking branch 'origin/4.0'
Change-Id: Ied609608f6b12aa923c67777bc5a273c4d8fbcbb
2016-04-15 10:07:55 +02:00
hjk
be91d50e43 Debugger: Replace DebuggerDisplay enum by strings
Easier to coordinate between dumpers and watchhandler

Change-Id: Ide191a5786dc04ef22c3e9c8b0bec39f8f8c0f1d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-04-12 15:37:28 +00:00
hjk
3a7ce3f5be Debugger: Restrict array dumping to 1 mio elements by default
Individual dumpers can override. User accessible gui to be done...

Change-Id: Idf81dab11f810b43fc6721cbb37d12a1365a8634
Task-number: QTCREATORBUG-16021
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-04-12 12:08:39 +00:00
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
744d78d431 Debugger: Change default encoding for char * to UTF-8 in display
Task-number: QTCREATORBUG-16029
Change-Id: Idf14ec54a53bd71b15196aedc7fc5e40b7bb6b5d
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
2016-04-11 10:45:44 +00:00
hjk
e56e6b0ca9 Debugger: Handle wchar_t* equally special as char*
Task-number: QTCREATORBUG-16034
Change-Id: Ic1aed8cef2d8eea9ceaf4123b0b0b7da08e6c86b
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-11 10:45:39 +00:00
hjk
607171ad83 Debugger: Allow use of regular expressions for dumpers
The pattern is given as (unused) default value of a third
parameter of the dump__* functions.

Change-Id: Ia9092427c240f2198acd00267cd136a3becc71b6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-04-07 10:16:26 +00:00
hjk
5daeb5da01 Debugger: Fix LLDB operations with XCode 7.3's lldb-350.0.21.3
The output of lldb changed. Adapt our use.

Task-number: QTCREATORBUG-15965
Task-number: QTCREATORBUG-15945
Task-number: QTCREATORBUG-15949
Change-Id: Ic78593c1a7c4ae69ecf23e381cd2f23441b4829b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-04-06 06:08:45 +00:00
Orgad Shaneh
05c1d8ef55 Debugger: Provide addresses for formatted pointers
Pointers often don't have an address at all, or have the pointer's
address instaed of the target address.

For example:
int main()
{
  char str[11] = "HelloWorld";
  char *s1 = str; // s1 shows its own address
}

Change-Id: I2436578c073a00a3fec9411ef7ec82ae4e63a8b0
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-22 15:56:54 +00:00
Tobias Hunger
54d64971d8 Update License according to aggrement with Free Qt Foundation
* Update license of files loaded in debugger
* Make sure all files have a license header

Change-Id: I612885652bcae0a4b7a88ae5184ef661aee25006
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-01-18 10:41:20 +00:00
Eike Ziller
4255493881 Merge remote-tracking branch 'origin/3.6'
Change-Id: Ia5e169a276e21db59b4b26a1ed3f253bff9e2ab9
2016-01-14 09:32:17 +01:00
Orgad Shaneh
8c0f663118 Dumper: Fallback to 100 items when array size cannot be determined
Can happen when an array is declared as `extern Struct arr[];`

Change-Id: I7e9e0a5e73799dc29bfe6a71ad60d3d51a709cef
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-01-11 13:32:48 +00:00
hjk
3c37941829 Debugger: Make accessing value of invalid pointers more robust
LLDB on Linux did not like a plain toInteger() in some cases.

Change-Id: I4fb640df52218a3df04f3ce5092eb5fbc8b5acd5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-06 12:00:53 +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
6dcdba92f3 Debugger: Show a warning if Python < 2.7 is used
Execution will continue for now, but not for long.

Change-Id: I1abc57e6375e5ec4d24c7299f68f59c5bb06f3c9
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-12-16 12:02:26 +00:00
hjk
d01a5ff2aa Debugger: Speed up display of large static arrays with simple data
This addresses QTCREATORBUG-15426 for the case of well-known simple
types (int, float, ...). Retrieving 1 mio ints takes now ~15s instead
of ~140s.

Task-number: QTCREATORBUG-15426
Change-Id: Ifb7c957d60504e23147d499d8bb9bbd41c5a53ba
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-10 11:23:24 +00:00
hjk
4099cef35d Debugger: Better fallback for resolving function local struct types
Function-local struct definitions produces types 'names' like
'QList<main(int, char**)::SomeStruct>'. Remove the part up to
the '::' and rely on local lookup.

Task-number: QTCREATORBUG-15400
Change-Id: Ic73005f294c5f62c504b2d7ded4dd2716d88f2e4
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-09 07:37:03 +00:00
Orgad Shaneh
01b50d2fc3 Fix invalid long address printing
Task-number: QTCREATORBUG-15326
Change-Id: I90b73e757c0ad3fc16ef587e6b4359e6bcb843ea
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-20 07:51:14 +00:00
hjk
e6454be43f Debugger: Fix QObject dynamic property dumper for Qt 5.7
Property values are stored now using a QVector, not a QList.

Change-Id: Ifc8d6b856d2aff5ce4565c43111132f2a73460df
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-09 13:49:34 +00:00
hjk
f81dca4b38 Debugger: Relax reference counter sanity check
With C++11 we use std::atomic in the ref counter, giving yet
another possibility of structure member names. Instead of
trying to keep up with that, access the binary data directly.

Change-Id: Iabea831689f58f83150287218bb015c824e888ca
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-09 08:44:58 +00:00
hjk
626086e9d1 Debugger: Fix expansion of std::string et al
The objects have been reported as 'having children', but
when asked for them nothing was produced, leading to an
endless loop (until the next 'step' command).

Change-Id: I3bbfe10a7ed980b27a5fca1edfe44dd8983b8f7b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-09 08:02:32 +00:00
hjk
7a618c38cf Debugger: Remove unused dumper.py function polishWatcher()
Change-Id: Ib85ac34b56971b1882d91bddf9abf1af5b0506f4
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-02 10:00:49 +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
ec2e01faec Debugger: Make basic native-mixed debugging work with LLDB
Change-Id: I4d55c6a486d5adbccaa93eaa1ee461238fecfea3
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-13 06:49:00 +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
a7dd2ed4ce Debugger: Reduce scope of usage of Python's importlib module
The module doesn't exist in Python 2.6, so we can't use it
unconditionally if 2.6 is to be supported again.

Task-number: QTCREATORBUG-15076
Change-Id: Ic91cdf451ce846d892cd914bf850a4fd4b18c488
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-24 06:43:01 +00:00
hjk
3ee97ef8ab Debugger: Use the usual callback mechanism for LLDB, too
... instead of the custom mechanisms to funnel breakpoint ids, cookies
and similar through individual bridge functions.

Change-Id: I2b6e906078eefdbcd4ffa166dc1881a1d0f7fb51
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-11 07:58:02 +00:00
Eike Ziller
8eaaef96aa Merge remote-tracking branch 'origin/3.5'
Change-Id: I65968dd02ea6bdd15f304ae567dd0c02238e6949
2015-08-20 13:23:13 +02:00
hjk
76b5095687 Debugger: Also display subentries for pretty printed char arrays
While the formatted value is usually all that's wanted,
having access to the individual chars is handy at times.

Change-Id: I53b0d0ccfe4289b9b54a1caced4e0bd5ac66d9fc
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-13 14:18:22 +00:00
hjk
ef7a7a445b Debugger: Fix evaluated expressions containing quotes
Task-number: QTCREATORBUG-14364
Change-Id: Ia1fc1f341dad56c495b356464951a771dfccc50b
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-13 12:19:17 +00:00
hjk
eca5ccdd3e Debugger: Debugger protocol maintenance
- Move DisplayFormat from watchhandler.h to debuggerprotocol.h
- Add/update a few comments about the use of the protocol enums
- Make decodeData take a DebuggerEncoding instead of an int

Change-Id: I50bed70a5da2e94da46e894bf9136bc14c9a1b23
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-12 12:59:41 +00:00
hjk
d7c5ee7edd Debugger: Fix display selection of char arrays
... by re-using the logic we had for std::string already.

A plain char[] value did not react to Change Display Format,
Latin1 was used unconditionally.

Also rename putStdStringHelper to putCharArrayHelper.

Change-Id: I01fdf796ff49a4c99ead7b9b46274684e18e962b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-12 08:07:08 +00:00
hjk
3413130379 Debugger: Fix typo when reporting large containers
Regression since 9130cdfc05, leading to "<unavailable>"
instead of "<at least %1 items>"

Change-Id: I89166e50f27c568009ff7aeabb5adf622e303789
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-11 09:31:54 +00:00
hjk
eaec337265 Debugger: Fix display of C-style wchar_t strings
The null delimiter was not reliably found due to iterating over the
wrong positions in the string.

Task-number: QTCREATORBUG-14826
Change-Id: I3a3f2fca84648b54b12fe5fae921ce6311d4f1b2
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-10 14:28:44 +00:00
hjk
5f9f95a451 Debugger: Work around wrongly reported array size
GCC 4.9.1 + GDB 7.8 (and likely more combinations) produce
sizeof(QProcess[3]) == 0, making the dumpers report no child
entries for the array.

To work around, try to parse the array size from the type name itself.

Task-number: QTCREATORBUG-14755
Change-Id: I1f17d5d6fde6bc5fe66d2ad4a73f77185503f9ab
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-22 13:27:19 +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
6d8dfe03de Debugger: Move typeCache from DumperBase to (Gdb)Dumper
It's an implementation detail of the gdb side (and would not
be there if gdb.lookup_type were faster)

Change-Id: I135c32a1c9132ab771c8fab5abfd04fbb308891e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-10 10:45:33 +00:00
hjk
6f58f4ba50 Debugger: Basic type display switching for QVariantMap items
This is not a complete solution (that would need to pass information
on typedefs and artificial types like "QVariant (QVariantMap)"
between dumper and gui, but allows switching to compact display
for individual items.

Change-Id: I47d15356e5decf9411af4acc8fa7a0f0cfbd045f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-10 10:45:27 +00:00
hjk
c4b9af6841 Debugger: Fix typo in comment
Change-Id: I0bea97b8f452c250135a5cf7a364665ddbd24df2
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-08 06:38:38 +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
hjk
e855de4037 Debugger: Fix GDB hanging
This partially reverts commit e33da6a6b3.
GDB seems to hang while executing str(some_pointer) in some setups.

Task-number: QTCREATORBUG-14374
Change-Id: Ia678533b9122e505b21ef6659d404239995ddb81
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-05-06 06:19:00 +00:00
Eike Ziller
50fe3585a8 Merge remote-tracking branch 'origin/3.4'
Conflicts:
	src/libs/timeline/qml/MainView.qml
	src/plugins/git/gitclient.cpp

Change-Id: I0b6ec7b9a592014deb0dd2e1145b19dd6753b1c3
2015-04-15 17:45:47 +02:00