Commit Graph

252 Commits

Author SHA1 Message Date
hjk
60eacb7790 Debugger: Allow hex values to be passed for qmlcontext addresses
Change-Id: I327f40f872a2399befdbccf78e5b364ecaf86aee
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-15 06:38:01 +00:00
Orgad Shaneh
5fe0682fa6 Dumper: Fix exception with Python3
Occurred when I tried to expand an object that contains 2
unnamed unions (CPlusPlus::Token)

	File "gdbbridge.py", line 1113, in putItem\n    self.putFields(value)\n'
	File "gdbbridge.py", line 1150, in putFields\n    fields.sort(key = lambda field:\n'
	'TypeError: unorderable types: str() < NoneType()\n'

Change-Id: Ica38750435ae851b52d87dc6fcc59118d3f1d8ee
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-12 04:42:59 +00:00
hjk
7c8d20ded7 Debugger: Pass request to sort struct members to {gdb,lldb}bridge.py
The request will be honored when creating the values
instead of re-sorting in the frontend.

Change-Id: I0ea13bd9b0700a4d2ae4f0b355c56ddd37557398
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-11 08:40:51 +00:00
Ray Donnelly
f5dcc93b7e Debugger: Handle case of os.path.sep being '/'
On MSYS2, if QtCreator is launched from one of the msys2 shells
then the MSYSTEM env. var is set and our Pythons set os.sep and
os.path.sep to '/' so that it aligns with the default separator
of those shells.

fromNativePath(str) then fails to convert '\' seprators embedded
in binaries since str.replace('/', '/') is a noop. The operation
we want here is to convert all '\' to '/' anyway so this is more
explicit regardless of any opinions on our choice to dynamically
vary os.sep and os.path.sep

Change-Id: I76c05b188abca41c6a1b516c68b584e0c06e7235
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-05-11 11:23:11 +00: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
hjk
89661af04e Debugger: Fix one call to check(False)
Not much harm done, the code was meant to raise an exception anyway...

Change-Id: I81db4081b4ca583e46a826aaee2fc8fa3f186a11
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-15 11:37:35 +00:00
hjk
6965fc30b1 Debugger: Disable parts of QDate* dumper for GDB on 32 bit
Older versions of GDB (~GDB 7.4 on 32 bit) will cause segmentation
faults in inferior calls due to misaligned %ebx values in an SSE
call in qstring.cpp:findChar.

Change-Id: I44492106080f12e645f9d57828438ec70fd66ca6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-15 11:07:30 +00:00
hjk
315585056b Debugger: Properly retrieve signed internal values with LLDB
Fixes the QLinkedList dumper.

Change-Id: I1be509c16ed96edb02c540d9c87b9506e496ed2c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-14 05:59:55 +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
00199039e7 Debugger: Fix display of expandable items in GDB and LLDB
Move common code to dumper.py and debuggerengine.cpp and
fix it there.

Change-Id: I20d91d1aa7400fbdb27938c10cf40c8f6019df0a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-26 15:00:23 +00:00
hjk
55712e3ca9 Debugger: Fix retrieval of single expanded items
It was falling into the full update branch as the passed
parameter was not a list anymore.

Change-Id: I314beb3a68f8791483a599c7d5782fd454983840
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-26 12:30:53 +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
e8f8aaa263 Debugger: Fix dumper format choosing with GDB
... and further unify GDB and LLDB code paths.

Change-Id: Id89f3804c53190c4888082891fd3c3c55eceac84
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-19 06:59:01 +00:00
Christian Stenger
77be0cb57e Dumper: Fix accessing None type - again
Change-Id: I265e316a1168310f220aa449528790c4bfec41d8
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-12 13:03:44 +00:00
Christian Stenger
cce834aebc Dumper: Avoid accessing None type
Change-Id: I627f9ec1d2f67c2a870f9cebca89f5f7b8d67020
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-11 12:23:47 +00:00
Orgad Shaneh
44797cdb52 Debugger: Fix stack filename resolving on Windows
Task-number: QTCREATORBUG-13999
Change-Id: Ifc04a5592b8a07c95f152e73e802b7b686119d88
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-02 07:06:12 +00:00
hjk
f91cc66f9a Debugger: Combine some watch related GDB and LLDB code paths
Change-Id: I20e5f6f04418c931354a07bc3597f6982fcaf942
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-12 12:49:21 +00:00
hjk
9df463da84 Debugger: Convert bb extension to use runCommand
Change-Id: I528c51d2b02dccd91429778ef8c940fe5565345f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-12 10:27:33 +00:00
hjk
875d889082 Debugger: Move bbsetup over to runCommand()
Change-Id: I0a19b28d24cb570651ea84bf7cdbc9a761f85a0b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-12 07:19:48 +00:00
hjk
f65cb6ae4d Debugger: Complete switch to Python for GDB stack generation
The iteration in Python was only used for the 'native mixed'
case before. Seems reasonably fast and robust now to always
enable it. Also, make the calling code use 'runCommand'.

Change-Id: I10565a725dfaa9bf46c28739c69e9f2546498929
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-11 16:34:51 +00:00
hjk
e76c4839bb Debugger: Consolidate some GDB-through-Python interaction
Instead of calling a GDB extension command invoking a function
on the well-known Dumper instance, call the Dumper function
directly. This also makes the code more similar to the LLDB side.

Change-Id: I4b23177eb72a904721b63c578ce7fbfe204f02a2
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-11 15:00:35 +00:00
hjk
547855bf02 Debugger: Using DebuggerCommand instead of bbedit call
Mid-term goal is to reduce the amount of similar code
at least in GDB and LLDB engines.

Change-Id: I4883686a102246be3135ddc694b837b1187ac9e9
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-11 08:06:39 +00:00
hjk
4c63855f88 Debugger: Remove unused UpdateData::tooltipOnly member
Change-Id: I15c6f16a258c0d664d2378150c4b3277a29c4b5c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-06 12:06:28 +00:00
hjk
fee7cbe55b Debugger: Move 'mixed native' variables extraction to DumperBase
In preparation for re-use through LLDB. Not yet functional there.

Change-Id: Ia924f1499a1bbaebf3dccbe15152f324058b1677
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-05 12:00:57 +00:00
hjk
a20a7d099b Debugger: Move QML stack access to DumperBase
... and make it work with LLDB.

Change-Id: Idaec029942dbcc726931781caff830173f7b126a
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-05 10:55:55 +00:00
hjk
96a0f48093 Debugger: Pass all breakpoint properties to *brigde.py
Change-Id: I58ee1b106e1cd6e8ad5ce99b226860c528698520
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-04 15:32:20 +00:00
hjk
ca1f743463 Debugger: Native mixed fixes
Change-Id: I1b10b2f6a241c6061ac5ee77825aa8500cb7097f
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-04 15:30:59 +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
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
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
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
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
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
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
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
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
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
1baca8e797 Debugger: Add dumper for Qt3's (sic!) QString
Change-Id: I24d266587425a5c50ec3dcb548a29877730cbdff
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-10-10 13:25:02 +02:00
hjk
2776536a7e Debugger: Fix QHash display of "compact" keys
Add make std::string usable as "compact" key.

Change-Id: Idbfcf9d299e2dde392025166a20c3d0ab60239a6
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-09-12 15:36:01 +02:00
Christian Stenger
895421897e Dumper: Fix typo and exception handling
Change-Id: I4008d5427da7cedc0f57183a25519a1aef1fcb7a
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-07-24 16:55:12 +02:00