From 125220eb635e23345b7df22dd540e1d057f3a4f3 Mon Sep 17 00:00:00 2001 From: Jonah Graham Date: Fri, 9 Jun 2017 23:20:39 +0100 Subject: [PATCH] Bug 516102: Add fs_base as new register in GDB 8.0 Change-Id: Ia0600cca38153139fe0b6fb63f087821e0cd336a --- .../gdb/tests/GDBPatternMatchingExpressionsTest.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBPatternMatchingExpressionsTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBPatternMatchingExpressionsTest.java index 8158a3055c9..6fe8014a6d7 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBPatternMatchingExpressionsTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBPatternMatchingExpressionsTest.java @@ -410,7 +410,15 @@ public class GDBPatternMatchingExpressionsTest extends BaseParametrizedTestCase @Test public void testMatchRegWithStar() throws Throwable { final String exprString = "=$f*"; - final String[] children = new String[] { "$fctrl", "$fioff", "$fiseg", "$fooff", "$fop", "$foseg", "$fs", "$fstat", "$ftag" }; + final String[] children; + if (isGdbVersionAtLeast("7.12.50")) { + // Starting in GDB 8.0 FS_BASE and GS_BASE are exposed + // See GDB commit 2735833: amd64-linux: expose system register FS_BASE and GS_BASE for Linux. + // Ubuntu is shipping pre-release GDB 8.0, which is versioned as 7.12.50. + children = new String[] { "$fctrl", "$fioff", "$fiseg", "$fooff", "$fop", "$foseg", "$fs", "$fs_base", "$fstat", "$ftag" }; + } else { + children = new String[] { "$fctrl", "$fioff", "$fiseg", "$fooff", "$fop", "$foseg", "$fs", "$fstat", "$ftag" }; + } SyncUtil.runToLocation("foo"); MIStoppedEvent stoppedEvent = SyncUtil.step(5, StepType.STEP_OVER);