1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 14:12:10 +02:00
Commit graph

35735 commits

Author SHA1 Message Date
Marc-Andre Laperle
3b8fcb62e7 Bug 574578 - Syntax error when using __declspec as type-id specifier
I initially applied a fix only to alias declarations by parsing it
before the type-id but to my surprise __declspec works more widely as a
type-id specifier.

Change-Id: I50217e2453f888207b73fc3f4c7ff1ea67bf5937
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2021-07-07 01:57:06 -04:00
Marc-Andre Laperle
99682412ce Bug 574481 - NullPointerException in LLDBLaunch.hasTrait
Always initialize fTraits. Also, prevent computeLLDBVersions from
spawning processes repeatedly by early returning. This means we also
populate fTraits only once and don't need the early return and
initialize it there.

Change-Id: I04b9af0b187fe8564bf7ce67f1322eee2d360033
2021-07-06 22:45:07 -04:00
Martin Weber
99ccdd11a4 externalize string
Change-Id: I9d47dd464ba9f9c7b696c2e6f69c2c90abd31071
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2021-06-28 21:04:33 +02:00
Martin Weber
7a1a619b6a project setup: eliminate warnings on non-existing folders
Change-Id: I109e2e56d0b687384c3c984cb6f4823fad0addb2
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2021-06-28 20:54:57 +02:00
Martin Weber
ef5f7c9d97 project setup: remove unnecessary maven nature
Change-Id: Ie0ccf12cfc7764170f2138ed2538876a4b3e3ba7
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2021-06-28 20:26:19 +02:00
Martin Weber
f9ce4f03e3 show markers in problem view instead of printing to build console
Change-Id: Ic487adc11153fac206183a3ceb943d05c6d36066
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2021-06-27 09:43:17 -04:00
Marc-Andre Laperle
0748cd24c6 Bug 573764 - Ambiguous conversion on numeric type
Starting with C++11, a null pointer constant has to be specifically an
integer literal of 0 and not any constant expression. Before this
change, an expression like (0 & 1) would wrongly being considered a null
pointer constant. It also means it could implicitly convert to a pointer
type (like int *) and lead to problems during function resolution, like
ambiguity.

This change corrects the behavior for C++11 by tracking whether the
integer type (basic type) came from a literal expression so that we can
add this additional constraint when checking for a null pointer
constant. Because types are sometimes returned directly when evaluating
different kinds of non-literal expressions that contain literal
expressions, we have to be careful that we remove the flag that tracks
"from literal expression".

Unfortunately, the semantic code does not track the active C++ version
which means the behavior for pre-C++11 will be impacted. Tracking the
active C++ version would not be trivial and at least the new behavior is
more future-proof.

Change-Id: Ied625e96e70390872e36ab5bb4dc238d75809d2e
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2021-06-26 14:09:08 -04:00
Jonah Graham
3f472a917b Bug 574448: Fix spelling of GCC -fsanitize command line options
Change-Id: I9d02cc9937dc88ca3b180bb194edd80a6c904899
2021-06-24 14:29:29 -04:00
Marc-Andre Laperle
987d11ef42 Bug 574333 - Per-project Doxygen options are not flushed until saved a second time
When the options are applied in performApply, the call
DocCommentOwnerManager.setCommentOwner causes to set the
CProjectDescription, which causes UserDefinedEnvironmentSupplier to
flush cdt.core preferences. Then DocCommentOwnerArea.apply populates the
preference storage, but the preferences are not flushed after that
therefore the new options values only exist in memory.

Swapping the calls of DocCommentOwnerManager.setCommentOwner and
DocCommentOwnerArea.apply works but it makes no sense for the flushing
of Documentation options to depend on UserDefinedEnvironmentSupplier
flushing the preferences - it would work by a lucky accident.

A clean option would be to go through the preference's page
IWorkingCopyManager but this would involve a lot of more risky changes
in the DocOwner/Doxygen code and a vast majority of CDT code does not do
that.

Instead, this change explicitly calls CCoreInternals.savePreferences
which flushes the preferences, just like Indexer options does.

Change-Id: Id9a57cde47794f57f26ae295ec01eeb1df9aa120
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2021-06-20 00:38:08 -04:00
Jonah Graham
90b3ebc1df Bug 574331: Set default query results for tests
Most of the tests in this bundle already had this bit of code
before calling create project. This makes BuildDescriptionModelTests
consistent with the rest.

Note that this modifies global state and does not restore it. However,
as that is consistent with the other tests in this bundle, and the
global state is only maintained while running tests on this bundle,
I am not fixing this aspect of the code.

