Commit Graph

615 Commits

Author SHA1 Message Date
hjk
dd7eff0371 Debugger: Add more roundtrip markers to LLDB protocol output
Change-Id: If2e3fc51dab800a9e347da7975eb89547acfb945
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-09-07 10:43:48 +00:00
hjk
58e391fe18 Debugger: Remove unused bits of pdbbridge.py
Change-Id: I56f104f21dfded2e3beab7269b6e83d64c1cc211
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-03 06:40:36 +00:00
hjk
26d1113f4d Debugger: Improve type display in PdbEngine
... for non-builtins. Split the "<foo instance at 0xdeadbeef>" into
a value "@0xdeadbeef" and a type "foo".

Change-Id: I7cdc83c34c064cc48b88d549157b07268f020225
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-03 05:59:59 +00:00
hjk
1535fccffd Debugger: Replace unneeded requests for updates in PdbEngine
... by more direct flushing on the dumper side.

Change-Id: I53d91e564bb948e3c934242fec4f23f36ee8c10e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-02 13:38:47 +00:00
Christian Stenger
33fc9e209d Debugger: Handle anonymous function arguments
Change-Id: I1caa0ace47d59ea182470795634c00ef5fd7c345
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-09-02 13:20:25 +00:00
hjk
5829b22b03 Debugger: Also show instruction bytes in LLDB disassembler
Change-Id: I9676e458153b745fc75a5da271524e73959fba03
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-31 11:51:19 +00:00
hjk
d16aed4304 Debugger: Add display of mixed disassembler output for LLDB
Change-Id: I4997ce4fb4ce6a61cca67e36abb84c61a1c120f5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-28 13:44:49 +00:00
hjk
47c79a102f Debugger: Fix handling of large registers with LLDB
Change-Id: I12a7a9e43922291c6bff77be5fefea4db6cb5482
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-28 11:11:22 +00:00
hjk
afa6bb9dd8 Debugger: Make (sub-)registers editable
Change-Id: Ibca2808513b6784b65d5c7223717a8b1d930c381
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-08-28 11:04:12 +00:00
Christian Stenger
a40646fd73 Don't treat pdbbridge.py as argument
Change-Id: I004dd5eab6733efaca4032e4fdb432f54c5f7114
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-08-25 09:16:35 +00:00
hjk
d0655e5cf2 Debugger: Remove unused code from pdbbridge.py
Starting from unused command line commands like
'up' and 'down' up to the (Pdb) prompt handling.

Change-Id: I93ab5025a52b259e3f9d80f3251e88bdb18a3467
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-24 12:28:08 +00:00
Eike Ziller
8eaaef96aa Merge remote-tracking branch 'origin/3.5'
Change-Id: I65968dd02ea6bdd15f304ae567dd0c02238e6949
2015-08-20 13:23:13 +02:00
hjk
aa4485af85 Debugger: Rework Python Debugger
The (re-)enables basic stepping, data display, frame selection etc
for Python 2 and 3. Arguments passing, jump to line etc.
don't work yet.

Change-Id: I8af03e5905092360eb268ba3081a1236b1f8577f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-20 09:15:23 +00: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
1b417fd78c Debugger: Use qtHookData to extract Qt version when possible
This avoids inferior calls, i.e. is faster and more robust.

Task-number: QTCREATORBUG-14350
Change-Id: I9f21eda6e2e3950eaaca90a35afb885e76e789d8
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-13 14:03:00 +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
f020edc287 Debugger: Fix QJsonDumper with LLDB
Change-Id: Ied299468a3f125540894278841114591cfecb02b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-12 13:55:01 +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
1b5e5656f6 Debugger: Fix display of QByteArrays constructed from raw data
The sanity check on sizes introduced in 2ad602bb was too harsh,
marking the fromRawData() case (alloc == 0, size > 0) as invalid.

Change-Id: I9d7e0cedbc3f35024281829cfb1f6fa2e17a1573
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-11 10:31:00 +00:00
hjk
884be5128f Debugger: Show QDateTime also for non-default timezone
Task-number: QTCREATORBUG-14853
Change-Id: Iaf4501878df15bd55b49d4daab64ea280e14663b
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-11 10:30:00 +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
427c32ccb0 Debugger: Fix Jump To Address in LLDB disassembler on Linux
lldb.thread.RunToAddress does not seem to hit anything on Linux.
Fake it by setting a temporary breakpoint + continue.

Change-Id: I533c8fb42c9a3d1ac1e5cc23eae8162a3455fb9a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-10 14:04:48 +00:00
Orgad Shaneh
fff0a27103 Dumper: Display "void" for VoidType
Useful for void template arguments

