Commit Graph

615 Commits

Author SHA1 Message Date
hjk
7b462aa0bc Debugger: Startup fixes for LLDB
On Mac, don't ignore the 'attach' stop, as it causes trouble
in the Terminal case. So a terminal start needs extra
'continues' but doesn't crash LLDB anymore.

Change-Id: Iaa72e3f5cfc02d8cd1841fa57e0633109645da31
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-04 14:20:27 +00:00
hjk
b197566eec Debugger: Improve LLDB state reporting
Change-Id: I652755c09e99f9a5d9607b49850ea3350193d086
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-04 13:19:27 +00:00
hjk
d4a32fd6b3 Debugger: Implement native mixed breakpoints with LLDB
Breakpoints are hit, stack frames are identified as JS or native.
No further data yet.

Change-Id: I84a02422fd36dc7645003114dd8519bedd913c06
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-04 12:46:02 +00:00
hjk
7d4b9c4ba0 Debugger: Move some 'mixed native' code to DumperBase
Prepares reuse in LLDB.

Change-Id: I2238a94937411b80a9ec84ab738aba2146bba50e
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-04 11:30:27 +00:00
hjk
3a9b34f232 Debugger: Re-use base infrastructure for LLDB breakpoint handling
Change-Id: If32b1f421e45dc4ee446e193e03c959d7c700948
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-04 08:50:19 +00:00
hjk
24afad2c32 Debugger: Adjust Native Mixed to new JSON based protocol
Change-Id: I4a9b9b31bba24a81824303f343115ba7c3709107
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-03 14:00:47 +00:00
Eike Ziller
7005d791c3 LLDB: Fix that locals didn't show up anymore
Broke with aa39916c41
It was missing a @ marker to separate mirrored messages from actual
data.

Change-Id: Ie142055181de4fada15060108a6ba2166591012e
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-02 14:35:48 +00:00
hjk
aa39916c41 Debugger: Invert LLDB/Python startup order
Instead of starting LLDB through a Python script this now starts
LLDB directly. This did not work a while ago but seems fine nowaday.

Change-Id: I20e915070cd6addf260817c311f4160d010aa861
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-30 15:35:20 +00:00
hjk
f479c1979e Debugger: Move common dumper module code to DumperBase
Change-Id: Id411edcefbb56c480b87829062395dcb5244d2a5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-30 08:49:19 +00:00
hjk
eafde22e16 Debugger: Handle extra dumpers with LLDB
This generalizes part of the previously GDB-only code paths

Change-Id: Id32798073e3c8bcb23bfedf463bebc866c8275e2
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-29 15:42:31 +00:00
hjk
a6e9f032e3 Debugger: Use Utils::TreeModel for watch window
The circle closes, that's where the code came from.

Change-Id: Ic36ab61ec8886c9a2747aeb29a7245df3ef0b6c4
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-29 10:32:32 +00:00
hjk
c5c229b48f Debugger: Delay matplot process initialization
Reduces costs in case the feature is not requested.

Change-Id: I66da6f256baaec6ef9d40bc135942551d58e83da
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-29 08:42:39 +00:00
hjk
ed2a84c822 Debugger: Prevent LLDB choking on extra dumper paths
Change-Id: I230a05274e95430162c3f2d05de5d93bf4985b4e
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-28 17:21:42 +00:00
hjk
e9237c20c6 Debugger: Work on LLDB auto-test on Linux
Write the full command to a temporary file for easier re-use.
Un-ignore the first stop, this does not seem to be needed in
the new async setup.

In some cases LLDB is not able to extract the even the top most
frame of the stopped thread (happened 2 out of 100 runs of the
QDateTime dumper). It's unclear why. For now just report the fact.

Change-Id: I76a63bc288f1ae6f5bd9b9604a47f051912b93d7
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-28 16:29:10 +00:00
hjk
8e83b6cf01 Debugger: Update doc URL in personaltypes.py
We all know that site migrations are fully automated and do
not cause any extra work.