Change-Id: I2004af177a959e1efbd45b23c960b517d8993b7c
2021-06-19 15:33:04 -04:00
Jonah Graham
83f0b1be05 Bug 574271: Draw characters in the correct color on macos
There is a bug in SWT on macos - Bug 568777 - with the cache of single
character drawStrings with transparent backgrounds as a performance
boost. This causes the terminal to draw some characters in the
wrong color.

The workaround is to not draw with transparency, which should be fine
because we just filled the background with the same color that the
1 character string will draw with.

The performance, measured with TerminalTextUITest in Fast mode with
no throttling, does not seem affected and in my testing there does
not seem to be any graphic side effects.

Change-Id: I1b0aadae100d81a8f4533ba73273ccc8202e068f
2021-06-19 13:50:16 -04:00
Jonah Graham
49d29dc6ae Bug 573797: Use the user selected encoding when intercepting byte stream
Change-Id: Id64ba9218a626d9daec02ef3a7480a67e802b865
2021-06-17 16:03:09 -04:00
Jonah Graham
d465e83836 Bug 573797: Refactor code to use Charset instead of passing around Strings
This simplifies error handling as once you have a Charset you don't
have to worry about whether or not an UnsupportedEncodingException can
be thrown anymore. In addition it is a little easier on type safety.

Change-Id: I4292878a7c621f9d05fdb98f5c26a0ae8bfec062
2021-06-17 16:02:59 -04:00
Jonah Graham
385d302d70 Bug 573797: Always use sendString, regardless of encoding
This removes a TODO in the code that makes no sense, and in
most cases the else branch is not taken as a common operating
mode is the default charset/encoding is windows-1252 but the
current charset is utf-8.

The effective difference between the two branches is that
the else does a flush after character rather than after each
string.

Change-Id: I50b3cc5837d783ba20b88c2efa44d9c4e6381d30
2021-06-17 16:02:27 -04:00
Jonah Graham
27f6637d3f Bug 573796: Warn user if not using UTF-8 on Windows
The PTY, in case of ConPTY, operates always in UTF-8. This is suggested
back to the user with a decorated combo if they try to change the default.

Change-Id: Iaf4c13e256ea7ee3469eecab4a0ec3df1ceb19a4
2021-06-17 15:37:48 -04:00
Abdullah Khalid
481f08beb4 Bug 574239 - Adding path mapping through CSourceNotFoundEditor makes
launch configuration's Source tab dirty

Change-Id: I32396e274e4e803344d5e4a56324fb84ca40fd93
2021-06-16 19:16:06 -04:00
Jonah Graham
b831c73cfd [releng] Add missing sequence number bump to API baseline
Without this bump, Eclipse PDE can assume the contents hasn't changed
so will use the wrong baseline.

Change-Id: I02706b1277f9cfdd664c70b76832d6616e0fbf47
2021-06-16 13:07:36 -04:00
Jonah Graham
1610ed7b29 Cosmetics.
Remove trailing whitespace.

Change-Id: I6395b447f427b75c851d8cce2676fb14b3e1402b
2021-06-14 22:22:58 -04:00
Jonah Graham
ffc4272acb Fix NPE on projects which aren't full CDT projects
Change-Id: I4b611fe032eca9c5657d493fc60d6451bd6ddf7d
2021-06-14 22:20:28 -04:00
Jonah Graham
d907da99a4 Bug 573677: Use array based exec commands to avoid problems with spaces
While most of these commands don't actually have spaces in them, or
their arguments, avoid the deprecated methods.

Change-Id: If7b4324695699d5a6d9a2f8a979657977486d8a4
2021-06-14 22:20:28 -04:00
Jonah Graham
1ac907184b Bug 573677: Mark methods that don't handle commands well as deprecated
Some of these commands work "by accident" on Windows, but there are lots
of special/corner cases that may not. On Linux they almost certainly
never do the correct thing when spaces are in arguments.

(follow up for 1557c2c4f5)

