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

36438 commits

Author SHA1 Message Date
John Dallaway
0173da5325 Support section data lookup within static libraries 2024-01-02 15:23:27 +00:00
kuch3n
8e3012c902
#461 Add support for freescale compiler (#462)
Parse command line arguments for chc08/12 and file based compiler build-ins
2023-12-28 18:08:20 -05:00
Davin McCall
232b24cd80
[#457] Fix partial specialisation matching for deduced primitive types (#458)
Current partial specialisation selection matches deduced type by
IBinding, not by IType, meaning that it can't work for types (such as
primitive types) that aren't represented by an IBinding. Fix that by
wrapping the result of resolution in a type which can handle either.
2023-12-28 18:07:49 -05:00
Igor V. Kovalenko
f6481742dd Properly persist deduction guide templates in index
Turned out that index is missing information about template parameters of
deduction guide templates, and all affected names which are only available
via index could not be resolved. This happens to e.g. std::map<> which is
usually looked up via index populated from <map> header file.

Fix this by implementing ICPPTemplateParameterOwner and ICPPTemplateDefinition
interfaces in new CPPDeductionGuideTemplate which delegates missing resolution
calls to the function object which already carry required template information.

Closes #438
2023-12-28 17:41:02 -05:00
Igor V. Kovalenko
727430964a Add test for deduction guide template vs index issue
Add new index binding resolution test strategy SinglePDOMReindexedTestStrategy
which does reindex project after adding test case sources. Clean up redundand
C++17 setup helper classes from test since deduction guides are always enabled.

Add test case modelling std::map resolution problem and make sure to run it with
new test strategy to reproduce the issue.

