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
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
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>
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>
Currently, I get the following error:
g++ -gdwarf-2 -pthread -o ../bin/MultiThreadRunControl.exe
MultiThreadRunControl.cc
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe:
cannot find -lpthread
I could install the pthreads package for mingw, and it would probably
work, but we don't use pthreads on windows, so it's better to just not
link with it.
Change-Id: I5deb58c5b69a98b77e9e9a4a744c6815c830cf20
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/37611
Bug 235747: Move register group actions to the command framework.
Change-Id: Ife5aefc1a1609309724db01d92a35750e25def24
Signed-off-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/13980
Tested-by: Hudson CI
Change-Id: I3e04a56d218fdb2f189c06968c4f2d2671327838
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/36435
Tested-by: Hudson CI
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
The targets that define dsf.gdb.tests.timeout.multiplier need extra time to execute in resumeUntilStopped.
Change-Id: I2de513ea2de63d4276a49fb6daa4aa6892a5e843
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/35907
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
We could go more complicated and only rebuild those source files that are
affected by the changes in the header files, but I think this is a good
compromise.
Change-Id: I508e8ca0176408c68a16e09c51f005446aace099
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/36797
Tested-by: Hudson CI
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
I don't see any reason to take a String for a line number. This avoids
doing Integer.toString in a few places.
Change-Id: I4618b8c783100a406ff25d229b3b703b1d24f772
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/36876
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
This changes the Makefile that builds test apps so that it uses the
proper Makefile structures, rather than a single shell command.
Also, this will compile .c files with gcc and .cc files with g++,
allowing to have both.
Also, I changed the .exe extension justification from "so that CVS does
not include it when making a patch" to "so that files are named the same
way in Linux and Windows". It seems more reasonable.
Change-Id: I4414b1dc5c31a9eaa7edaed30e53363b9a76dd8f
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/36488
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Hudson CI
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
We are getting intermittend failures on the GDBConsoleBreakpointsTest
due to the fact that we create and then try to delete a breakpoint so
fast that the MIBreakpointsManager does not have enough time to update
its data structures.
This is something specific to automated tests, as a user won't be able
to delete a breakpoint so fast.
Change-Id: I4b220cc859b7ee45e1b8dbde0edbcaa38b9dfe34
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/33432
Tested-by: Hudson CI
Reviewed-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
This will make the build not fail but complete with errors.
Also, only build the test apps if we are going to run the tests.
Change-Id: I1a16eb812df45279d973ead37038683b5b0a5dff
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/33406
Tested-by: Hudson CI
Reviewed-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
Jacoco arguments are missing when executing certain tests. This happens when
argLine is being overriden. We had the same problem in Linux Tools. We solved
it by prepending the argLine with ${tycho.testArgLine}. This should help
improving the Code coverage metric in Sonar.
Also update the jacoco version to fix a bug when building with Java 8.
Change-Id: I7f73f40488efc01fc7d643940c1ac0d5950c900d
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/32507
Tested-by: Hudson CI
Reviewed-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
upon failure.
Change-Id: Ia3cfe4fb455f4ca5048e629c623bba6331264b09
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/30096
Tested-by: Hudson CI
concurency issue where the AsyncCompletionWaitor was being accessed by
more than one thread but was not properly synchronized.
Change-Id: I5c6f063ca519787a0cc45281c0632fcf07b763d5
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/30089
Tested-by: Hudson CI