Change-Id: I126d60423b0e4ff6d9d240d7de2c1a4905763415
2021-06-14 22:20:28 -04:00
Julien Dehaudt
a6e6be0457 Bug 526421: Search the icon path from provided contribution
Signed-off-by: Julien Dehaudt <julien.dehaudt@st.com>
Change-Id: I7592a5df9b297f54184f754c7e3b0f8d79a6677c
2021-06-14 16:01:06 -04:00
Jonah Graham
e172ddcbf1 [releng] Update jacoco-maven-plugin to latest
Change-Id: I60931f867f48b50f98216552bf0a559fe08d79dc
2021-06-12 20:52:54 -04:00
Jonah Graham
902ea0dfa1 [releng] Bump to CDT version 10.4.0
Change-Id: I0807f46d9ebb8bb579b687366cdb19e40935a9ec
2021-06-12 20:52:54 -04:00
Jonah Graham
b60204625f Bug 561343: org.eclipse.cdt.debug.gdbjtag has no source, so don't attach it
org.eclipse.cdt.debug.gdbjtag in the root pom.xml is explictly excluded,
but it seems that the local exclude is needed too:
bc9ecdad17/pom.xml (L739)

Change-Id: Ib7489d8ac1feff5f5ec8542dfabdcba00b620ca7
2021-06-12 20:52:54 -04:00
Jonah Graham
4e07f56f0d [releng] Update to newer help-docs-eclipserun-repo
Change-Id: I46118a378e4edf319292a91483df27221c910839
2021-06-12 20:13:23 -04:00
Jonah Graham
071758e131 [releng] Update CDT baseline to 10.3.0
Change-Id: Iafd85f12126ce9c41d9d068ee0f6ea2ba9487b7f
2021-06-12 18:20:56 -04:00
Jonah Graham
dafb6e5806 [releng] Update cdt.target to point to new dependency versions
Other dependencies, such as platform may be updated later in the
dev cycle to increase CDT's minimum dependency version to the 2021-06
or even later releases.

Change-Id: Ib6386dca74f9e1327f2f7beae0adf13f54e668f3
2021-06-12 18:20:56 -04:00
Abdullah Khalid
6352e0c207 Bug 574136: support hardware breakpoints in SyncUtil
Improvements in SyncUtil's addBreakpoint and runToLocation
methods to make them support hardware breakpoint

Change-Id: If358bf11cab426f48edb8854e9ece911c2839815
Signed-off-by: Abdullah Khalid <abdullah.dev0@gmail.com>
2021-06-10 17:00:36 -04:00
Martin Weber
fce6d2f93f eliminate class StringUtil
Change-Id: I07cd8c70d2db8abe415f720275b6c25d464ba91c
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2021-06-07 20:42:09 +02:00
Jonah Graham
d49362a526 Add missing copyright header.
Change-Id: If005b907dd902acd8647dfb5932bcfbbfa0ae0a3
2021-06-07 11:39:57 -04:00
Jonah Graham
48ff7a223d Bug 574057: Prevent null set of selected data volumes
Prefer an empty set instead.

Change-Id: I6b13f78ffbbbe0cbac2b69ad50abdc90f15fed66
2021-06-07 11:39:57 -04:00
Jonah Graham
087e0e4a3e Typo. s/Java Element/C Element/
Change-Id: Ida00d0fe8884ebf3beb4afc9b7fb44e084a028a5
2021-06-04 21:27:49 -04:00
Jonah Graham
074acd9ea2 Bug 573996: dispose of fonts created in the new project wizard
Change-Id: I3ca9d37ac6bda563284cb21a3e3e164abc2c63d3
2021-06-03 21:35:07 -04:00
Torbjörn Svensson
50dcf3dbfa Bug 573688: Compare flags for the same address
Contributed by STMicroelectronics

Change-Id: I4a7ea55b341653bbf01b9e69b3129023278104f9
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-05-31 14:55:03 -04:00
Torbjörn Svensson
224b14318b Use the launch name in the help text
The "eclipse.launcher" property is available when using the eclipse
launcher. If the headless builder app is launched without the eclipse
launcher, fall back to generic "PROGRAM".

The property is not available when running eclipse in runtime mode!

Contributed by STMicroelectronics

Change-Id: If2c99a234fd841451af05e3635d44fe2967c9537
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-05-28 19:23:00 +02:00
Jonah Graham
37fef0749c Bug 573786: Handle UnsatisfiedLinkError turn off ConPTY
When starting on older versions of Windows ensure that WinPTY continues
to be used by catching all the types of exceptions that may indicate
that ConPTY is not available. This change catches all Throwables as
we want to know about all RuntimeExceptions and Errors

