Commit Graph

1212 Commits

Author SHA1 Message Date
Eike Ziller
8df0653bf8 Merge remote-tracking branch 'origin/4.10'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/projectexplorer/gcctoolchain.cpp
	src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp

Change-Id: Iffdf48e782a734107ea170ebb3812e997cea0e7b
2019-09-12 09:08:04 +02:00
David Schulz
d72632acd6 Debugger: add dumper for std::initializer_list
Change-Id: I223182cecf1f04dbc9908dc993a8800c1633c48b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-09 11:35:24 +00:00
Eike Ziller
38feea7e25 Merge remote-tracking branch 'origin/4.10'
Change-Id: Idfe86eb91c7a9a16f15d528a2a03beecca1cb208
2019-08-27 09:47:14 +02:00
Dmitry Nuzhdin
309e345818 Debugger: Fix mapping std::set in Locals window via gdb
Currently QtCreator incorrectly shows content of a std::set.
For example set {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
is shown as {0, 1, 2, 1, 2, 1, 2, 1, 2}.

Change-Id: Idaff66451827657ef129aa3d27895c43938e6fdc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2019-08-26 16:11:23 +00:00
hjk
04eb17d57e Debugger: Display 'string' instread of 'NimStringDesc' for Nim strings
Change-Id: I2ecf09eb0b3d01c22b670a8dc642cf07eee2cede
Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2019-08-23 08:39:58 +00:00
Eike Ziller
2521023627 Merge remote-tracking branch 'origin/4.10'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I7d9ecd6d8518699d848ac72a62e5c35c2cc2751f
2019-08-07 08:09:45 +02:00
hjk
5b33660a57 Debugger: Allow spaces in arguments with LLDB
Change-Id: Iebc6f7975e9a306805911ed18eb4689074abd891
Task-number: QTCREATORBUG-22811
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-08-06 08:07:25 +00:00
Eike Ziller
4608e84d9c Merge remote-tracking branch 'origin/4.10'
Change-Id: I633cb7dce95e107d0e0c62dc49a7ebacad0fbbe5
2019-08-05 08:45:11 +02:00
Christian Stenger
32ce4d5071 Lldb: Fix event handling for newer Xcode and faster machines
If the system or the running inferior produces output while
fetching data the output did interfere with the state handling
of the debugger engine which in turn lead to a complete
inconsistent state of the debugger where the states of the
debugger bridge and the debugger engine (QC internal) assumed
complete different states.
Circumvent by explicitly ignoring the state for inferior output
on stdout or stderr.

Change-Id: I81aa0bacd41de4266a9278c66fed908dd72c9d44
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-02 12:29:35 +00:00
Eike Ziller
e5543eaebf Merge remote-tracking branch 'origin/4.10'
Change-Id: Id9cab641788f93cda9a81da9f156614b91d87b2a
2019-08-01 11:58:56 +02:00
hjk
ae66f63390 Debugger: Disable QObject connection and signal display
Besides the announced change to QObject guts in a5a859e72 there has been
at least 6e0b5dadc and possibly more, so give up here.

Change-Id: I84201cef9f2a7515f082f4c3310bdc96f7a4216d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-31 12:18:02 +00:00
hjk
be67ee75c5 Debugger: Fix QStandardItem dumper for Qt >= 5.9
Change-Id: Ib0dab191705982cf92d9599b8e627b41f0e187cc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-31 08:10:21 +00:00
hjk
b2daf07573 Debugger: Fix QFileDumper
Some QRingBuffer member got removed in 8f92baf5c9.

Change-Id: Ie0066db3b61bff25751a4886cb4b584cc4db49bf
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-31 07:28:02 +00:00
Christian Stenger
e071c6facb Dumper: Add pylintrc file
...to suppress some common warnings generated from pylint
or respectively pyls.
We usually fail to follow the snake_case naming style
and we tend to have only limited documentation of these
files.

Change-Id: Iaecf767fac68f3be8ad88ccff91a0f5ac24a43e4
Reviewed-by: hjk <hjk@qt.io>
2019-07-29 10:03:32 +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
24d9ad7c11 Dumper: Adapt QC internal dumper to renamed class
FileName is now FilePath. Follow the approach that is used
internal to display the summary of the file path as the
content of its URL if non-empty and the content of the file
otherwise.
Keep the old approach as well as it can still be used,
even in new code thanks to a using declaration and fallback
to the old approach if debugging old source.

Change-Id: I37c621e451fea92ca34db9a63b5ca26b3bdc201c
Reviewed-by: hjk <hjk@qt.io>
2019-07-23 12:26:09 +00:00
hjk
fa9141acdd Debugger: Make example setup code more complete
Change-Id: I2488a84077d7c88d3a14c43bc4f8a9159a866b1c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-23 10:22:32 +00:00
hjk
2abdc54147 Debugger: Avoid infinite loop in dumper
Change-Id: I71e89574a9eecc079b4d8e91da352fd2b7b0d9ab
Done-by: Xander (@bugreports.qt.io)
Task-number: QTCREATORBUG-22637
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-23 06:27:49 +00: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
ea6592e9b4 Dumper: Fix handling of namespaced Qt
Change-Id: I5fae8dd0051596e3fb13cce32f282f3442adc8c0
Reviewed-by: hjk <hjk@qt.io>
2019-07-23 05:35:02 +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
David Schulz
79f7605a0a Debugger: fix cdb dumper test for namespaced Qt
Change-Id: I5cbf1db4cffb19ee63ab80dcd6e2a8659cd44389
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-09 08:40:00 +00:00
David Schulz
853f1226e0 Debugger: Fix QStandardItem dumper test
Change-Id: Ic4b965da9589a7bade4f96226bff3bb14987602c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-02 08:26:23 +00:00
David Schulz
1571384e49 Debugger: add dptr child to QDir for msvc targets
Makes it possible to access the entry lists if these were populated by
the code.

Change-Id: I066824d2ce7f75a38d208155156c93d06458f8b3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-02 08:26:14 +00:00
Orgad Shaneh
55653db029 Dumper: Fix std::map<K, V>::iterator dumper
The iterator type is std::_Rb_tree_iterator<std::pair<K, V>>

Change-Id: I0ed2f2e6955deb4b402277fe0f3eb32b6af2d477
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-01 12:51:37 +00:00
Michael Weghorn
aedc0ca91b Pretty printers: Unify code for different allocators
The code path for allocators other than
'std::allocator' does work for 'std::allocator' as well,
so unify this.

This also fixes the case of std containers when
'std::allocator' is used and the compiler flag
'-D_GLIBCXX_DEBUG' in place which results in size assumptions
that were made in the now dropped path to not be fulfilled,
thus leading to an incorrect display.

Fixes: QTCREATORBUG-22606
Change-Id: I2b6f8ac9933b210d26197975017292e2fc227541
Reviewed-by: hjk <hjk@qt.io>
2019-06-26 13:40:13 +00:00
Michael Weghorn
5eba3bde93 Fix std::basic_string printer with custom allocator
This fixes expansion of 'std::basic_string' in the locals
view when a custom allocator is used (which previously
would result in "<not accessible>" being shown);
for example, when expanding 's' at the breakpoint
in the following example:

    #include <string>

    template<class T>
    class myallocator : public std::allocator<T> {};

    int main()
    {
        std::basic_string<char, std::char_traits<char>, myallocator<char>> s("hello");
        return 0; // break here and expand value of 's' in locals view
    }

Change-Id: I0ca98de50d83a1f6e6f019acc37a1302a05fdba8
Reviewed-by: hjk <hjk@qt.io>
2019-06-26 07:18:06 +00:00
Michael Weghorn
01f26bd5b7 Fix std::vector<bool> printer with custom allocator
This fixes the std::vector<bool> pretty printer, which
previously just showed "<not accessible>" for variable
'v' for the following sample code (with system GDB
pretty printer disabled so that the custom
pretty printers are used):

    #include <vector>

    template<class T>
    class myallocator : public std::allocator<T> {
    };

    int main()
    {
        std::vector<bool, myallocator<bool>> v;
        v.push_back(true);
        return 0; // break here and check value of 'v'
    }

Change-Id: Ia9883aa0b06a396cb3546ac2594a82c1b2062b80
Reviewed-by: hjk <hjk@qt.io>
2019-06-26 07:17:39 +00:00
Michael Weghorn
0313cdbd87 gdbbridge: Convert children to gdb.Value
'Dumper::fromNativeValue' expects an object of type
'gdb.Value'. However, the 'pretty_printer.children()' iterator
may return values that first need to be converted to this,
as documented for function 'pretty_printer.children' at [1]:

> This method must return an object conforming to the Python iterator
> protocol. Each item returned by the iterator must be a tuple holding two
> elements. The first element is the “name” of the child; the second
> element is the child’s value. The value can be any Python object which
> is convertible to a GDB value.

Therefore, explicitly convert the value to a GDB value first.

This fixes the expansion of 'std::vector<bool>' when system
GDB pretty printers are enabled which previously led to
"<not accessible>" being shown e.g. for the following example
(expand 'v' in the local variable view at the breakpoint):

    #include <vector>

    int main()
    {
        std::vector<bool> v;
        v.push_back(true);
        return 0; // insert breakpoint here
    }

Side note: GCC's pretty printer for 'std::vector<bool>' previously
returned either '0' or '1' for the element values, thus leading to the
problem described above. With this patch in place, the elements are
shown when the vector is expanded, but the shown type is 'long long'
(since that's the type that GDB seems to automatically assign when
constructing a 'gdb.Value' from these integers, at least with
GDB 8.2.1 on amd64). This will work as expected ('bool' shown as
type) from GCC commit [2] on ("Have std::vector printer's iterator
return bool for vector<bool>").

[1] https://sourceware.org/gdb/onlinedocs/gdb/Pretty-Printing-API.html
[2] https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=6c7d761a3f5fd7d19795d1d4b9b027a04b3fe88b

Change-Id: I9047affa5b4369befd2e2386c8a6b04c66c4b632
Reviewed-by: hjk <hjk@qt.io>
2019-06-26 07:16:42 +00:00
hjk
93d2e3352c Debugger: Improve QObject dumper
Don't use two lookups for parent types and act on known null pointers.

While the machinery is robust enough to handle the result it's a
needless deviation in regular code path.

Change-Id: I6e50629cf554870a3ffb9f488f654e6ae557e5b3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-06-18 09:55:07 +00:00
hjk
7418c4f1ee Debugger: Adapt to new qt_v4StackTraceFromEngine helper function
Change-Id: I3d3dbd837e1b73117524e286ae4ea09e652e4a5c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-05-24 06:45:08 +00:00
Antonio Di Monaco
9d148276a3 Debugger: Do not make std::vector layout assumptions
... when non-std allocator is used.

This patch is a follow-up of 41da97fb2c.

Task-number: QTCREATORBUG-22040
Change-Id: Ib3e7699ccb77fd2c934d28367629d78dbf5379d8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-05-21 09:37:56 +00:00
hjk
cffc09e53d Debugger: Disable a few more Creator-specific dumpers
... that were not updated when the structures changed.

Change-Id: I1c06ac029f2057d618ce21b5da3edf9694cff63d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-17 10:34:30 +00:00
Alessandro Portale
5311708845 python scripts: Use "not in" operator to test membership
As per suggestion from Pyls, this changes
  if not needle in haystack:
to
  if needle not in haystack:

Change-Id: I4a482604e13e61ecee9e02935479632419710ff7
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-05-10 05:53:39 +00:00
hjk
14300bd477 Debugger: Disable Kit dumper
Broke when Kit guts were converted to use unique_ptr

Change-Id: Id38d53c56448cd2edde09e3b27e38a24bcfbb37c
Reviewed-by: hjk <hjk@qt.io>
2019-05-09 12:49:55 +00:00
hjk
e95fd876aa Debugger: Make the time stamp recording option work for single items
Should help to drill down to individual expensive dumpers.

Change-Id: I983ba075231784f71dd9d5c3bda375a3ee508bf6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-04-12 08:32:52 +00:00
Eike Ziller
b5e7522237 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/pythoneditor/pythoneditorplugin.cpp

Change-Id: I9a95df5e16b34538539ced7dfc5d326b700794e6
2019-04-02 12:22:48 +02:00
hjk
ad889d6707 Debugger: Avoid looking up QList<QFileInfo> in QDir dumper
Task-number: QTCREATORBUG-22000
Change-Id: Ibb24dc81282118c1f6fe97af451647a54ffcc8dd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-04-02 06:38:44 +00:00
hjk
94d79ba3b5 Debugger: Fix "Break on Abort" with GDB > 8.1
GDB 8.1 changed behavior when specifying breakpoints, it now tries
to pattern-match function names, hitting e.g. 'Foo::abort()' for
'b ::abort'.

While the API exposes a way to opt-out of the new behavior there's
no way to tell when to do that other than trial-and-error.

Task-number: QTBUG-73993
Change-Id: Ied2e640e65e40df6eac50117db890bd4b51d36ab
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-04-01 09:28:04 +00:00
hjk
a89a885b2c Debugger: Fix "Load QML Stack"
There have been apparently changes on the Qt Declarative side.

Task-number: QTCREATORBUG-22209
Change-Id: Ia9e387aa92465556b5b8aee3661e2fc063478f3d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-03-29 15:04:35 +00:00
Joerg Bornemann
3fbd95cee4 Debugger: Fix typos in gdbbridge
Change-Id: I33f35353b08fdb26a5b78231dff5bfeb80325d14
Reviewed-by: hjk <hjk@qt.io>
2019-03-25 08:53:03 +00:00
Eike Ziller
b3baed58c6 Merge remote-tracking branch 'origin/4.9'
Change-Id: If36258b8e572b5c7875433a31a836e4f06e27286
2019-03-21 11:28:21 +01:00
hjk
cc25120377 Debugger: Fix gdb command line usage of dumpers
Change-Id: I9d5924b6cac707372a95b2b31e270722a6202fc0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-03-19 14:16:49 +00:00
Michael Weghorn
b29296e9e0 Escape GDB pretty printer output
Hexencode the output from GDB pretty printer, since
Double quotes ('"') and potentially more characters
need to be escaped in order for the variable values
to be properly displayed in the variable pane while
debugging.

The 'utf8:1:0' parameter to 'putValue' (as compared
to just 'utf8') makes sure that no extra quotes are
displayed at the beginning and end of the value.

Fixes: QTCREATORBUG-22135
Change-Id: I4ad9fdc75d8f389cc4cdd18d5da1eec242f8a329
Reviewed-by: hjk <hjk@qt.io>
2019-03-15 13:48:21 +00:00
Eike Ziller
c53ccceff1 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/debugger/debuggerkitinformation.cpp
	src/plugins/languageclient/languageclientmanager.cpp
	src/plugins/plugins.pro
	src/plugins/projectexplorer/kit.cpp
	src/plugins/projectexplorer/kitmanager.cpp

Change-Id: I66fb941202991f35f7d7761430b21e42dfc678a8
2019-03-14 15:51:15 +01:00
illiteratecoder
7236e340a9 Debugger: Fix std::{unordered_,}{map,set} dumper for libc++
Task-number: QTCREATORBUG-18536
Change-Id: I2842a525e99e4fcd9544a1f15bd42fd5c8c0c16e
(cherry picked from commit 7b39db9e8a)
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-03-06 14:15:14 +00:00
illiteratecoder
7b39db9e8a Debugger: Fix std::{unordered_,}{map,set} dumper for libc++
Task-number: QTCREATORBUG-18536
Change-Id: I2842a525e99e4fcd9544a1f15bd42fd5c8c0c16e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Jeremy Barenholtz <jeremy@illiteratecoder.com>
2019-03-06 09:58:19 +00:00
Christian Stenger
31e549a7dc Debugger: Improve lldb breakpoint handling
Inform QC about changed breakpoints on the LLDB side.

Fixes: QTCREATORBUG-21997
Change-Id: Icec25725f92d8a0b47f7dab2971c0c5eb5b23757
Reviewed-by: hjk <hjk@qt.io>
2019-03-06 05:43:12 +00:00
Orgad Shaneh
cbfc6e522d Merge remote-tracking branch 'origin/4.9'
Change-Id: I801042a53ae4d02d1891ea582ca9ea89b00d3181
2019-03-01 13:06:57 +02:00