Commit Graph

933 Commits

Author SHA1 Message Date
Eike Ziller
8a77eacf8d Merge remote-tracking branch 'origin/4.0'
Change-Id: Ied609608f6b12aa923c67777bc5a273c4d8fbcbb
2016-04-15 10:07:55 +02:00
hjk
9425f28865 Debugger: Hex-Encode LLDB disassembler comment fields
They may contain quotes and possibly other data breaking the transport
protocol.

Change-Id: I53795bd1de54385e8d9c50088368fdc768db217b
Task-number: QTCREATORBUG-15635
Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-14 12:49:59 +00: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
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
Christian Stenger
406c395a42 Debugger: Fix LLDB operations with XCode 7.3's lldb-350-0.21.3
Task-number: QTCREATORBUG-15965
Task-number: QTCREATORBUG-15945
Task-number: QTCREATORBUG-15949
Change-Id: If68cb17f6c627ede2d7f5381dbb4188f27fc66d5
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-08 14:44:15 +00:00
hjk
e9b1e493c2 Debugger: Move struct sorting logic to generic parser
Backends only have to specify whether an object members are sortable
in principle (e.g. all structs), and some numeric 'sortgroup' value
for member items (higher values are always sorted on top).

Change-Id: I10ce94580374fed48a35f058a575a1408d6801af
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-04-08 10:22:31 +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
b7d8d9ba3a Debugger: Add a QBitArray dumper
Task-number: QTCREATORBUG-15974
Change-Id: Iafb0d94f5d780b3165d8bb749429754a5de051e3
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-04-06 06:20:04 +00:00
hjk
0408aee321 Debugger: Add dumper for std::valarray
Change-Id: I80d6a11714777d813dc0a6917a4dfa826d013cb9
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-04-06 06:18:40 +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
Christian Stenger
9905eb6f75 Dumper: Fix fileName offset for Qt5.5 on 32bit
Change-Id: Iffd6d70c7d283b932f8946447b27f3e7ba1f5e98
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-31 05:29:47 +00:00
hjk
c371166904 Debugger: Fix import of system GDB pretty printer
Task-number: QTCREATORBUG-15923
Change-Id: I9b8d343f39dd34c33eff05c369bbceb7a581c995
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-23 08:56:43 +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
hjk
db3217af36 Debugger: Make QVariant dumper more robust
Change-Id: Ic9ce15eaf88f8a5267c9e8d3f9d049d9b2035eb1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-21 15:03:03 +00:00
hjk
9e16554e25 Debugger: Be a bit more robust with LLDB disassembler
LLDB 3.8 on Linux claims non-existent files to be the source of
disassembly.

Change-Id: I45a47cf5e7faad7ccd6dbb9879c8328fc2496b95
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-19 14:22:39 +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
Tobias Hunger
07dd7d5fe2 Update License according to aggrement with Free Qt Foundation
* Update license files in various places
* Update the license template
* Update README.md and appdata.xml

Change-Id: I0ae9365b15364728165e79ba8ad86dfdd6cb9ddd
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-01-15 14:04:27 +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
Eike Ziller
ad6c0f9bc6 Merge remote-tracking branch 'origin/3.6'
Change-Id: I8f034f91de04e319dd5ba24b8837f1daca54d918
2016-01-07 11:01:14 +01:00
hjk
31abbba961 Debugger: Make Watchpoint setting more robust with LLDB
At least on Linux/LLDB 3.8 trying to set watchpoints at fixed address
produces breakpoints with .IsValid() == False that choke on accessing
certain functions like .IsOneShot() used e.g. in breakpoint data
reporting.

Now report the .IsValid() state and skip the reporting of the "bad"
fields.

Change-Id: I742ed171f37763f3dbbd896173c527817edf3a6e
Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-06 13:30:43 +00:00
hjk
e22f8e37e4 Debugger: Fix transfer of object address with LLDB
For opening memory editor etc. This was a regression after protocol
changes in 525c33f99.

