From b971029699df4cae8b29dbea8a669c666e7e4613 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Thu, 1 Mar 2012 10:08:19 -0500 Subject: [PATCH] Bug 371198 - Fix a couple of stopAtMain test cases. --- .../eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java index cbc0901fafb..1ea3311afd8 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java @@ -148,9 +148,13 @@ public class BaseTestCase { // Store the corresponding MI *stopped event fInitialStoppedEvent = (MIStoppedEvent)miEvent; - // Check the content of the frame for "main" + // Check the content of the frame for the method we should stop at + String stopAt = (String)launchAttributes.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL); + if (stopAt == null) stopAt = "main"; + MIFrame frame = fInitialStoppedEvent.getFrame(); - if (frame != null && "main".equals(frame.getFunction())) { + if (frame != null && + frame.getFunction() != null && frame.getFunction().indexOf(stopAt) != -1) { // Set the event semaphore that will allow the test to proceed synchronized (fTargetSuspendedSem) { fTargetSuspended = true;