Bug #438
2023-12-28 17:41:02 -05:00
Igor V. Kovalenko
8091626ee4 Allow aggregate initialization in template body 2023-12-28 17:40:41 -05:00
Igor V. Kovalenko
84322c30f4 Amend list-initialization handling of class or aggregate 2023-12-28 17:40:41 -05:00
Igor V. Kovalenko
ae3a0adb81 More tests for list-initialization of class or aggregate 2023-12-28 17:40:41 -05:00
Davin McCall
be3a2eb539
[#455] If constructor arguments fail to resolve, propagate failure (#456)
This change prevents invalid partial specialisations from being chosen
when
instantiating a template in cases where the expression for the
type/value of a template parameter involves a constructor call.
2023-12-28 17:13:35 -05:00
Igor V. Kovalenko
a7bfdd2802
Fix struct declaration introducing name in namespace scope (#587)
When AST is used to resolve binding for class-name and elaborated-type-specifier
is found matching [basic.lookup.elab] rule introducing the class-name, behavior
of CPPSemantics.resolveAmbiguities() is different in presence of index.

If there is no index, CPPVisitor.createBinding() for ICPPASTElaboratedTypeSpecifier
creates binding for class-name as introducing the name. When later lookup finds
this binding all is good because binding is declared before the use site.

If index is available, lookup for class-name fails in AST too but now matching
entry is found in the AST index. When later lookup finds this index binding
CPPSemantics.declaredBefore() returns false because it does not look in
AST index and only checks project index.

To fix this additionally check if ICPPClassType object is in AST index,
as we already do for ICPPConstructor. This way declaredBefore() does almost
the same thing as isReachableFromAst() and lookup succeeds returning the
same binding from index.
2023-12-28 16:41:44 -05:00
Igor V. Kovalenko
4970952382
Recognize simple declaration of function name with function type specifier (#595) 2023-12-28 16:29:40 -05:00
Michael Keppler
d4102ca82f
Clean up Maven build (#662)
* remove invalid tycho resolver config (not valid since many versions)
* fix PMD plugin configuration (config attribute was renamed in 3.18)
* remove duplicate versions already managed in pluginManagement section
* fix indentation
* move all not yet configured versions into pluginManagement of the
parent module to avoid further duplication
* consume the target platform as file, not as maven artifact (this
simplifies building a single module A LOT)
* remove invalid tycho-source-plugin configuration
* disable tycho consumer POM generation (not needed here, and avoids a
warning in each module)
* remove prerequisites. that's for maven plugins only, and this POM
already contains the better suited similar maven enforcer rule
* enforce UTF-8 for javadoc generation (the build fails on Windows
otherwise, trying to read some Japanese? characters with the Windows
default encoding)
2023-12-28 14:35:58 -05:00
Jonah Graham
37ff19400f
Quote eclipse in cleanup script (#661)
This is to support cases where eclipse is installed in path
with spaces
2023-12-27 20:58:12 -05:00
betamax
959c02755c
Allows launch config to override launch target connection type (#625)
When launching a GDB debug session using the Launch Bar and a Launch
Target, now the launch takes into account a REMOTE_TCP value in the
launch configuration before considering the type of the Launch Target.

Improves the change submitted in:
Bug 547881 - Allow targets to set ATTR_REMOTE_TCP

Fixes issue #622
2023-12-27 18:42:00 -05:00
Shahzad Iftikhar
93c136de3c
Fix cursor behavior in memory view on HiDPI (#645)
Cursor not behaving correctly in memory view editor while
chaging variable value on Hi-DPI #641

Used GC.textExtent() method for getting width of a character as
it handles zooming factor

Fixes https://github.com/eclipse-cdt/cdt/issues/641
2023-12-27 18:06:50 -05:00
Marc-Andre Laperle
533125c6d4
Support for __is_function Clang/GCC built-in (#654)
I don't remember exactly which code didn't parse for me initially
(probably MSVC), but I've found this in some std::is_function
(type_traits) implementation:
 #ifdef __clang__
__is_function(_Tp)
...

This is a missing built-in in CDT.
2023-12-27 16:49:05 -05:00
Marc-Andre Laperle
8d24554856
Fix a case of variable template instance not resolved (#655)
When the variable template was instantiated through an implicit name
(constructor), the current look-up point was used to determine whether
or not the variable instance was an explicit specialization but it's not
enough. During resolution of implicit name, the look-up was on the
constructor call, not on the variable instance. I'm not sure if the
current look-up should be changed but we already had the information
about the AST node being an explicit specialization down the stack, so
we just pass that info now and it seems safer than changing the look-up
point.
2023-12-27 16:44:53 -05:00
Michael Keppler
c1197e2504
Fix typo in build script output (#659) 2023-12-27 16:34:19 -05:00
John Dallaway
c37626a3d1 Provide helper class for PE64 objects
This class is intended to mirror the capabilities of the ElfHelper class
over time. Initial support allows for correct presentation of section
sizes within the Eclipse Properties view when a PE64 object file is
selected.
2023-12-22 11:55:51 +00:00
John Dallaway
dde763ac0c Support PE file inspection within static libraries 2023-12-19 15:56:52 +00:00
Gesa Hentschke
36110e1251
[#407] fix CompilerBuiltinsDetector for msys2 on Windows (#648)
[#407] fix CompilerBuiltinsDetector for msys2 on Windows

The cc.exe from mingw64 (part of Msys2) on Windows needs the bin folder
to be on the PATH to be executed. e.g. 'C:\msys64\mingw64\bin' must be
part of the PATH environment variable

fixes #407
2023-12-18 16:42:17 +01:00
John Dallaway
9aa6fb158d Use build CWD for object path processing within GNU archive files 2023-12-12 20:30:10 +00:00
Jonah Graham
f7a63377a6
Prepare repo for 11.5.0 (#633) 2023-12-06 18:48:15 -05:00
Jonah Graham
a9e1ddb81e CDT 11.4.0 composites
Part of #548
2023-12-06 10:25:26 -05:00
Jonah Graham
029e4bda78 Prepare repo for 11.4.0 RC2 2023-11-27 11:08:34 -05:00
Jonah Graham
4aa793a651
Use the bundle providing javax.activation package in simrel (#626)
Because javax.activation 1.2.2.v20221203-1659 is in SimRel (for now)
it gets picked by p2 over jakarta.activation-api 1.2.2 which provides
the same packages.

As and when we update to Jave EE 9 (IIUC) we should be able to solve this
in a cleaner way and not rely on the old orbit bundles. Also, if and
when all projects contributing to simrel remove 1.2.2.v20221203-1659 then
we can change too.

The other option is to try to force the jakarta.activation-api 1.2.2 into
simrel and the EPP packages, but if we accidentally end up with both in
a product then other things don't work, e.g. like this error:

<details>
<summary>frame work error details</summary>

```java
!ENTRY org.eclipse.cdt.debug.application 4 0 2023-11-20 15:06:47.456
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.cdt.debug.application [101]
  Unresolved requirement: Require-Bundle: org.eclipse.cdt.dsf; bundle-version="2.4.0"
    -> Bundle-SymbolicName: org.eclipse.cdt.dsf; bundle-version="2.12.0.202211062329"; singleton:="true"
       org.eclipse.cdt.dsf [116]
         No resolution report for the bundle.  Unresolved requirement: Require-Bundle: org.eclipse.cdt.dsf.ui; bundle-version="2.4.0"
    -> Bundle-SymbolicName: org.eclipse.cdt.dsf.ui; bundle-version="2.7.200.202311031553"; singleton:="true"
       org.eclipse.cdt.dsf.ui [119]
         Unresolved requirement: Require-Bundle: org.eclipse.cdt.dsf; bundle-version="2.0.0"
           -> Bundle-SymbolicName: org.eclipse.cdt.dsf; bundle-version="2.12.0.202211062329"; singleton:="true"
  Unresolved requirement: Require-Bundle: org.eclipse.cdt.gdb; bundle-version="7.0.0"
    -> Bundle-SymbolicName: org.eclipse.cdt.gdb; bundle-version="7.2.100.202303140100"; singleton:="true"
       org.eclipse.cdt.gdb [121]
         No resolution report for the bundle.  Unresolved requirement: Require-Bundle: org.eclipse.cdt.dsf.gdb.ui; bundle-version="2.4.0"
    -> Bundle-SymbolicName: org.eclipse.cdt.dsf.gdb.ui; bundle-version="2.8.300.202309151124"; singleton:="true"
       org.eclipse.cdt.dsf.gdb.ui [118]
         Unresolved requirement: Require-Bundle: org.eclipse.cdt.dsf.ui
           -> Bundle-SymbolicName: org.eclipse.cdt.dsf.ui; bundle-version="2.7.200.202311031553"; singleton:="true"
         Unresolved requirement: Require-Bundle: org.eclipse.cdt.dsf.gdb; bundle-version="[7.0.0,8.0.0)"
           -> Bundle-SymbolicName: org.eclipse.cdt.dsf.gdb; bundle-version="7.1.200.202309151124"; singleton:="true"
              org.eclipse.cdt.dsf.gdb [117]
                Unresolved requirement: Require-Bundle: org.eclipse.cdt.dsf
                  -> Bundle-SymbolicName: org.eclipse.cdt.dsf; bundle-version="2.12.0.202211062329"; singleton:="true"
                Unresolved requirement: Require-Bundle: org.eclipse.cdt.native.serial; bundle-version="1.1.100"
                  -> Bundle-SymbolicName: org.eclipse.cdt.native.serial; bundle-version="11.4.0.202311201859"
                     org.eclipse.cdt.native.serial [141]
                       No resolution report for the bundle.                Unresolved requirement: Require-Bundle: org.eclipse.cdt.gdb; bundle-version="7.0.0"
                  -> Bundle-SymbolicName: org.eclipse.cdt.gdb; bundle-version="7.2.100.202303140100"; singleton:="true"
         Unresolved requirement: Require-Bundle: org.eclipse.cdt.native.serial; bundle-version="1.1.100"
           -> Bundle-SymbolicName: org.eclipse.cdt.native.serial; bundle-version="11.4.0.202311201859"
         Unresolved requirement: Require-Bundle: org.eclipse.tm.terminal.control; bundle-version="4.0.0"
           -> Bundle-SymbolicName: org.eclipse.tm.terminal.control; bundle-version="5.5.100.202311142253"; singleton:="true"
              org.eclipse.tm.terminal.control [506]
                No resolution report for the bundle.         Unresolved requirement: Require-Bundle: org.eclipse.cdt.dsf
           -> Bundle-SymbolicName: org.eclipse.cdt.dsf; bundle-version="2.12.0.202211062329"; singleton:="true"
  Unresolved requirement: Require-Bundle: jakarta.activation-api; bundle-version="[1.2.2,2.0.0)"
    -> Bundle-SymbolicName: jakarta.activation-api; bundle-version="1.2.2"
       jakarta.activation-api [30]
         No resolution report for the bundle.  Unresolved requirement: Require-Bundle: org.eclipse.cdt.dsf.gdb; bundle-version="4.2.0"
    -> Bundle-SymbolicName: org.eclipse.cdt.dsf.gdb; bundle-version="7.1.200.202309151124"; singleton:="true"
  Unresolved requirement: Require-Bundle: org.eclipse.cdt.gdb.ui; bundle-version="7.0.0"
    -> Bundle-SymbolicName: org.eclipse.cdt.gdb.ui; bundle-version="7.2.0.202211062329"; singleton:="true"
       org.eclipse.cdt.gdb.ui [122]
         No resolution report for the bundle.  Bundle was not resolved because of a uses constraint violation.
  org.apache.felix.resolver.reason.ReasonException: Uses constraint violation. Unable to resolve resource org.eclipse.cdt.debug.application [osgi.identity; osgi.identity="org.eclipse.cdt.debug.application"; type="osgi.bundle"; version:Version="11.4.0.202311201855"; singleton:="true"] because it is exposed to package 'javax.activation' from resources jakarta.activation-api [osgi.identity; osgi.identity="jakarta.activation-api"; type="osgi.bundle"; version:Version="1.2.2"] and javax.activation [osgi.identity; osgi.identity="javax.activation"; type="osgi.bundle"; version:Version="1.2.2.v20221203-1659"] via two dependency chains.

Chain 1:
  org.eclipse.cdt.debug.application [osgi.identity; osgi.identity="org.eclipse.cdt.debug.application"; type="osgi.bundle"; version:Version="11.4.0.202311201855"; singleton:="true"]
    require: (&(osgi.wiring.bundle=jakarta.activation-api)(&(bundle-version>=1.2.2)(!(bundle-version>=2.0.0))))
     |
    provide: osgi.wiring.bundle: jakarta.activation-api
  jakarta.activation-api [osgi.identity; osgi.identity="jakarta.activation-api"; type="osgi.bundle"; version:Version="1.2.2"]

Chain 2:
  org.eclipse.cdt.debug.application [osgi.identity; osgi.identity="org.eclipse.cdt.debug.application"; type="osgi.bundle"; version:Version="11.4.0.202311201855"; singleton:="true"]
    require: (&(osgi.wiring.bundle=jakarta.xml.bind-api)(&(bundle-version>=2.3.3)(!(bundle-version>=3.0.0))))
     |
    provide: osgi.wiring.bundle; bundle-version:Version="2.3.3"; osgi.wiring.bundle="jakarta.xml.bind-api"
  jakarta.xml.bind-api [osgi.identity; osgi.identity="jakarta.xml.bind-api"; type="osgi.bundle"; version:Version="2.3.3"]
    import: (osgi.wiring.package=javax.activation)
     |
    export: osgi.wiring.package: javax.activation
  javax.activation [osgi.identity; osgi.identity="javax.activation"; type="osgi.bundle"; version:Version="1.2.2.v20221203-1659"]
	at org.eclipse.osgi.container.Module.start(Module.java:463)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1852)
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1845)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1786)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1750)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1672)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)
```

</details>

The underlying problem here is that the debug application's "product" that
gets converted to a config.ini at CDT build time doesn't expose its
dependencies fully to p2, so we end up with a built product in EPP that
doesn't have everything listed in config.ini.

There is significant maintenance overhead and it is growing to keeping
standalone as it is now working. Other options should probably be considered,
such as using the config of the full product when launching.

Fixes #591
2023-11-21 13:57:24 -05:00
Jonah Graham
1c52b57b85 Prepare repo for 11.4.0 RC1 2023-11-20 16:19:38 -05:00
Jonah Graham
83f09f72d1 Ensure correct version of javax.activation and JAXB end up in final repo 2023-11-20 16:19:38 -05:00
Jonah Graham
ddc8470df6
Prepare repo for CDT 11.4.0 M3 (#618)
Includes updating to latest target platform. This should
also fix #591 but it is hard to tell until after it is
integrated into SimRel and the output checked in EPP.

Fixes https://github.com/eclipse-cdt/cdt/issues/591
Part of #548
2023-11-15 13:03:41 -05:00
Jonah Graham
050770d37a
Add a missing null check since terminal properties can be null (#620)
Removes a redundant map lookup too.

Fixes #617
2023-11-14 18:24:29 -05:00
Jonah Graham
9ba721566d
Convert \b to 0x7f to properly handle backspace in the terminal (#619)
Includes a new system property `org.eclipse.tm.terminal.control.convertBackspace`
to allow us to disable this new behaviour in the field if it turns out that
some terminal/host combination does not like this conversion.

Fixes #392
2023-11-14 17:53:17 -05:00
John Dallaway
f5754e2723 Add GNU linker library grouping option to N&N 2023-11-13 18:32:02 +00:00
John Dallaway
f39707a293 Add GNU C++ linker library grouping option to MBS 2023-11-12 17:05:19 +00:00
John Dallaway
e31815210e Add GNU linker library grouping option to MBS 2023-11-10 13:07:33 +00:00
Jonah Graham
08abfa2957
Avoid unnecessarily storing document in actions (#607)
With the first part of the fix in #603 we recreate the document
regularly (on each context change) therefore we need to let any
consumers of the document fetch the current version of the document
from the editor (by calling getAdapter(IDocument.class)) when
it is needed, rather than caching it.

Fixes #603
2023-11-03 11:53:35 -04:00
Jonah Graham
27bee70634
Save additional exception info (#604)
When a position exception was raised the info was
lost of the underlying exception.

See #603
2023-10-26 11:13:48 -04:00
Jonah Graham
d09d3f8e97 Bump version for 11.4 development 2023-10-26 09:02:14 -04:00
Jonah Graham
4a87d7be70 Fix disassembly view when view is reset
The view can be reset in a couple of ways, by changing debug
context or manually refreshing. With this change in Platform
https://github.com/eclipse-platform/eclipse.platform.ui/pull/963
the CDT violation of the API aronud resetting state of the
document was exposed.

Therefore the solution is to instead of trying to reset the
state of the existing document, create a new one when the
view is reset.

Fixes #603
2023-10-26 09:02:14 -04:00
John Dallaway
52926de56a Add translation unit presentation improvements to N&N 2023-10-21 16:05:13 +01:00
John Dallaway
8e5004827e Provide viewer filter for absent C/C++ translation unit files 2023-10-20 16:38:05 +01:00
John Dallaway
6e3d2da301 Do not handle absent external translation units 2023-10-14 12:46:41 +01:00
John Dallaway
4036cd3084 Decorate absent external translation units 2023-10-12 17:54:35 +01:00
Alexander Fedorov
b0317c09ed Revert "[#592] Managed Build Definitions : prefer "identifier" type of attribute"
This reverts commit 7136606455.
2023-10-11 21:58:54 +03:00
Alexander Fedorov
7136606455 [#592] Managed Build Definitions : prefer "identifier" type of attribute
Add meta information for id-like attributes

Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2023-10-11 20:32:15 +03:00
John Dallaway
e1a8c4683a Sort external translation units by name 2023-10-11 08:47:52 +01:00
Jonah Graham
48df0ae2dc
Update apt before trying to install in GHA workflows (#586)
Fixes https://github.com/eclipse-cdt/cdt/pull/581#issuecomment-1752771968
2023-10-09 19:29:15 -04:00
John Dallaway
5c73848e2a Adorn images for external translation unit elements 2023-09-26 22:40:52 +01:00
Jonah Graham
54568402dc Save changes in CDT.setup and related files
Edits made in these files using the IDE lead to these changes,
therefore commit the changes.
2023-09-25 12:22:43 -04:00
Jonah Graham
4b2f711d4e Force CDT.setup to use specific target platform version
CDT.setup was allowing devs to choose the target platform, but
in reality most choices don't work. Instead force the known
correct value which is what Eclipse Platform does too.

Fixes #571
2023-09-25 12:22:43 -04:00
John Dallaway
8ca56de402 Detect MSYS2 UCRT64 toolchains 2023-09-25 16:02:05 +01:00