Change-Id: Ibb66493fa1e564c54abb21e2f9a2f16242289957
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-27 12:24:19 +00:00
Christian Stenger
ed437bb656 Dumper: Fix failing GDB startup when using MinGW
Task-number: QTCREATORBUG-13892
Change-Id: Ia843cf4d88c574013e67cacaa8484b52fdbd4b8a
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-27 11:41:12 +00:00
hjk
962649317b Debugger: Make LLDB autotest produce output on Linux again
Change-Id: I0ea21b248b51a871753f66e386fd125df1d1ead5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-26 22:09:24 +01:00
Christian Stenger
7022d73970 Dumper: Avoid output of plotting subprocess on console
Change-Id: I2e1cfc95b556b7d0c2fc1770523d43159790aae1
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-26 09:19:09 +01:00
hjk
4ea0138423 Debugger: Replace gnuplot by python-matplotlib for graph dumper
Better functionality and availability than the gnuplot version.
The feature ("Show array-like data in external plot window")
will be automatically enabled if 'from matplotlib import pyplot'
succeeds.

Change-Id: I1799534ac5f878d3e43e47289d1b563b52bb4378
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-26 09:14:08 +01:00
hjk
4c928f6099 Debugger: Disable GDB's own pretty printers when use is not wanted
Saves up to 20% on large uniform structures.

Change-Id: I98c8c942f0accac7e2db1d8b06bf7ed156967306
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-26 09:13:53 +01:00
hjk
d4bdae9a3d Debugger: Make dumper reload with Python 2.x
Change-Id: If23573fab0f951bed0f86b70500dd7e9862df887
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-01-22 12:57:15 +01:00
hjk
61c49a122f Debugger: Initial shot at native Qml-and-C++ debugging
Only for GDB now, requires a debug build of Qt, not feature complete.
To enable it, run with QTC_DEBUGGER_NATIVE_MIXED=1 and press
the 'oo' button in the debugger toolbar.

Change-Id: I28aac9db13f7067e03cc364b89cc8046fa213dae
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-22 12:39:02 +01:00
hjk
cca1030432 Debugger: Add python command to add dumpers
More flexible than hacking on the C++ side. Also registers
the custom dumper path to make it reloadable like the
"built-in" dumpers.

Change-Id: I0405f7278e28eb75d83fdd4a861f5a5c32d97a0e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-01-22 10:55:36 +01:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
hjk
d573195b67 Debugger: Improve handling of imported system dumpers
At least for a few cases (std::string, vector, ...) this can succeed.

Change-Id: Idfa4ced4cb20295472d001181a83373acd89883a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-15 11:13:22 +01:00
Eike Ziller
b5b47f7df2 Merge remote-tracking branch 'origin/3.3'
Conflicts:
	src/plugins/cppeditor/cppdocumentationcommenthelper.cpp

Change-Id: I2cf25eba1de149765a6c44ad354d606ce9de512d
2015-01-08 10:38:20 +01:00
Orgad Shaneh
ecd9c4c813 Dumper: Fix some more internal dumpers
Change-Id: If17614d1fa451bb93cfe5a6ea06af39986d7ad4d
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-08 08:04:23 +01:00
Orgad Shaneh
8f920be61b Dumper: Fix PPToken dumper
Change-Id: Ia6a062319fdcd84a16e83e8f9c96a440f7e4dec9
Reviewed-by: hjk <hjk121@nokiamail.com>
2015-01-05 08:36:31 +01:00
hjk
3743211e54 Debugger: Rework register handling
Use register names as handle, not their index in the view.
Store the raw real values, not some stringified version
as primary data.  Use subentries to break down bigger
registers into smaller entities. Also remember the
previous value of a register and show it in a tooltip.

Change-Id: I8ae3cc8766a7b211bc7cc827c734e5cf6060825c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-12-18 12:53:46 +01:00
hjk
8815990903 Debugger: Fix std::unordered_* dumpers with GCC 4.9.1
Change-Id: I5d5ed9cfc68af061970b0055b76cb563ca04ee53
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-12 13:54:37 +01:00
hjk
20396d7809 Debugger: Use Python for GDB stack extraction in native mixed mode
Change-Id: I7ca4a080c9b5e5992f44e5f3d8aa5af7296abe99
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-12 12:36:41 +01:00
hjk
62d21d123c Debugger: Remove traces of outdated attempt at combined stepping
Has not been usable for a while and will be superseded by
"native" mixed stepping.

Change-Id: I2902a98b7ad4e4b29e389e54fb6488bf711840dd
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-12 10:53:43 +01:00
hjk
48915c6231 Debugger: Rename variables named 'type' in dumpers
It's confusing in the presence of the global function of that name,
and it's better to distinguish type names and type objects anyway.

Change-Id: I3e0674dbc96a8e2b245ed61fabd2fe7cac5a72e5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-12 10:27:46 +01:00
hjk
5e19f322cf Debugger: Move listOfLocals to Dumper class
We will need access to more dumper data later.

