Commit Graph

33 Commits

Author SHA1 Message Date
David Schulz
5169469911 Debugger: add <load more> functionality to array dumper
Change-Id: Ib44748fa3218788ca20a99b0a0f4cd85716dde06
Reviewed-by: hjk <hjk@qt.io>
2023-02-27 08:35:32 +00:00
Christian Stenger
885c6c1f0e Pdb: Change shutdown handling behavior
Directly finish the debugger when program ends if the
debugger is in running state as this feels more natural.
Only get into post-mortem handling when stepping.

Change-Id: I6ac6600a7cb8f58a003a6e4783174864ed5e89d8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2023-02-14 06:44:07 +00:00
Christian Stenger
ab4516c85c Pdb: Make another builtins usage implicit
Amends f6afedeea6.

Change-Id: Idc0ffb9f0c24515475334a847382fc84c5c03e2e
Reviewed-by: hjk <hjk@qt.io>
2023-02-10 15:31:03 +00:00
Christian Stenger
f6afedeea6 Debugger: Do not crash when using a builtin as value
Explicitly use str(), type() and similar from builtins
to avoid confusing the the debugger when these builtin
functions are overwritten by the script which is going
to get debugged.

Fixes: QTCREATORBUG-28733
Change-Id: I6b7bd1d7474972d0533d12a1bc45bb59db7f39b5
Reviewed-by: hjk <hjk@qt.io>
2023-02-10 12:35:26 +00:00
Kai Köhne
4e9c1d126c Replace GPL-3.0 with GPL-3.0-only
GPL-3.0 is deprecated by SPDX.

Change done by

 find . -type f -exec perl -pi -e 's/LicenseRef-Qt-Commercial OR GPL-3.0(?!-)/LicenseRef-Qt-Commercial OR GPL-3.0-only/g' {} \;

Change-Id: If316a498e3f27d2030b86d4e7743b3237ce09939
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-10 08:05:04 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
David Schulz
0776340ad8 Dumper: unify Codestyle
generated with autopep8 and the introduced setup.cfg

Change-Id: I5b55a7937f2cde81be59d2b434e94ada1a4af5ab
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-28 08:35:05 +00:00
David Schulz
e17c96cf11 Dumper: move global enums and functions to utils
Change-Id: I11f5f0d970cd23a5fd907d33daa3cb8a441d0c58
Reviewed-by: hjk <hjk@qt.io>
2020-02-24 07:47:40 +00:00
Christian Stenger
bcde926257 Debugger: Stop cleanly after post mortem debugging
..instead of trying to start over. Starting over may work
but may also end up in strange issues which must get
handled on the user site otherwise.
Especially relevant for pyside projects that are using
QApplication and similar where the old application
instance has to be destroyed before another one can be
created.

Change-Id: I6af132da8499ef4ed983491cdc423fa73ea9ba32
Reviewed-by: hjk <hjk@qt.io>
2019-11-13 05:42:19 +00:00
Christian Stenger
49930aa5f9 Debugger: Improve pdb debugging
When a script used __file__ to refer to other
files by constructing relative paths it ended
up trying to use a file relative to the pdbbridge
instead the original python file.
Fix this by bringing the bridge closer to the
original pdb code.

Change-Id: I22dda440c78349bfd3dcf4ce748042cc77eb4bee
Reviewed-by: hjk <hjk@qt.io>
2019-11-12 12:36:45 +00:00
Eike Ziller
8e376ab340 Merge remote-tracking branch 'origin/4.10'
Conflicts:
	src/plugins/baremetal/iarewtoolchain.cpp

Change-Id: I483e81d7e920e724fb7cde84a8f6fa9bce4cd518
2019-07-25 09:38:09 +02:00
Christian Stenger
5f71a27f7b Python: Cleanup pdbbridge
Change-Id: I687f4dd777e7d3bdb4fd54e04b4c12cd66137bfb
Reviewed-by: hjk <hjk@qt.io>
2019-07-23 05:35:40 +00:00
Christian Stenger
8f2397b100 Pdb: Improve python debugging experience
Rename internally used classes and suppress them
explicitly while debugging python code to not display
them on the Locals and Expressions.

Change-Id: Ia396243172b2d138c9f4c81b2f1ed0fec0dce3d3
Reviewed-by: hjk <hjk@qt.io>
2019-07-23 05:35:27 +00:00
Christian Stenger
90392397cb Pdb: Fix missing marker for locations on Windows
When parsing the file path of location information the
GdbMi parser expects UNIX-style formatted paths.
When debugging with the pdb on Windows we reported
Windows-style paths which in turn made the parser fail
and the stack never contained a file name and the
current location also had never a marker displayed.

Change-Id: I5216bbaf39ceead63efe8426561f132de3cd04a2
Reviewed-by: hjk <hjk@qt.io>
2019-07-23 05:34:42 +00:00
hjk
e94c87f1a7 Debugger: More quote cosmetics
That's a follow-up to 88e79e16a6a91

Change-Id: I19725bca1c547bd961094f2d00e85e170b2be33e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-11 12:56:48 +00:00
hjk
5fb2dc6e47 Debugger: Some dumper code cosmetics
Mostly quotes, remove some unneeded comments, ...

Change-Id: Ie3f410ac84e6cfe48e7971af948326abc21f2554
Reviewed-by: hjk <hjk@qt.io>
2016-11-10 19:59:47 +00:00
hjk
6913f90384 Debugger: Ditch Dumper.stripClassTag
It doesn't seem to be needed anymore, and if it were, it'd be the
task of the back-end specific fromNativeType() functions to sanitize
type names.

Change-Id: I7c6af40aeacb2dbaaf73143e9fdcc1d866bf3f3d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-10-04 12:53:52 +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
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
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
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
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
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
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
hjk
aa67078276 Debugger: Implement basic value assignment for PdbEngine
Change-Id: I505c3e9c4a239ed381d525b5acaf1acf3a06a59a
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-13 17:05:29 +00:00
hjk
055c4ecb53 Debugger: PdbEngine cleanup
Change-Id: I39f072fe819da746c624e6028b0e5e17f1f1f111
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-13 16:12:16 +00:00
hjk
5442d144b6 Debugger: Hide PdbEngine infrastructure from itself
Debuggers running inside the debugged application are weird.

Change-Id: I2452e3653221c8f585123852ea113bd2fdfd08ed
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-13 15:01:39 +00:00
hjk
d479701591 Debugger: Start moving PdbEngine to event based parsing
Change-Id: I63e06045b54226636280678ae7db8326a3e5f02e
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-13 14:51:39 +00:00
hjk
a7fce39103 Debugger: Start moving PdbEngine to common Gdb/Lldb base architecture
That's still not meant for "production", but just the "3rd use case
needed to get abstractions right".

For testing, remove all build steps, and use a custom run step
with executable /usr/bin/python and argument pointing to the
main .py file.

Change-Id: I6ae6ed08597896ea979ee58e73c546c7892e8be2
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-13 08:54:14 +00:00