Change-Id: I519ab744122547bd5d0094675dbd471d8e77e98c
Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-06 12:09:42 +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
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
31eb7c203d Debugger: Add dumpers for some of libc++'s std::{set,map,multimap}
At least for simple key/values (int etc)

Change-Id: Ib60017347a9f28f1994f7db78c0607f3fdbfac2e
Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-05 15:20:51 +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
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
hjk
58bec40246 Debugger: Force passing DYLD_.... environment variables to inferior
Apple's LLDB has changed behavior between 330.x and 340.x.

Newer versions seem to actively delete the DYLD_IMAGE_SUFFIX,
DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH environment variables
from the scripting environment.

Change-Id: I0b7bbdce0975e969b1dae5770fd9a99328f241be
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-12-08 16:29:17 +00:00
hjk
7c08f5a9b0 Debugger: Further improve base class dumping with LLDB
... in the presence of empty base classes. This now actually makes
the Inheritance dumper test pass.

Change-Id: I92ada5da46accb6e7eaff58ce5dc329484ef0909
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-07 12:38:50 +00:00
hjk
2714a7e981 Debugger: Remove spurious quotes in gdbbridge.py output
Breaks the parsing and might trigger an endless loop.

Task-number: QTCREATORBUG-15352
Change-Id: I832d26441d8be3339b4de6d59a33c97f1d7124c5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-07 08:17:01 +00:00
David Fries
ac8626aa78 avoid None.replace in fromNativePath
This is with gdb 7.4.1 linked with python 2.7.3

Change-Id: Idf921afd37d72056874c7179c899f62f791f9282
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-03 15:31:43 +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
0f9e2baa1b Debugger: Adjust QFileInfo dumper for Qt 5.7 on Linux 32 bit
Change-Id: Idb14d81aa3546af0e7a21922fbb6d551ecbc1b06
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-11 13:57:37 +00:00
hjk
aa221121b6 Debugger: Pass down expanded inames in LLDB tests
... as well as the 'autoderef' flag. A lot of dumper tests were
failing even though the dumpers themselves were ok.

Change-Id: I198784d95eb0004e81bfab995121e048b1722c66
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-11 13:16:17 +00:00
hjk
aed9c46ea6 Debugger: Try to handle empty base classes more gracefully with LLDB
Empty base classes are counted towards GetNumberOfDirectBaseClasses()
but do not get reported in GetChildCount(). Fix the difference by
manually creating empty base class entries in the report.

Change-Id: I2650d9f5234302c5bf2fa0e62a886d3a39fc11db
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-11 13:11:32 +00:00
hjk
45b08e21a2 Debugger: Fix QHostAddress dumper with Qt 5.7/64 bit
Change dd920024 in QtBase introduced padding in the QHostAddressPrivate
structure.

Change-Id: I92292937cf7bdd539764f52c18b70d926e39cf29
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-11-10 12:12:24 +00:00
hjk
64426fb772 Debugger: Adjust boost::unordered_set dumper
... to Boost 1.58

Change-Id: I5656e0c32e1f7df0b2b74a2f9ad7d468997a8904
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-10 07:57:23 +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
d6bb579a41 Debugger: Fix QAtomic* and QShared* dumpers with Qt 5.6/C++11
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: I572f727eb9dab37ac1ca07594d55bea723050817
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-09 13:49:25 +00:00
hjk
a4a9529403 Debugger: Make boost::container::list autotest pass again
... by adjusting the expectations on the exact type display
and trying two possible versions of structure member names.

Change-Id: I817aeb787b905cb22c6f68856043a29db3e79e59
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-09 10:08:20 +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
e5e3243dd1 Debugger: Fix std::string display for GCC 5.x
Task-number: QTCREATORBUG-15110
Change-Id: Ic1bcdf1b73e0013068e56a5d8804da42cdb2c237
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-06 14:05:07 +00:00