Commit Graph

1407 Commits

Author SHA1 Message Date
Eike Ziller
a3ef2a6d00 Merge remote-tracking branch 'origin/11.0'
Conflicts:
	src/plugins/projectexplorer/miniprojecttargetselector.cpp

Change-Id: Ie831644eb1c69beed6791cbc67cbfb9309dcd351
2023-08-29 08:47:29 +02:00
Marcus Tillmanns
eb17f4c2bf Debugger: Improve libc++ std::string dumper
Use isLldb and isGdb instead of exception.
Uses name based lookup in case of gdb instead of try/except

Fixes: QTCREATORBUG-29526
Change-Id: I6c3aa94503a519331395bd4249c6bf6488c8333f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-28 11:41:08 +00:00
Orgad Shaneh
4ad3925da4 Merge remote-tracking branch 'origin/11.0'
Change-Id: I5cdff1f5db3fae89beef3d27316b21440541bb1c
2023-07-30 16:24:15 +03:00
Cristian Adam
e321b3d6fc Debugger: Allow usage of Python 2 based GDB versions
Amends 7a210c41b4

Fixes: QTCREATORBUG-29440
Change-Id: I5991f7954c4831b732ea2b391e5542fab96a308e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-07-27 10:25:05 +00:00
Marcus Tillmanns
77edffe3cf Debugger: Support linux remote debugging with LLDB
Adds support for Linux remote debugging with lldb-server

Change-Id: I3ee08704a3116030111df75273a46a2e4888f98e
Reviewed-by: hjk <hjk@qt.io>
2023-07-06 14:22:50 +00:00
Eike Ziller
26e96bfad8 Merge remote-tracking branch 'origin/11.0'
Conflicts:
	src/plugins/debugger/debuggeritemmanager.cpp

Change-Id: I9d99d13feff9315f52eacbd84857c63cb69bf804
2023-07-03 10:24:09 +02:00
David Schulz
596cd204e1 Dumper: fix array 10000 format
Fixes: QTCREATORBUG-29196
Change-Id: I23ddb17ac3f378b6602057c1964ef5984b83e245
Reviewed-by: hjk <hjk@qt.io>
2023-06-30 07:47:27 +00:00
Eike Ziller
606be1f69f Merge remote-tracking branch 'origin/11.0' into work
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs

Change-Id: Ib4653a1ce75c7cce658f4bb843481de014d0fcf7
2023-06-26 12:12:58 +02:00
Marcus Tillmanns
456a019f2d Debugger: Don't spam app output
Only errors should be displayed in the App output.
Everything else is just noise.
To keep the information for debugging purpose we log it to the
Debugger Output View instead.

Fixes: QTCREATORBUG-27160
Change-Id: I37301edd2f6638e2b4152d1bf7b89a40c9c3c0af
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-06-26 07:40:58 +00:00
Marcus Tillmanns
31c6ff495a Debugger: Fix remote debugging macosx apps
Change-Id: I5328069ba9b82bb66dfa2c1e0d148a717d594a4b
Reviewed-by: hjk <hjk@qt.io>
2023-06-23 11:57:34 +00:00
hjk
1e7f68e296 Debugger: Fix Gdb CLI dumper output
Patch from hunk #2 in the report, hunk #1 was handled by 76260f8038.

Fixes: QTCREATORBUG-28659
Change-Id: I674b742869f8b834d039fbbfc599a3261d76b054
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-06-22 06:16:10 +00:00
David Schulz
c7b8ed520d Debugger: avoid recursive pointer type lookup
the std::nullptr_t gets reported as a pointer type with std::nullptr_t
as the target type. In order to avoid a recursive lookup check whether
the target type name is identical to the pointer type name.

Fixes: QTCREATORBUG-29291
Change-Id: I25373bf56b5538b9e5c14c34b9a5e501b5803fea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-06-19 17:18:18 +00:00
Marcus Tillmanns
7a210c41b4 Debugger: Add support for newest libcxx std::string
Fixes: QTCREATORBUG-29230
Change-Id: Ie3e0d0d56a1b07767ea702a03b2390b42a478376
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-06-19 12:32:14 +00:00
David Schulz
28d1d3ffe1 Debugger: support piping the python dumper to cdb
Fixes: QTCREATORBUG-29000
Change-Id: I7454ded07829d06a33dc1b2ec95a838ca977ca95
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-04-20 12:51:22 +00:00
Eike Ziller
2bc37de42b Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/plugins/python/pipsupport.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/qtsupport/examplesparser.cpp
	tests/auto/examples/tst_examples.cpp

