Commit Graph

2002 Commits

Author SHA1 Message Date
Eike Ziller
cfdea6b9c2 Merge remote-tracking branch 'origin/4.4'
Change-Id: I7bf72444b19db20fcc7dc2c9d1f02ec2b30b658f
2017-09-25 11:00:25 +02:00
Nikolai Kosjar
76006a1353 C++: Fix crash with invalid raw string literal
While parsing a document Bind::asStringLiteral() Token::spell() was
called for a raw string literal token with a Token::literal nullptr.

This is due scanRawStringLiteral() not properly aborting for
invalid/incomplete code and that the code paths handling
multi-line-raw-strings were not limited to the highlighting case.

Address both cases.

Task-number: QTCREATORBUG-18941
Change-Id: I489d288ccbd7b59be396dada846613ff555436cf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-20 07:38:04 +00:00
Andre Hartmann
50581683ba CamelHumpMatcher: Support uppercase snake matching
Often used for macro names, e.g. TEST_ASSERT_EQUAL_FLOAT(),
which can now be matched by "TAEF".

Change-Id: I0626a60e2be68c1514c28769c679212075227281
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-19 17:03:10 +00:00
Orgad Shaneh
a627f4eef7 Dumpers: Print readable output in tests
Change-Id: I32864c9c1b8fe60b5b01423f68e63a3c00b936f8
Reviewed-by: hjk <hjk@qt.io>
2017-09-19 13:47:19 +00:00
Tobias Hunger
5bd2887045 Environment: Keep case of environment variables on windows
Task-number: QTCREATORBUG-18915
Change-Id: I4c389155e03dde423d1ed578409baa1f38fc26db
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-09-19 11:37:03 +00:00
Eike Ziller
3d9cf954e2 Merge remote-tracking branch 'origin/4.4'
Conflicts:
	src/plugins/debugger/debuggerdialogs.cpp
	src/plugins/debugger/gdb/remotegdbserveradapter.cpp

Change-Id: I1ae77869887a8d9ef2a33439f2733315db9e0cf0
2017-09-19 12:10:26 +02:00
hjk
fe1cbd0f87 Debugger: Add yet another virtual inheritance test
Failing for now.

Change-Id: Ic624b9c64f85f06bf61a2e8f765a272a835c0c43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-19 09:20:52 +00:00
Andre Hartmann
632f2a7709 Locator: Add camel hump locator filter for C++, QML, and files
* Use the CamelHumpMatcher in the C++, QML, and files filters
* Supports matching against UpperCamelCase, lowerCamelCase
  and snake_case strings
* Supports highlighting of matched characters

Task-number: QTCREATORBUG-3111
Started-by: David Kaspar <dkaspar@blackberry.com>
Change-Id: If6220191432ef965bde3c8dbe4a10d89e222ba6f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-09-19 08:24:38 +00:00
Orgad Shaneh
2fb54abd03 CamelHump: Do not match first char in the middle of a word
When matching NLH against LongCamelHump do _not_ consider the N
of Long as part of the match. The first character needs to meet
the same requirements as the others.

Change-Id: I4e7b2fe5a28296afe6f06f90e1986336fe7f3179
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-09-19 08:24:14 +00:00
Orgad Shaneh
f97657b15e Dumpers: Add a show case for C-style strings
Change-Id: Ic70761ffcd76bdfed7879c222d471b50a8b32c0b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-18 15:00:37 +00:00
Orgad Shaneh
2760b9fc67 Dumper: Dump CHAR/WCHAR arrays as strings
Change-Id: I78bdb181e27cc858356c9026fc960135b54cdcbb
Reviewed-by: hjk <hjk@qt.io>
2017-09-18 11:43:51 +00:00
Eike Ziller
3543bd5d1a Merge remote-tracking branch 'origin/4.4'
Conflicts:
	src/plugins/projectexplorer/projectexplorer.cpp

Change-Id: I7881fc51021c49b792a384ad9f8a4f71fc457ce2
2017-09-04 16:12:34 +02:00
hjk
e404ba9de1 PortGatherer: Add test for Mac's netstat output.
Change-Id: I6df357502e5621e858a848c567fe1590762d5fc1
Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-08-30 12:56:11 +00:00
Eike Ziller
df796e2aa5 Merge remote-tracking branch 'origin/4.4'
Change-Id: Id525d68a899f2db14c2d52c200a3a2a8a4e81590
2017-08-24 13:23:04 +02:00
hjk
45caf84cc9 ProjectExplorer: Fix parsing ports from netstat output on Windows
Handle IPv6, and do not try to interpret the result as hex.

Change-Id: I700c233d03cc706bc8712ab9fabee75d7f126df3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-08-24 09:53:00 +00:00
hjk
8cb944f4ff Debugger: Display summaries for CoreFoundation types
Uses lldb's GetSummary() method to display values for CoreFoundation
string-like variables.