Change-Id: Ifa85f36477dbe664525233668915a1f872042438
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-08-03 09:05:59 +00:00
Orgad Shaneh
221ab36025 Debugger: Fix expansion of anon nested types
AttributeError: 'NoneType' object has no attribute 'startswith'

Change-Id: Ieb08c33cce06ad484de856b249ab4723b01d520e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-28 04:58:55 +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
2ad602bbe5 Debugger: Put some restrictions on byte array dumper
This makes 100M a hard limit, reducing the likelihood that an
uninitialized byte array will look valid.

Change-Id: I51dc5f39e0c7327faa8c1d0640934a6074d8c559
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-22 11:34:45 +00:00
hjk
d327a11030 Debugger: Sort vtable before data members
... when listing members of a struct in the Locals and
Expressions view.

Task-number: QTCREATORBUG-14767
Change-Id: I5089dd3bcba40ab335be164c5de2f2d70c3ed4f4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-07-21 14:59:44 +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
5b583ad67e Debugger: Add dumper for QUuid
Change-Id: I171ac0130009b9610c766deaa2d85aa095e33d6f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-07-09 06:54:01 +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
hjk
e2b0641f28 Debugger: Adjust tests after change to member sort order
Change-Id: Iff3b9781ad9842b325d346a77514aa7a935d4570
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-07 14:12:28 +00:00
hjk
68a707458b Debugger: Remove workaround for older LLDB
... that breaks QHash display for keys with value 0.

Task-number: QTCREATORBUG-14451
Change-Id: I8578d9f1d14c367beaccabc5373bd75860ee454b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-07 13:44:54 +00:00
hjk
c691cca48d Debugger: Always sort base classes first when showing a structure
Simply relying on '[' < any_letter is not good enough in the
presence of uppercase identifiers.

Task-number: QTCREATORBUG-14637
Change-Id: Ib0e305c0b86f3b117c07de18cde00b14f424a7c4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-07-06 08:56:11 +00:00
hjk
84d06d0ec6 Debugger: Remove LLDB's Dumper.defaultValue
This was needed with earlier, now unsupported versions of LLDB to
provide a target context for evaluation of expressions.

Not needed anymore since SBTarget.EvaluateExpression() exists now.

Change-Id: I31871937832439dbd98b763ac77eab4db56ef2ee
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-06 06:04:27 +00:00
hjk
565df2cb06 Debugger: Remove warning on variables without names
They can appear for unnamed function parameters with default values,
e.g. void foo(int = 0).

Change-Id: I02cad093247f4508e7d4c4fd3f143c9ad8d5ebd1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-06 06:04:17 +00:00
hjk
fdde69a5a5 Debugger: Add dumper for various QJson* classes
Needed to debug the QmlDebugger.

Change-Id: Ia0b50dac2146fcc81990b78eb8de30c8e763bba2
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-02 06:58:04 +00:00
hjk
f886c70199 Debugger: Be more robust in case of unexpected non-ASCII output
Also correct typo in function name.

Task-number: QTCREATORBUG-14629
Change-Id: I193efc3a002f83b0091f93e087f2feb19dc4f5c1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-25 11:37:18 +00:00
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
ec3695be89 Dumper: Improve Token dumper
Show identifier/literal when available

Change-Id: I4fd623f802db7bce14f8887c5b3ba2fe6867f632
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-06-12 06:24:08 +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
hjk
5309e217e4 Debugger: Consolidate GDB and LLDB "updateLocals" code paths
This splits the bool setToolTipExpression() operation into
a bool canHandleToolTip(), and the actual processing of
the request, which is mostly identical to the handling of
a watcher.

Handling a watcher is now mostly the same as a full Locals
update, except for the 'partial' flag. Pushing the handling
of that down to the bridges gives identical code paths
in the gdb and lldbengine. Move that to the
DebuggerEngine base class.

Change-Id: I3861b43e8630c7e7bd57fcd549b2a2387e3d4869
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-10 07:40:27 +00:00
Jack Andersen
39df03aba7 Debugger: LLDB strictly requires bool values for breakpoint API
Change-Id: Ia4b3cfb2ef41df8c76800eb4da597f7cb5f770c4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-05-27 09:04:50 +00:00
Orgad Shaneh
237cfd1f77 Dumper: Add a dumper for CPlusPlus::Class
Change-Id: I619d31f307844349095c81defc675c57fcaa4de0
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-05-19 14:53:53 +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
5c58293a36 Debugger: Some Python 3 support for PdbEngine
Change-Id: I052bc093086a5da0b2cbd4e99df32e42627ceaf5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-05-08 10:50:34 +00:00