Change-Id: Id8fe09b192ac7d2ae822a0323cda13c0e2ff81e3
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-12 10:27:18 +01:00
hjk
48c6decb07 Debugger: Remove some spaces in debug output
Change-Id: I69c4a00d4dfef91aa2727c295246845bef70b4bc
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-12-12 10:14:32 +01:00
hjk
62803ada4d Debugger: Add some convenience helpers for python dumpers
Change-Id: I7fc35ea571895024e9da597d30167e02eda7df47
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-12 10:08:42 +01:00
hjk
7b1c4d65b1 Debugger: Use stricter access test in pointer pretty printer
Change-Id: I34901ece94e9ab1d8ae929fda33ef1ee647d9d75
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-12-12 09:53:38 +01:00
Eike Ziller
541d00453a Merge remote-tracking branch 'origin/3.3'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/projectexplorer/projectexplorer.cpp
	src/shared/qbs

Change-Id: I6d91042bb48314d00be721099aed19feca74e0ce
2014-12-10 13:20:02 +01:00
hjk
6d6e8de4a0 Debugger: Use Python instead of GDB/MI to retrieve stack
This will be useful to create artificial QML stack frames.

Change-Id: I41cb87f8dea69d88695fea46a1ae2b0270cbec1a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-08 13:04:24 +01:00
hjk
d9a527f8ad Debugger: Fix QV4::Value dumper
Only 64 bit for now.

Change-Id: I622ff5ab8632a73901e83f5331dcd2c3ea129d3c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-03 15:57:36 +01:00
hjk
3d4cedb1f0 Debugger: Fix map dumper with LLDB-320.x
The underlying problem here is still that we can deduce
the item type from the map type except by string manipulation
and type lookup. Which fails at times.

Change-Id: Ibe6a8ca1fbd84c43c7d31b65e017792d1b6a1e0b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-03 12:08:08 +01:00
hjk
a4a7a4b25f Debugger: Add command for simpler dumper reloading
... to facilitate shorter round trips in dumper development.

Change-Id: Ie457293fd137528d74008fc11137b47d92f3859d
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-12-02 10:40:10 +01:00
hjk
f9f2a75499 Debugger: Fix QRegion dumper on 32 bit for Qt < 5.4
Change-Id: I2554ae77154d88185120bf661f9e732485d92a28
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-02 10:39:01 +01:00
hjk
bf9a3b2020 Debugger: Fix LLDB reference display for LLDB 320.x
There is seemingly still no proper API for that, and
the old hack broke. Use a new one.

Change-Id: I9e638ca1fbd84c43c7d31b65e017792d1b6a1e0b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-11-28 14:55:03 +01:00
hjk
f395bc9076 Debugger: Fix reference dumping with LLDB-300.x
The old code worked around some issue that is not present
anymore and breaks now by itself. So remove the workaround.

Change-Id: I41a017ced91198bdc4e822cfcc1c45580945a773
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-11-26 15:11:31 +01:00
hjk
298e2de7df Debugger: Centralize handling of optimized out values with GDB
There were a couple of situation where the is_optimized_out flag
was not used and later produced (caught) exceptions on access,
or where the still availably type was not shown.

Change-Id: I7ad5aa09a19357e50739d9fdf32f7423e30fe011
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-11-18 16:14:50 +01:00
hjk
e6020b7067 Debugger: Report stack after frame switching with LLDB
Change-Id: Ibbaa52dc8c0703f3245cac2ca15b942e3006993a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-11-17 09:45:50 +01:00
hjk
195400b42e Debugger: Explicitly convert division result to int in dumper
This can cause "TypeError: 'float' object cannot be interpreted as
an integer" otherwise.

Change-Id: Icae026f8f47edb686e22ce417f3bbdf41bbf0bc1
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-11-15 13:29:51 +01:00
hjk
7066e3348d Debugger: Improve tooltip for out-of-scope items with gdb
Previously, hovering over 'i' when stopped in main()

   int foo() { int i; }
   int main() {}

produced a tooltip without contents, now there is an
item saying "<not accessible>"

Change-Id: Id4de72541f74af93ba65c2a9508cf21e1dcd6569
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-11-14 13:38:07 +01:00
hjk
1fef3c41b9 Debugger: Fix QRegion dumper for Qt 5.4
The layout has changed in ee324e4ed527.

Change-Id: I4b5f47f6526bf1218fdb79dc625f7482af21012b
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-11-07 13:57:10 +01:00