Change-Id: I7524d9286efe9296f1bb44311c4a3be1e5195c14
2021-05-26 10:21:29 -04:00
Anton Backstrom
01cc2ac4d2 Bug 573696: add dummy listener to DebugPlugin
Change-Id: Ic8603d82dd9aaeaec845a9ca33ee715b63a901fd
Signed-off-by: Anton Backstrom <anton.backstrom@gaisler.com>
2021-05-25 16:44:48 +02:00
Jonah Graham
7e134ccf24 Bug 562776: Fix enablement variable for ConPTY
Change-Id: I46a6a64ddd1ca74a4466ea13ef8a942cd83c1853
2021-05-24 21:29:24 -04:00
Torbjörn SVENSSON
fcbf0b6963 Bug 573722: Allow sub-class to output custom lines in header
Contributed by STMicroelectronics

Change-Id: If7163f33c804dc40bc950da067d81396a26d8f74
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
2021-05-24 09:52:20 -04:00
Torbjörn Svensson
6187228a08 Bug 573688: Do no inherit flags from cached blocks
Memory region may change access rights during the execution time. For
example, in embedded, a memory location might be clocked or not clocked
depending om some SFR. As the region can be changed during the
execution time, it's not enough to use the initial flags.

Contributed by STMicroelectronics

Change-Id: Ida4d6ed69faf3fb6e515aa0a29fa90ea241135dc
Also-By: Anders Jansson <anders.jansson-ext@st.com>
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-05-24 09:02:39 -04:00
Torbjörn Svensson
b5969f2cb9 Fixed typo in documentation links
Contributed by STMicroelectronics

Change-Id: Ie5abafc4b1d1d7dbd968cd627ff5b3d4f863e15a
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-05-24 12:25:05 +02:00
Jonah Graham
261af5106c Bug 573719: Display error on shell open failed
Save shell before disposing control so error message has somewhere to go

Change-Id: I3bcaa0e8f23a8c177309e72b6d9dfbb8afb72cf4
2021-05-24 00:30:58 -04:00
Jonah Graham
f71d92114f Bug 573646: Open primary terminal view when there is no last available
Change-Id: I286d039d6cb3eb1e73fdb5b76c8743a8e0870d94
2021-05-24 00:30:58 -04:00
Jonah Graham
cb89216031 Bug 573712: Populate WSL entries in terminal list like git bash is
Change-Id: I371d5455296e9d1bcb9137e538d5cc2ed5417ba1
2021-05-24 00:30:58 -04:00
Jonah Graham
1557c2c4f5 Bug 573677: Mark methods that don't handle commands well as deprecated
Some of these commands work "by accident" on Windows, but there are lots
of special/corner cases that may not. On Linux they almost certainly
never do the correct thing when spaces are in arguments.

Change-Id: Idce714da9c1d6ac7a67dc174d5b30bf619534c53
2021-05-23 20:49:26 -04:00
Jonah Graham
a4963b35ad Bug 573712: Reduce work done at Eclipse startup time on main thread
In Bug 466650, the git bash detector was removed from startup to reduce
overhead on startup. Later during a rewrite it was added back in under
a different code path for Bug 473107. In the context of Bug 573712
which is going to add more detectors that may do much more work on
a full load, reduce the amount of work needed to do the presence check.

Change-Id: If1ae3f12ec51b1edc2d419f0efd89fed81a7b56e
2021-05-23 20:49:26 -04:00
Jonah Graham
a7fab87648 Bug 573712: Reorganize external tools detection code
The code was not very extensible and the main purpose of the bug
is to add additional detectors. This first commit refactors
the code to make that easier, and to provide a platform for
what could become an extension point.

Change-Id: I5ce514eda11f2573098d6e16663e324954da961b
2021-05-23 20:49:26 -04:00
Jonah Graham
ece07888a8 Bug 573713: Support alternate way of bright escape codes
ConPTY uses 90-107 to indicate bright instead of using extra 1; parameter.

Change-Id: I42263edd5dbe78fe164f00b99d1850ca5be85081
2021-05-23 20:49:26 -04:00
Jonah Graham
4e92239952 Bug 562776: Use Windows ConPTY API instead of WinPTY
There are lots of bugs in WinPTY, while upgrading WinPTY would
resolve some of them, there are others that are unresolvable. See
https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/
for a backgrounder on the general subject.

In this first version ConPTY won't be enabled by default, it requires
system property
org.eclipse.cdt.core.conpty_enabled=true
to be set. i.e. start Eclipse with:
-vmargs -Dorg.eclipse.cdt.core.conpty_enabled=true

In a future version the default will change to on if available,
so to force it off use:
org.eclipse.cdt.core.conpty_enabled=false

Change-Id: Ib2df0095027c23f20daa6aa044d9e5f0b0443164
2021-05-23 20:49:26 -04:00