Change-Id: I00273622423fa99d41621969f6ecbbdaa0e18664
2023-04-13 15:59:08 +02:00
Marcus Tillmanns
cb4074713f Dumpers: Fix std::string for clang >= 15
libc++ has changed the layout of std::string again.
(see https://reviews.llvm.org/D128285)

This patch adds checks to differentiate between the two versions.

Fixes: QTCREATORBUG-28806
Change-Id: Ic21c488cf1c173120beddf414ca39040dfaba096
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-04-05 09:16:45 +00:00
hjk
de546ff3ec Debugger: Support piping dumpers into gdb
This allows using dumpers available on the host being used from
remotely running gdb. No lldb/cdb yet.

Task-number: QTCREATORBUG-29000
Task-number: QTCREATORBUG-16246
Change-Id: Ib1a40a8c0284dcf41e8800d70ca3e632c699b2fa
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-05 06:26:11 +00:00
hjk
2766b4004b Utils: Continue Environment/EnvironmentChange consolidation
Make Environment a stack of changes that gets "expanded" to
a full environment before things are actively accessed.

Later this expansion should be done lazily if possible.

Task-number: QTCREATORBUG-28357
Change-Id: If1c7bfdb9f58b81e71c51ed87ee75d6964a47019
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-03-24 07:45:35 +00:00
Marcus Tillmanns
cdfe9462af Debugger: Fix "Run in Terminal" with lldb
Previously lldb never actually attached to the process running
in the terminal, but started its own copy.

Since the process is interrupted by the terminal stub already,
code was added to automatically continue the process.

"Start and break on main" and "Run in Terminal" also did not work
together and are now fixed.

Change-Id: Iaeb6e7dd0f511f3bf195ab5d0008856b310615d9
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-13 14:37:48 +00:00
Artem Mukhin
5c0a956e8c Debugger: Fix GDB MI output parsing
When using `lldbbridge.py`, Python throws `TypeError: string indices must be integers` because `gdbmiparser.parse_response` cannot parse the multiline output.

The bug was introduced in bb11788.

Change-Id: I5faae4c3d034c0f159e9c1e473b6929ba79b8272
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-03-12 11:16:05 +00:00
Eike Ziller
36d9341397 Merge remote-tracking branch 'origin/10.0'
Change-Id: Idf151b6cfe87957cf905e67aab6b1275b9f0506a
2023-03-06 08:24:18 +01:00
Christian Stenger
5ea655cabd Dumper: Fix dumping QDir with Qt6.6
Change-Id: I7ef37026c638f7e77e4e34af40c3ecff1e40e8b3
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-06 07:11:05 +00:00
David Schulz
1124a75948 Debugger: Fix highlighting values and members in memory view
Fixes: QTCREATORBUG-23681
Change-Id: I1420385d0c923be0ae4dd7ef2662263b88623333
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-03 07:04:18 +00:00
Eike Ziller
87ede95b5c Merge remote-tracking branch 'origin/10.0'
Change-Id: I7bd186df0bfae7906e980e9c2c811f8dcf29750d
2023-03-02 10:17:58 +01:00
David Schulz
f3cbd506dd Debugger: Avoid looking up qt symbols globally to get the qt namespace
This can get very expensive for targets that have a lot or big modules,
but are not linked against Qt. On the downside we might not be able to
identify Qt namespaces in static builds.

Task-number: QTCREATORBUG-18287
Change-Id: I90e0c4afcde17fd81d49017e828ce59f0abe9b5c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-01 11:43:19 +00:00
David Schulz
fb8182ca7c Debugger: fix QJSValue dumper for Qt >= 6.5
and disable the QV4::Value dumper for that version.

Change-Id: I31a0ddba2bdab3b196e4fc5298fd8e7c10f9dc92
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-01 09:51:07 +00:00
David Schulz
8288a4c563 Debugger: fix dumper for QVariant containing a QList<int>
...for Qt 6.5.
Found by dumper tests.

Change-Id: Ibb9ccf72a5f18e203e37123f1fc5458142bd4efc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-01 09:32:27 +00:00
David Schulz
a4fb9e20cb Debugger: improve dump time for various msvc std containers
... by caching the info whether we have a debug build. This avoids
expanding members of the container to check for a potential offset of
the actual data.

Change-Id: I4d7ac83003c303185ae51d57f0f0571b627edf22
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-27 12:26:37 +00:00
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
David Schulz
b625e8bb9b Debugger: improve dumping Qt pointer types
Adding the data as pointers allow casting the data to the actual derived
class

Change-Id: Id1b421c2729c6da8bf17054e39b4f1e8d8ff2cfa
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-02-21 08:45:59 +00:00
David Schulz
1a575cd2df Debugger: Fix printing of pointer to multiple inheritence base class
...for cdb when we have no nativeValue. This is the case whenever we
have a container like std::vector, QList or a c array to the base class.

Fixes: QTCREATORBUG-28337
Change-Id: I18c63dfbc207d76bf41d85d5da83f7f4603504f9
Reviewed-by: hjk <hjk@qt.io>
2023-02-21 08:45:49 +00:00
Christian Stenger
beac91ac81 Dumper: Fix std::variant on Linux
Amends 2c39db8eb7.

Change-Id: I22e9e2d25d5353cf2e818b7e2fa9f52557dbdda5
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-15 14:24:49 +00:00
David Schulz
2c39db8eb7 Debugger: modify dumper for std::variant
Directly display the containing value without the need to expand the
variant. Additionally fix the dumper for Windows and add tests.

Change-Id: Iaae49470750fa3659339331e1518e13020df7938
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-15 08:23:18 +00:00
David Schulz
3a2b49aafa Debugger: test std::optional dumpers
Change-Id: Iae177dd3448a861e93935d02388ea6af187bd9f3
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-15 08:23:13 +00:00
David Schulz
ab9b5357f9 Cdbext: fix expanding lamba captures
Change-Id: I2c1c64e3258cec503f83dbf561a734b4694592c4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-14 13:21:45 +00:00
David Schulz
e47dae643a Cdbext: lazy type lookup
Postpone the lookup until we need the type id. This potentially skips
the lookup for unresolvable types that are just to parse template
parameters. Also cache types we already checked to prevent looking up
types multiple times. Additionally traverse all modules in order to find
unresolvable types.

This combination reduces the time the debugger needs to execute all
dumper tests from ~7:30 to ~3:30 on my machine.

Task-number: QTCREATORBUG-18287
Change-Id: Ie1e9771f124096c2a9ad24ac26c9b51fcded4fed
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-14 13:21:38 +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
Łukasz Wojniłowicz
b05a34b81e Debugger: Don't try to iterate on non-existent subprinters
gobject_gdb.py puts the pretty_printer_lookup function into
gdb.pretty_printers. Trying to access subprinters of it causes the
AttributeError exception.

Change-Id: I00ce7b62866dd9c06a1f0abef0c7043ece023d34
Reviewed-by: hjk <hjk@qt.io>
2023-01-26 17:09:11 +00:00
Łukasz Wojniłowicz
76260f8038 Debugger: Port away from deprecated getargspec
https://docs.python.org/3/whatsnew/3.11.html suggests using
getfullargspec instead.

Fixes: QTCREATORBUG-28505
Change-Id: I27199f7e2c3a070c675dce3a152d201e22a16380
Reviewed-by: hjk <hjk@qt.io>
2023-01-11 15:38:46 +00:00
Łukasz Wojniłowicz
0648cd49f9 Debugger: Don't split top-level name into letters
If names = ['foo.bar'] then toExpand = ['foo.bar', 'foo'] instead of
toExpand = ['foo.bar', 'foo', 'fo', 'f']

Change-Id: Ia6e021b1f32d9f1e5a78209e9a269725e298409e
Reviewed-by: hjk <hjk@qt.io>
2023-01-11 15:37:39 +00:00
Eike Ziller
0dfa542bee Merge remote-tracking branch 'origin/9.0'
Conflicts:
	src/plugins/cppeditor/cppcodestylesettingspage.h

Change-Id: I1aa4e2f9efc6d9cf9f284aef1abf148be9b93a60
2023-01-10 15:44:55 +01: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
Dmitry Bravikov
34ff9c97e6 Debugging: Add dumpers for libcpp types: variant, optional, tuple
Task-number: QTCREATORBUG-25865
Change-Id: I262ac708ae040982d2ed4f62e1f95807eaaae718
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-01-06 12:07:45 +00:00
hjk
c7bb5fcc37 Debugger: Remove spurious waring
Task-number: QTCREATORBUG-27160
Change-Id: Ie69c60688249efcd4d2c2330d6555cf7f708edd2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 08:32:09 +00:00
hjk
f81724f458 Debugger: Make android std dumpers refer to libcpp
Amends af881688e5.

Change-Id: If207dd04e37e5f80f68b374fe66fd3beec330ead
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-12-20 11:19:46 +00:00
Marcus Tillmanns
af881688e5 Debugger: Fix name of "mac_stdtypes.py" file
It was incorrectly assumed that the types were only used on macOS.

Change-Id: I8acc326fe63d4cb96b764da1262355d24494f337
Reviewed-by: hjk <hjk@qt.io>
2022-12-14 08:25:37 +00:00
Marcus Tillmanns
d5b585dad6 Debugger: Fix dumper for std::string from lib++ in GDB
Fixes: QTCREATORBUG-28511
Change-Id: I56ca11c9a5f9b7a885bbaa0223bd2f47ea4abb4b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-12-01 06:55:20 +00:00
Eike Ziller
b038ea3a40 Fix debugging with LLDB
Broke with bb11788a0a

Change-Id: Ie02a36b98be83bd4721eacc834321a5494c584a3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-09 11:47:52 +00:00