1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00
Commit graph

23376 commits

Author SHA1 Message Date
Marc Khouzam
eb66a8a2ee Bug 456942 - [junit] GDB does not report thread names in remote mode
Change-Id: I9ad3eefa715326ce6cc15f384cb13bbfd410f8db
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/39142
2015-01-07 11:30:25 -05:00
Marc Khouzam
5beb56ed69 Bug 455094 - StepIntoSelection cleanup after review
Change-Id: Id591e5c46ed86744b92c0931079fc798e39498ed
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/38177
2015-01-07 11:01:56 -05:00
Sergey Prigogin
0498b96805 Bug 449391 - Include guard name style 2015-01-06 21:03:55 -08:00
Sergey Prigogin
693185186e Cosmetics. 2015-01-06 21:02:42 -08:00
Sergey Prigogin
ce73d736bd Fixed an NPE. 2015-01-06 16:41:30 -08:00
Sergey Prigogin
91d2fb6a4b Removed unused messages. 2015-01-06 16:41:28 -08:00
Sergey Prigogin
504a9e864a Suppressed a usage warning. 2015-01-06 16:41:27 -08:00
Sergey Prigogin
90703c8f55 Cosmetics. 2015-01-06 16:41:25 -08:00
Sergey Prigogin
252eaf4c0f Incremented CDT feature version to 8.6.0.
Change-Id: Ic90c8e6a68d21e5b90ec3fac997da6a95a29bedf
Signed-off-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Reviewed-on: https://git.eclipse.org/r/39066
Tested-by: Hudson CI
2015-01-06 19:40:38 -05:00
Sergey Prigogin
39c8cf14fd Fixed include guard adjustment when renaming a project. 2015-01-06 15:40:33 -08:00
Sergey Prigogin
4efe6e815e Cosmetics. 2015-01-06 15:38:52 -08:00
Alena Laskavaia
5626442f0e Added API to construct Addr64 from long
Change-Id: Iccb489f290711d806d499cfa763a06dab4e61f4d
Signed-off-by: Alena Laskavaia <elaskavaia.cdt@gmail.com>
Reviewed-on: https://git.eclipse.org/r/38496
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
2015-01-06 09:46:31 -05:00
Sergey Prigogin
bcc3aad840 Bug 456099. Added a test for NameComposer.createByExample method. 2015-01-05 19:09:44 -08:00
Sergey Prigogin
75900af3ae Improved "Expand Selection To Enclosing Element" command for template
definitions.
2015-01-05 19:08:39 -08:00
Sergey Prigogin
5d6e09d1cb Cosmetics. 2015-01-05 18:58:03 -08:00
Sergey Prigogin
52f60a00ba Added a test for string concatenation with macro. 2015-01-05 16:02:33 -08:00
Sergey Prigogin
3637dd4923 Cosmetics. 2015-01-05 16:02:31 -08:00
Simon Marchi
4af00a316e MIRegistersTest: use more specific assert functions
Using more specific assert functions (e.g. assertEquals(a, b) rather than
assertTrue(a.equals(b)) helps a bit to make the test more readable. It can
also improve the display in the JUnit view, by showing expected and actual
values.

Also, there is no need to manually catch an exception and fail the test. If
an exception is thrown, the test will fail automatically.

Change-Id: I333cfd0d0ade41463dc773ab02e14df4b063a22f
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/38617
Reviewed-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
Tested-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
2015-01-05 17:01:22 -05:00
Michi
bb17286834 Bug 422401 - [Content Assist] no binding for nested types of a base
class

The problem was with template base classes as in the unit test.
Accessibility check did not find the proper AccessContext.namingClass
and always ended further up in the class tree.

Change-Id: I447567cabd20ad5c57c05a9ffa5f0f12c5321ccf
Signed-off-by: Michi <woskimi@yahoo.de>
Reviewed-on: https://git.eclipse.org/r/38944
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2015-01-04 19:58:05 -05:00
Michi
ff7056130e Bug 456579 - Improve CSourceHover and OpenDeclaration for TemplateIds
When the nodeSelector detects an IASTNode that has a TemplateId parent
we use that instead of the original. The benefit is that we also get the
template parameters so we can find template specialization matches.

Change-Id: I3751efdb15e868b4aa6688ad338227e0d0c5bcd8
Signed-off-by: Michi <woskimi@yahoo.de>
Reviewed-on: https://git.eclipse.org/r/38923
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2015-01-04 02:34:22 -05:00
Michi
d7e2618b8f Bug 424565 - 'Open Declaration' on use of alias template defined in base
class 

This should work now for AliasTemplates from AST and PDOM.

SourceHover is also affected.

Are there any unit tests for this?
Change-Id: I54a9c2d6cd0851f901b917a57d79616298699299
Signed-off-by: Michi <woskimi@yahoo.de>
Reviewed-on: https://git.eclipse.org/r/38919
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2015-01-04 01:40:19 -05:00
Vladimir Prus
7aa9cf6efc Bug 453920: Remove code duplication between MIVar and MIVarCreateInfo.
Change-Id: I1c291fa235fe77910b6bea7ad98f269d8949fc5c
Signed-off-by: Vladimir Prus <vladimir@codesourcery.com>
Reviewed-on: https://git.eclipse.org/r/37475
Tested-by: Hudson CI
2014-12-31 08:58:53 -05:00
Michi
84add6a4bd Bug 456340 ClassCastException when typedef refers to basic type
Change-Id: If1a65f6160e9398e1c40df194281414a4e422036
Signed-off-by: Michi <woskimi@yahoo.de>
Reviewed-on: https://git.eclipse.org/r/38845
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-12-30 20:58:52 -05:00
Sergey Prigogin
7eb2e1340a Bug 456099. Added change description. 2014-12-30 17:12:33 -08:00
Sergey Prigogin
fb6cf9f410 Bug 456099. More flexible file name matching algorithm. 2014-12-30 16:05:35 -08:00
Sergey Prigogin
6de0d0163b Cosmetics. 2014-12-30 14:45:33 -08:00
Sergey Prigogin
8758a144a7 Bug 456099. Moved a premature assertion. 2014-12-30 09:57:56 -08:00
Sergey Prigogin
b235e472b5 Disabled a flaky test. 2014-12-29 10:10:09 -08:00
Michi
690fc119bb Bug 456101 - class template is refering to itself in code completion
a CPPASTQualifiedName that represents some template instance can never
refer to a template of the same type

Change-Id: Iaf9a452e4797fc0e797e5ed5ccaadfb00ff4fb8f
Signed-off-by: Michi <woskimi@yahoo.de>
Reviewed-on: https://git.eclipse.org/r/38730
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-12-29 10:39:01 -05:00
Nathan Ridge
cc7bf7b392 Bug 456207 - Skip ICPPASTFunctionDeclarator.getNoexceptExpression() in
ASTComparer

Change-Id: I298f52e9ad21643d8fe58283e0c30e95c12b92ad
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/38788
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-12-27 18:14:22 -05:00
Nathan Ridge
787d0e1642 Bug 456131 - Remove duplicate builtin symbol for __atomic_add_fetch
Change-Id: Icb753202c7678ec75f603edac003dbd199513b07
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/38787
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-12-27 18:13:02 -05:00
Simon Marchi
9bbd8d4f3e debug tests: Don't catch exception in SyncUtil context getters
When catching the exception and failing the test manually, we loose the
information about the root cause of the problem. We let the exception
propagate so that JUnit will show a useful trace.

Change-Id: I1df26283f42b58b4dda68ab9e8c11cca27ae81c8
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/38771
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
2014-12-25 13:51:00 -05:00
Simon Marchi
24301e7396 debug tests: Change -dwarf-2 to -g in tests Makefile
-gdwarf-2 was added specifically when the default debug format was
stabs, to force using the DWARF format. It is irrelevant nowadays, and
we want to let the compiler choose the DWARF version it prefers.

Change-Id: I300fab09b492704ca3d3a61446b8dd0ce36167c2
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/38766
Tested-by: Hudson CI
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
2014-12-25 13:48:43 -05:00
Simon Marchi
806a0e65a4 Disable LaunchConfigurationAndRestartTest.testSourceGdbInit for gdb < 7.2
When executing the launch sequence in testSourceGdbInit, gdb 7.1 inserts
an extraneous \n in one of its replies, causing an assert to be hit.

Since we don't actively support that version, let's just disable the
test.

Change-Id: I9544835ead72e1701766d76fafa0e63f3b88911d
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/38768
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
2014-12-25 13:44:51 -05:00
Marc Khouzam
2b935a5172 Only enable remote tests for gdb versions >= 7.1
Change-Id: Ia42a2dc330d739181167bf5511ff976a36ab180f
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2014-12-24 13:50:04 -05:00
Marc Khouzam
68453d4a1f Enable the GDB 7.1 test suite.
Change-Id: I3d21bfbc8f2f9e99c7b5bda9a68243218346f61b
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2014-12-24 13:46:26 -05:00
Simon Marchi
8741098869 debug tests: Don't catch exception in LaunchConfigurationAndRestartTest.doLaunch
When catching the exception and failing the test manually, the root cause
exception is hidden. If we let the exception propagate, JUnit will fail
the test automatically, and will provide a detailed stack trace.

Change-Id: Ife099d4598109dd0901b14d482b89545cfd01d68
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/38765
Tested-by: Hudson CI
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
2014-12-24 13:41:10 -05:00
Sergey Prigogin
f11fcce2ee Bug 456099. Corrected include replacement in partner files. 2014-12-23 21:18:40 -08:00
Marc Khouzam
f582de0a88 Resume threads individually in GDBMultiNonStopRunControlTest.
For older GDBs, we don't support resuming the entire process. The tests
in GDBMultiNonStopRunControlTest were trying to resume the entire
process as a shortcut and it was failing for GDB 7.1 and probably older
ones too.

This change loops over all suspended threads of the process and resumes
them individually.


Change-Id: Ie1056aa9775114c3a0d795a49d87d6efe431785d
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/38742
Tested-by: Hudson CI
2014-12-23 20:28:02 -05:00
Marc Khouzam
8353e5c321 Update GDBPatternMatching test for older GDBs.
Over the years GDB is showing more registers than before.  When the
GDBPatternMatching tests were first written, some random registers were
used.  This update uses registers that are available for both old and
new gdb versions, as well as 32bit and 64bit architectures.

Change-Id: Ibbbd50d240f295e1a745fae217013f21aeabff8a
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/38736
Tested-by: Hudson CI
2014-12-23 20:16:41 -05:00
Simon Marchi
6edff928a1 debug tests: Disable some reverse tests for gdb 7.0 and 7.1
The following tests fail with gdb 7.0 and 7.1:

  - testStopAtMainWithReverse(Restart)?
  - testStopAtOtherWithReverse(Restart)?

The reason is that execution crosses getenv() while recording is
enabled. gdb has some trouble with that, and outputs an error such as:

	warning: Process record ignores the memory change of instruction at address 0x7ffff7de951f because it can't get the value of the segment register.
	warning: Process record ignores the memory change of instruction at address 0x7ffff7de9576 because it can't get the value of the segment register.
	Process record doesn't support instruction 0xfef at address 0x7ffff7a9e5e2.
	Process record: failed to record execution log.

	[process 6993] #1 stopped.
	0x00007ffff7a9e5e0 in strlen () from /lib/x86_64-linux-gnu/libc.so.6

We could either make the test "easier" to make it pass on those gdb
versions, or disable it for those gdb versions. By "easier", I mean just
execute some simple arithmetic instead of some calls to libc.

I think it is counter-productive to reduce the span of the tests just to
make some old gdb versions happy, so I chose to disable it for those.
Actually, the best would be to write a new test which covers less but
passes for all versions.

Change-Id: I98499fbb5c099232bc39dad3906d7348912b89af
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/38735
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Hudson CI
2014-12-23 16:26:07 -05:00
Simon Marchi
65e13b7344 debug tests: Adapt thread name test for platforms that don't support them
gdb only started reporting thread names at version 7.3. On Windows, they
are never reported.

If somebody wants to enhance the check for MAC OS X, feel free to do it!

Change-Id: I9d028b24930b632678941682da65cd51da9e88dd
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/38728
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
2014-12-23 14:45:20 -05:00
Simon Marchi
dd4ae589c2 debug tests: Add runningOnWindows() method to BaseTestCase
Change-Id: Ic7fd197cdaddf8824ac1ef43261c056678433865
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/38727
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
2014-12-23 14:42:12 -05:00
Simon Marchi
1333b20ec5 Avoid gdb bug in StepIntoSelectionTests for gdb <= 7.3
When a breakpoint is set directly at the start of a function, and you step
into that function, gdb <= 7.3 will generate a "stopped" event with two
reason fields. The first to indicate that the step range ended and the
other to indicate that a breakpoint was hit. While this is not really
correct from gdb to include the same field twice in a single event,
the implementation of MIRunControlEventProcessor_7_0 will generate two
distinct MIStoppedEvent events. This confuses the step-into-selection
mechanism, who will issue two finish/step-return instead of one.

For all gdbs, we will have a test where the breakpoint is a not at the
function entry.

Then, for gdb > 7.3, we will have the same test but with the breakpoint
at the function entry, to test that particular case. This case is known
to be broken with gdb <= 7.3 (rather old) and will stay that way unless
somebody feels like fixing it.

So, for both:

- atDoubleMethodStopAtBreakpoint
- atDoubleMethodSkipBreakpoint

I extracted the code in a common function which takes in parameter the
line to set the breakpoint at.

Change-Id: I2ae4bc527afe0ab195e9b066279ed92f74d652f3
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/38717
Tested-by: Hudson CI
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
2014-12-23 13:46:48 -05:00
Sergey Prigogin
b74feb2c3d Bug 456099 - Renaming a class should also rename related files 2014-12-23 10:30:31 -08:00
Sergey Prigogin
f86ee9bbf7 Cosmetics. 2014-12-23 10:30:29 -08:00
Sergey Prigogin
d26dc27212 Adjusted method visibility. 2014-12-23 10:30:28 -08:00
Sergey Prigogin
5cd381dfe8 Cosmetics. 2014-12-23 10:30:26 -08:00
Marc Khouzam
77c0f78b4f Bug 456083 - Wrong preference scope causes test dependencies
Change-Id: I36b91e6c0c8180919e033d7630db92f148b69214
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/38721
Tested-by: Hudson CI
2014-12-23 10:58:53 -05:00
Marc Khouzam
355503f746 Typos
Change-Id: I78bd2f2f640dcac283bf0bc4259d6acf3080a3c2
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2014-12-23 09:25:44 -05:00