Task-number: QTCREATORBUG-18638
Change-Id: Icca6d9cf7b328c80b44eebe597259f38aba1c3ef
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-08-21 10:35:06 +00:00
Eike Ziller
d8fd5292f1 Merge remote-tracking branch 'origin/4.4'
Conflicts:
	src/tools/clangbackend/ipcsource/clangiasyncjob.cpp
	src/tools/clangbackend/ipcsource/clangjobrequest.cpp
	src/tools/clangbackend/ipcsource/clangjobrequest.h

Change-Id: Ib8602530663813ade418f995dfd2a736908cfe75
2017-08-15 10:07:51 +02:00
Andre Hartmann
95310b28f3 CamelHumpMatcher: Modernize
* Use QRegularExpression instead QRegExp
* Use range-for instead foreach
* Remove QLatin1String/Char

Change-Id: I27516a4e3ca724c1f3cfab5b729d545547df873f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-08-09 11:21:34 +00:00
Andre Hartmann
3480579943 Extract CamelHumpMatcher for use in the C++/QML locator filters
Started-by: David Kaspar <dkaspar@blackberry.com>
Change-Id: I928ccdc4084f8d07826746c771e7fca6994f95ab
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-08-04 08:19:10 +00:00
Christian Kandeler
8b8a32ba0e qbs build: Do not access the bundle module unconditionally
We should not rely on its presence on non-Darwin platforms.

Change-Id: I3fa722038f9c2d1139f6e1dc8c49d1c4d2fe0bee
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-03 11:09:55 +00:00
Tim Jenssen
d5342eff77 fix property spelling
Change-Id: I00f84ec8d2c83d7f3937d2e21a24e02ba28991b3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-17 10:38:08 +00:00
hjk
5e3a2b5b89 Debugger: Add a version check for GNU gdb (GDB) Fedora 8.0-13.fc26
Change-Id: Id2ccd3712370609e2d6a0b126ba2d4934ff1f763
Reviewed-by: Niels Weber <niels.weber@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-12 12:34:37 +00:00
Orgad Shaneh
c841dc551c Introduce and use Utils::stripAccelerator
Change-Id: I8c37728ca5de20e2b68e6d0ac7fc120baa696040
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-07 12:17:40 +00:00
hjk
8678117572 Valgrind: Merge ValgrindRunner and ValgrindProcess
There was a 1:1 matching remaining.

Change-Id: I619bedcda867b642eab37396a0bd48bcb3a5829a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-06-30 10:33:51 +00:00
Orgad Shaneh
b57372f2b5 Replace include guards with #pragma once
Change-Id: Ic36cf0e9cac61d4d9a7e4434192944f5301b8aaa
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-28 08:07:56 +00:00
Orgad Shaneh
5f973de952 Merge remote-tracking branch 'origin/4.3'
Change-Id: Ib5405ed2c3356f65b49fe2f454f8ac2e0de44ef6
2017-06-26 08:24:26 +03:00
hjk
fc8dee4675 Valgrind: Make the (threaded) parser a proper member of the runner
Simplifies user code, and it was only ever used in a 1:1 relation,
even in the tests.

Change-Id: I3ce4fc83a361aceb730c05420efdb4ea52d37cda
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-23 11:30:32 +00:00
hjk
88fd4043d8 Valgrind: Merge MemCheckRunner and ValgrindRunner base
It's mostly the xml/log handling, which can be re-used in other tools.

The change is purely mechanical, including some style fixes and
some modernization.

Change-Id: I6b44ae71451e8d3e26df40b9af9b4ec70038a92d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-23 09:41:28 +00:00
Christian Stenger
bd259129b5 Tests: Fix compile
Broke with 4e96f2ce.

Change-Id: I7c467cc92cc8444bd3b1ef41eebff089668a0f31
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-21 13:34:36 +00:00
hjk
b129cebccc Debugger: Fix manual splitting of complex template parameter types
Parsing has to stop at the first < (coming from the end).
foo::span<int>::bar<double> has a parameter 'double', not 'intdouble'.

Change-Id: Ied142d5e75a7587d6c0efd3b51608b199b999e93
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-19 09:24:38 +00:00
Orgad Shaneh
a9145e67ba Debugger: Prettify values for enum bitfields
Change-Id: I55329bba1864c9ebbbcb3b3bf1b940346507f8cd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-12 10:40:46 +00:00
Orgad Shaneh
89057b552b Merge remote-tracking branch 'origin/4.3'
Change-Id: I56004e3ec9dc9d92d33bdae438c4f7e069eccc45
2017-06-02 15:13:51 +03:00
David Schulz
2e203e868f Debugger: fix regex matching local enum type in dumper test
Change-Id: I2a0002be23bca2d0dc29273428772b38189f18d6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-01 05:33:39 +00:00
Orgad Shaneh
ac2b2d6139 Debugger: Add a test for enum bitfield
Change-Id: I5e11dd39941b5b4fe7d27e329b5268a23e7a72b1
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-31 18:13:05 +00:00
hjk
c34ff88c5a Debugger: Add an auto test for typedefs with unnamed enums
Change-Id: I7ed68c954265d4f25aec98d2d833df01a9ef9153
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-05-30 10:38:02 +00:00
David Schulz
2317d06a80 Debugger: Add DumperOptions to the cdb fetch command
Change-Id: Ibe05f82997b57cfffb26bfb5c67681be24419139
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-30 08:40:33 +00:00
Orgad Shaneh
8430da3bf7 Merge remote-tracking branch 'origin/4.3' into master
Change-Id: I01ab8c85ea3372b6dce4142ddb9cf92d903ffca6
2017-05-23 23:41:40 +03:00
Eike Ziller
f51fbd68e1 SyntaxHighligher: Remove the need to specify format for spaces
It has all means to know itself.

