Commit Graph

615 Commits

Author SHA1 Message Date
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
hjk
f58ab8d723 Debugger: Fix std::set<...>::iterator dumper for GCC 5.x and C++11
Change-Id: Icaca7da1f5ae6f958ae0fdaf217bde611d049916
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-11-06 10:08:48 +00:00
hjk
34196f510d Debugger: Add dumper for GCC 5.x's std::__cxx11::list
Change-Id: Idaf6692668210838488699dcab38d1517825bda3
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-11-06 10:08:05 +00:00
hjk
9d6c63d4d2 Debugger: Move the 'break on qFatal' implementation to gdbbridge
Easier to create invisible breakpoints there.

Task-number: QTCREATORBUG-15276
Change-Id: I76ffa45f9f0de5ffbc3b82a7ef9a4ddcdfff62eb
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-05 09:42:03 +00:00
hjk
b85d8290a7 Debugger: Restrict QJson{Array,Object} display to 1000 items.
... and don't offer expansion of isEmpty() object.

Task-number: QTCREATORBUG-15270
Change-Id: Ifb76c20c6308484d38e21273a2f33c575bb72430
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-03 09:55:52 +00:00
hjk
601f6fd819 Debugger: Rename GdbEngine::{stackListFrames->fetchStack}
Same as LLDB now.

Change-Id: I8a59a977fe45e7f523eae59cbb4cd24b78ad8e7b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-02 10:19:05 +00:00
hjk
d5101b5d91 Debugger: Standardize on all-lowercase for protocol options
CamelCase might be more Qt-ish, but the backends tend to use
lowercase only.

Change-Id: I04b9b7305b54226f27b70151115050c4816f911f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-02 10:18:50 +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
e5d62f3e7e Debugger: Fix of display of object addresses
Task-number: QTCREATORBUG-15236
Change-Id: Ic8f6fd60d185b759ee13dade3a18c2d955303cdf
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-10-27 11:45:07 +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
ea39476ef2 Debugger: Do not try to treat labels as variables
They produce no values later anyway and are slow to process.
With this patch, stepping in VME::run from qv4vme_moth.cpp
takes about 1s instead of more than 40s previously.

Change-Id: I5c96966612bdb7c0120d9ebb545d6e8483cbf843
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-08 14:20:59 +00:00
hjk
97b64f6791 Debugger: Add watcher handling in pdbbridge for basic types
Values are passed through plain str(eval(...)), i.e. no expansion
of non-scalars (list, dict, ...) yet.

Change-Id: I21ceab29504e2bb43aef516f9beeca5470500fdc
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-30 11:28:54 +00:00
Eike Ziller
0ba4781bfc Merge remote-tracking branch 'origin/3.5'
Change-Id: I889b93611d1762121548fb71d1d3493e4adba313
2015-09-25 10:35:42 +02:00
hjk
f229f0dbe5 Debugger: Disable CLI use of gdbbridge.py
The detection seems to go wrong in some cases on RHEL which
are not reproducible locally.

Since the feature is not important for Qt Creator's own use,
disabling is safer than attempting to guess better.

Change-Id: I95fd56985d61b604a285e7573f8775b902bcc68c
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-25 07:12:30 +00:00
hjk
905aa55543 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
(cherry picked from commit a7dd2ed4ce)
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-09-24 12:26:43 +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