Change-Id: I464c195c5ee47e5fc58414a280c166e4a332c588
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-23 08:34:53 +00:00
Eike Ziller
cf57965ebc Simplify text format handling in syntax highlighters
Pass the mapping from custom enum to text style in form of a function,
which then can use a switch which is checked by compilers, and
avoids the need to lookup a different enum somewhere else to find
out what the mapping actually is.
That mapping is cached to keep performance as before.

Also, most highlighters created an enum just for the purpose of mapping
to text styles, basically creating duplicated subsets of text style like
enums everywhere. Instead provide a default, identity mapping from text
styles to text styles.

Change-Id: I2ea1ca702b99e36b8742dfda510b1b2753f0a1c2
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-23 07:47:22 +00:00
Eike Ziller
4e35cc2ea8 Fix that raw string literals that close on same line were not terminated
With the built-in model, which affects basic highlighting.

Task-number: QTCREATORBUG-17720
Change-Id: I7369d7288d9c2c8e5ef36fc27549121014527e58
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-05-19 13:50:42 +00:00
hjk
99ac955664 Debugger: Fix display of pointers as arrays
Task-number: QTCREATORBUG-18204
Task-number: QTCREATORBUG-17803
Change-Id: I4efe359c206b53ef773127cf29107d3cce720819
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-16 11:55:58 +00:00
Eike Ziller
83b8c8fc15 Reduce CPU load of test parsing
Use a thread pool with reduced max thread count.

Task-number: QTCREATORBUG-18185
Change-Id: I18bd3de82365edaf21d8dcf9c89035da1ac74756
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-16 10:46:13 +00:00
Eike Ziller
6e8ee7479e Merge remote-tracking branch 'origin/4.3'
Conflicts:
	src/plugins/debugger/cdb/cdbengine.cpp

Change-Id: Ib9aeccc4162c43e9ee3d85847d96678045625dd0
2017-05-09 15:07:30 +02:00
Orgad Shaneh
279192f17a Dumpers: Fix operator + for pointers
Add an extensive unit test to prevent future regression.

Change-Id: I38b74f9b4f5893285e9afff2ddecaaad106f4114
Reviewed-by: hjk <hjk@qt.io>
2017-05-08 06:58:48 +00:00
Eike Ziller
105b69836c Merge remote-tracking branch 'origin/4.3'
Conflicts:
	tests/auto/debugger/tst_dumpers.cpp

Change-Id: Id8b53b000f94a1b5ab923db79f67bad3276d09dc
2017-05-04 10:03:50 +02:00
hjk
1e9cc97220 Debugger: Improve handling of static members in shared objects
Change-Id: I4978094dc5dcd0e57bb6790cfc8476a9db77724d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-02 10:22:14 +00:00
hjk
f38f120031 Debugger: Add a dumper for QLazilyAllocated
Task-number: QTCREATORBUG-18060
Change-Id: I5eec7bd10f54278a1d40cf9fce97fba56f4aa2e4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-26 10:51:39 +00:00
hjk
81d9315587 Debugger: Add a boost::variant dumper
This requires making template argument extraction a bit more robust

GCC 5.4.1 created debug info only reports the first argument for
boost::variant<int, bool>:

    #include <boost/variant/variant.hpp
    int main() { boost::variant<int, float> v = 1; return 0; }

    py print(gdb.parse_and_eval('v').type)

      -> boost::variant<int, float>

    py print(gdb.parse_and_eval('v').type.template_argument(0))

      -> int

    py print(gdb.parse_and_eval('v').type.template_argument(1))

       -> Traceback (most recent call last):
          File \"<string>\", line 1, in <module>
          RuntimeError: No argument 1 in template.
          Error while executing Python code.

Change-Id: Iedca8b073078c93449ab61bb2cab05d6cd9803ba
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-26 09:23:18 +00:00
hjk
c5d37af0e0 Debugger: Some support for 'long double'
Task-number: QTCREATORBUG-18023
Change-Id: I06783541668b95711cb5a45bf689c43b348ff624
Reviewed-by: hjk <hjk@qt.io>
2017-04-25 15:00:59 +00:00
Eike Ziller
56233f67e1 Merge remote-tracking branch 'origin/4.3'
Change-Id: I01d7d8aa282f2bca94f85f55c832c76672e229f7
2017-04-25 16:15:04 +02:00