Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 346320 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/cdt/dsf/gdb/internal/tracepointactions/TracepointActionManager.java (+4 lines)
Lines 39-44 Link Here
39
	private static final String TRACEPOINT_ACTION_DATA = "TracepointActionManager.actionData"; //$NON-NLS-1$
39
	private static final String TRACEPOINT_ACTION_DATA = "TracepointActionManager.actionData"; //$NON-NLS-1$
40
    private static final TracepointActionManager fTracepointActionManager = new TracepointActionManager();
40
    private static final TracepointActionManager fTracepointActionManager = new TracepointActionManager();
41
    
41
    
42
    // We need a delimiter that the user won't type directly.
43
    // Bug 346215
44
    public static final String TRACEPOINT_ACTION_DELIMITER = "%_#"; //$NON-NLS-1$
45
    
42
	private ArrayList<ITracepointAction> tracepointActions = null;
46
	private ArrayList<ITracepointAction> tracepointActions = null;
43
47
44
	private TracepointActionManager() {
48
	private TracepointActionManager() {
(-)src/org/eclipse/cdt/dsf/gdb/service/GDBBreakpoints_7_0.java (-1 / +1 lines)
Lines 325-331 Link Here
325
	}
325
	}
326
	
326
	
327
	private ITracepointAction[] generateGdbCommands(String actionStr) {
327
	private ITracepointAction[] generateGdbCommands(String actionStr) {
328
		String[] actionNames = actionStr.split(","); //$NON-NLS-1$
328
		String[] actionNames = actionStr.split(TracepointActionManager.TRACEPOINT_ACTION_DELIMITER);
329
		ITracepointAction[] actions = new ITracepointAction[actionNames.length];
329
		ITracepointAction[] actions = new ITracepointAction[actionNames.length];
330
330
331
		TracepointActionManager actionManager = TracepointActionManager.getInstance();
331
		TracepointActionManager actionManager = TracepointActionManager.getInstance();
(-)src/org/eclipse/cdt/dsf/gdb/service/GDBBreakpoints_7_2.java (+184 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2010 Ericsson and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     Ericsson - Initial API and implementation 
10
 *******************************************************************************/
11
package org.eclipse.cdt.dsf.gdb.service;
12
13
import java.util.HashMap;
14
import java.util.Hashtable;
15
import java.util.Map;
16
17
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
18
import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor;
19
import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
20
import org.eclipse.cdt.dsf.datamodel.IDMContext;
21
import org.eclipse.cdt.dsf.debug.service.IBreakpoints;
22
import org.eclipse.cdt.dsf.debug.service.IBreakpointsExtension;
23
import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
24
import org.eclipse.cdt.dsf.mi.service.IMICommandControl;
25
import org.eclipse.cdt.dsf.mi.service.MIBreakpointDMData;
26
import org.eclipse.cdt.dsf.mi.service.MIBreakpoints;
27
import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakInsertInfo;
28
import org.eclipse.cdt.dsf.service.DsfSession;
29
import org.eclipse.core.runtime.IStatus;
30
import org.eclipse.core.runtime.Status;
31
32
/**
33
 * Breakpoint service for GDB 7.2.
34
 * It support MI for tracepoints.
35
 *
36
 * @since 4.0
37
 */
38
public class GDBBreakpoints_7_2 extends GDBBreakpoints_7_0
39
{
40
	private IMICommandControl fConnection;
41
42
	private enum TracePointSettingPreference { FAST_THEN_SLOW, FAST_ONLY, SLOW_ONLY };
43
	
44
	private TracePointSettingPreference fTracePointSettingPreference = TracePointSettingPreference.FAST_THEN_SLOW;
45
	
46
	public GDBBreakpoints_7_2(DsfSession session) {
47
		super(session);
48
	}
49
50
	/* (non-Javadoc)
51
	 * @see org.eclipse.cdt.dsf.service.AbstractDsfService#initialize(org.eclipse.cdt.dsf.concurrent.RequestMonitor)
52
	 */
53
	@Override
54
	public void initialize(final RequestMonitor rm) {
55
		super.initialize(new RequestMonitor(ImmediateExecutor.getInstance(), rm) {
56
			@Override
57
			protected void handleSuccess() {
58
				doInitialize(rm);
59
			}
60
		});
61
	}
62
63
	private void doInitialize(final RequestMonitor rm) {
64
    	// Get the services references
65
		fConnection = getServicesTracker().getService(IMICommandControl.class);
66
67
		// Register this service
68
		register(new String[] { IBreakpoints.class.getName(),
69
		                        IBreakpointsExtension.class.getName(),
70
								MIBreakpoints.class.getName(),
71
								GDBBreakpoints_7_0.class.getName(),
72
								GDBBreakpoints_7_2.class.getName() },
73
				new Hashtable<String, String>());
74
75
		rm.done();
76
	}
77
78
	@Override
79
	public void shutdown(RequestMonitor requestMonitor) {
80
        unregister();
81
		super.shutdown(requestMonitor);
82
	}
83
84
	protected void sendTracepointCommand(final IBreakpointsTargetDMContext context, final Map<String, Object> attributes, boolean isFastTracepoint, final DataRequestMonitor<IBreakpointDMContext> drm) {
85
		// Select the context breakpoints map
86
		final Map<Integer, MIBreakpointDMData> contextBreakpoints = getBreakpointMap(context);
87
		if (contextBreakpoints == null) {
88
       		drm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null));
89
       		drm.done();
90
			return;
91
		}
92
93
		// Extract the relevant parameters (providing default values to avoid potential NPEs)
94
		final String location = formatLocation(attributes);
95
		if (location.equals(NULL_STRING)) {
96
       		drm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null));
97
       		drm.done();
98
			return;
99
		}
100
101
		final Boolean enabled        = (Boolean) getProperty(attributes, MIBreakpoints.IS_ENABLED,        true);
102
		final String  condition      = (String)  getProperty(attributes, MIBreakpoints.CONDITION,         NULL_STRING);
103
104
		fConnection.queueCommand(
105
				fConnection.getCommandFactory().createMIBreakInsert(context, false, isFastTracepoint, condition, 0, location, 0, !enabled, true),
106
				new DataRequestMonitor<MIBreakInsertInfo>(getExecutor(), drm) {
107
					@Override
108
					protected void handleSuccess() {
109
						// With MI, an invalid location won't generate an error
110
						if (getData().getMIBreakpoints().length == 0) {
111
							drm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, REQUEST_FAILED, BREAKPOINT_INSERTION_FAILURE, null));
112
							drm.done();
113
							return;
114
						}
115
116
						// Create a breakpoint object and store it in the map
117
						final MIBreakpointDMData newBreakpoint = new MIBreakpointDMData(getData().getMIBreakpoints()[0]);
118
						int reference = newBreakpoint.getNumber();
119
						if (reference == -1) {
120
							drm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, REQUEST_FAILED, BREAKPOINT_INSERTION_FAILURE, null));
121
							drm.done();
122
							return;
123
						}
124
						contextBreakpoints.put(reference, newBreakpoint);
125
126
						// Format the return value
127
						MIBreakpointDMContext dmc = new MIBreakpointDMContext(GDBBreakpoints_7_2.this, new IDMContext[] { context }, reference);
128
						drm.setData(dmc);
129
130
						// Flag the event
131
						getSession().dispatchEvent(new BreakpointAddedEvent(dmc), getProperties());
132
						
133
						// Tracepoints are created with no passcount (passcount are not 
134
						// the same thing as ignore-count, which is not supported by
135
						// tracepoints).  We have to set the passcount manually now.
136
						// Same for commands.
137
						Map<String,Object> delta = new HashMap<String,Object>();
138
						delta.put(MIBreakpoints.PASS_COUNT, getProperty(attributes, MIBreakpoints.PASS_COUNT, 0));
139
						delta.put(MIBreakpoints.COMMANDS, getProperty(attributes, MIBreakpoints.COMMANDS, "")); //$NON-NLS-1$
140
						modifyBreakpoint(dmc, delta, drm, false);
141
					}
142
143
					@Override
144
					protected void handleError() {
145
						drm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, REQUEST_FAILED, BREAKPOINT_INSERTION_FAILURE, null));
146
						drm.done();
147
					}
148
				});
149
	}
150
	
151
	/**
152
	 * Add a tracepoint using MI.  We have three settings:
153
	 *   1- set only a fast tracepoint but if it fails, set a slow tracepoint
154
	 *   2- only set a fast tracepoint even if it fails
155
	 *   3- only set a slow tracepoint even if a fast tracepoint could have been used
156
	 */
157
	@Override
158
	protected void addTracepoint(final IBreakpointsTargetDMContext context, final Map<String, Object> attributes, final DataRequestMonitor<IBreakpointDMContext> drm) {
159
		// Unless we should only set slow tracepoints, we try to set a fast tracepoint.
160
		boolean isFastTracepoint = fTracePointSettingPreference != TracePointSettingPreference.SLOW_ONLY;
161
162
		sendTracepointCommand(context, attributes, isFastTracepoint, new DataRequestMonitor<IBreakpointDMContext>(ImmediateExecutor.getInstance(), drm) {
163
			@Override
164
			protected void handleSuccess() {
165
				// Tracepoint was set successfully.
166
				drm.setData(getData());
167
				drm.done();
168
			}
169
			@Override
170
			protected void handleError() {
171
				// Tracepoint failed to be set.
172
				if (fTracePointSettingPreference == TracePointSettingPreference.FAST_THEN_SLOW) {
173
					// In this case, we failed to set a fast tracepoint, but we should try to set a slow one.
174
					sendTracepointCommand(context, attributes, false, drm);
175
				} else {
176
					// We either failed to set a fast tracepoint and we should not try to set a slow one,
177
					// or we failed to set a slow one.  Either way, we are done.
178
					drm.setStatus(getStatus());
179
					drm.done();
180
				}
181
			}
182
		});
183
	}
184
}
(-)src/org/eclipse/cdt/dsf/gdb/service/GdbDebugServicesFactory.java (-2 / +7 lines)
Lines 98-103 Link Here
98
98
99
	@Override
99
	@Override
100
	protected IBreakpoints createBreakpointService(DsfSession session) {
100
	protected IBreakpoints createBreakpointService(DsfSession session) {
101
		// This service is available for GDB 7.2 but there is a pre-release of GDB that
102
		// supports the same features and has version of 6.8.50.20090414
103
		if (GDB_7_2_VERSION.compareTo(fVersion) <= 0 || "6.8.50.20090414".equals(fVersion)) { //$NON-NLS-1$
104
			return new GDBBreakpoints_7_2(session);
105
		}
101
		if (GDB_7_0_VERSION.compareTo(fVersion) <= 0) {
106
		if (GDB_7_0_VERSION.compareTo(fVersion) <= 0) {
102
			return new GDBBreakpoints_7_0(session);
107
			return new GDBBreakpoints_7_0(session);
103
		}
108
		}
Lines 184-191 Link Here
184
	
189
	
185
	/** @since 3.0 */
190
	/** @since 3.0 */
186
	protected IGDBTraceControl createTraceControlService(DsfSession session, ILaunchConfiguration config) {
191
	protected IGDBTraceControl createTraceControlService(DsfSession session, ILaunchConfiguration config) {
187
		// This service is available for GDB 7.2. But until that GDB is itself available
192
		// This service is available for GDB 7.2 but there is a pre-release of GDB that
188
		// there is a pre-release that has a version of 6.8.50.20090414
193
		// supports the same features and has version of 6.8.50.20090414
189
		if (GDB_7_2_VERSION.compareTo(fVersion) <= 0 || "6.8.50.20090414".equals(fVersion)) { //$NON-NLS-1$
194
		if (GDB_7_2_VERSION.compareTo(fVersion) <= 0 || "6.8.50.20090414".equals(fVersion)) { //$NON-NLS-1$
190
			return new GDBTraceControl_7_2(session, config);
195
			return new GDBTraceControl_7_2(session, config);
191
		}
196
		}
(-)src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakpoint.java (+22 lines)
Lines 17-22 Link Here
17
17
18
import java.util.StringTokenizer;
18
import java.util.StringTokenizer;
19
19
20
import org.eclipse.cdt.dsf.gdb.internal.tracepointactions.TracepointActionManager;
21
20
/**
22
/**
21
 * Contain info about the GDB/MI breakpoint.
23
 * Contain info about the GDB/MI breakpoint.
22
 * 
24
 * 
Lines 498-504 Link Here
498
            } else if (var.equals("pending")) { //$NON-NLS-1$
500
            } else if (var.equals("pending")) { //$NON-NLS-1$
499
            	// Only supported starting with GDB 6.8
501
            	// Only supported starting with GDB 6.8
500
                pending = true;
502
                pending = true;
503
            } else if (var.equals("script")) { //$NON-NLS-1$
504
            	if (value instanceof MITuple) {
505
            		parseCommands((MITuple)value);
506
            	}
507
            }
508
        }
509
    }
510
    
511
    void parseCommands(MITuple tuple) {
512
        MIValue[] values = tuple.getMIValues();
513
        StringBuffer cmds = new StringBuffer();
514
        for (int i = 0; i < values.length; i++) {
515
        	MIValue value = values[i];
516
            if (value != null && value instanceof MIConst) {
517
            	if (i > 0) {
518
            		// Insert a delimiter
519
            		cmds.append(TracepointActionManager.TRACEPOINT_ACTION_DELIMITER);
520
            	}
521
                cmds.append(((MIConst)value).getCString());
501
            }
522
            }
502
        }
523
        }
524
        setCommands(cmds.toString());
503
    }
525
    }
504
}
526
}
(-)src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionsList.java (-2 / +4 lines)
Lines 132-138 Link Here
132
		TableItem[] currentItems = table.getItems();
132
		TableItem[] currentItems = table.getItems();
133
		for (int i = 0; i < currentItems.length; i++) {
133
		for (int i = 0; i < currentItems.length; i++) {
134
			if (i > 0) {
134
			if (i > 0) {
135
				result.append(',');
135
				// Keep a delimiter between the different action strings
136
				// so we can separate them again.
137
				result.append(TracepointActionManager.TRACEPOINT_ACTION_DELIMITER);
136
			}
138
			}
137
			result.append(((ITracepointAction) currentItems[i].getData()).getName());
139
			result.append(((ITracepointAction) currentItems[i].getData()).getName());
138
		}
140
		}
Lines 179-185 Link Here
179
	public void setNames(String actionNames) {
181
	public void setNames(String actionNames) {
180
182
181
		table.removeAll();
183
		table.removeAll();
182
		String[] names = actionNames.split(","); //$NON-NLS-1$
184
		String[] names = actionNames.split(TracepointActionManager.TRACEPOINT_ACTION_DELIMITER);
183
185
184
		for (String actionName : names) {
186
		for (String actionName : names) {
185
			ITracepointAction action = TracepointActionManager.getInstance().findAction(actionName);
187
			ITracepointAction action = TracepointActionManager.getInstance().findAction(actionName);
(-)data/launch/src/TracepointTestApp.cc (-7 / +64 lines)
Lines 1-4 Link Here
1
#ifdef __MINGW32__
2
 #include <process.h>	// MinGW has no POSIX support; use MSVC runtime
3
#else
4
 #include <pthread.h>
5
#endif
1
#include <stdio.h>
6
#include <stdio.h>
7
#include <stdlib.h>
8
#include "Sleep.h"
9
#define NUM_THREADS	5
2
10
3
int gIntVar = 543;
11
int gIntVar = 543;
4
double gDoubleVar = 543.543;
12
double gDoubleVar = 543.543;
Lines 52-59 Link Here
52
	Z z;	
60
	Z z;	
53
};
61
};
54
62
55
void testTracepoints() {	
63
#ifdef __MINGW32__
56
    printf("Running TracepointTest App\n");
64
typedef unsigned int TID;
65
#else
66
typedef pthread_t TID;
67
#endif
68
69
70
#ifdef __MINGW32__
71
unsigned int __stdcall testTracepoints(void *threadid)
72
#else
73
void *testTracepoints(void *threadid)
74
#endif
75
{
76
    int tid = (int)threadid;
77
    printf("Hello World! It's me, thread #%d!\n", tid);
57
78
58
    int lIntVar = 12345;
79
    int lIntVar = 12345;
59
    double lDoubleVar = 12345.12345;
80
    double lDoubleVar = 12345.12345;
Lines 81-96 Link Here
81
        counter++;
102
        counter++;
82
    }
103
    }
83
104
84
	counter = 185;
105
    printf("counter is now #%d!\n", counter);
85
106
86
	// Large loop
107
	// Large loop
87
    for (counter=0; counter<10000;) {
108
    for (; counter<10000;) {
88
        counter++;
109
        counter++;
89
    }
110
    }
111
    
112
    SLEEP(2); // keep this thread around for a bit; the tests will check for its existence while the main thread is stopped at a breakpoint
113
    
114
#ifdef __MINGW32__
115
   return 0;
116
#else
117
   pthread_exit(NULL);
118
#endif
90
}
119
}
91
120
92
int main() {
121
int main() 
93
	testTracepoints();    
122
{
123
	TID threads[NUM_THREADS];
124
	int t;
125
	for(t=0; t < NUM_THREADS; t++)
126
	{
127
		printf("In main: creating thread %d\n", t);
128
#ifdef __MINGW32__
129
		{
130
			uintptr_t rc = _beginthreadex(NULL, 0, testTracepoints, (void*)t, 0, &threads[t]);
131
	    	SLEEP(1); // debugger should for sure receive thread creation event after stepping over this sleep; not guaranteed to happen simply stepping over the thread creation call   
132
		    if (rc == 0)
133
		    {
134
				printf("ERROR; _beginthreadex() failed. errno = %d\n", errno);
135
				exit(-1);
136
		    }
137
		}  
138
#else
139
		{
140
	        int rc = pthread_create(&threads[t], NULL, testTracepoints, (void *)t);
141
	    	SLEEP(1); // debugger should for sure receive thread creation event after stepping over this sleep; not guaranteed to happen simply stepping over the thread creation call	        
142
		    if (rc)
143
		    {
144
				printf("ERROR; return code from pthread_create() is %d\n", rc);
145
				exit(-1);
146
		    }
147
		}
148
#endif
149
	}
150
	
151
	SLEEP(2); // keep this thread around for a bit
94
    return 0;
152
    return 0;
95
}
153
}
96
(-)src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/GDBRemoteTracepointsTest_7_0.java (-128 / +514 lines)
Lines 30-35 Link Here
30
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsUpdatedEvent;
30
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsUpdatedEvent;
31
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
31
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
32
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
32
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
33
import org.eclipse.cdt.dsf.gdb.internal.tracepointactions.CollectAction;
34
import org.eclipse.cdt.dsf.gdb.internal.tracepointactions.EvaluateAction;
35
import org.eclipse.cdt.dsf.gdb.internal.tracepointactions.TracepointActionManager;
33
import org.eclipse.cdt.dsf.mi.service.MIBreakpointDMData;
36
import org.eclipse.cdt.dsf.mi.service.MIBreakpointDMData;
34
import org.eclipse.cdt.dsf.mi.service.MIBreakpoints;
37
import org.eclipse.cdt.dsf.mi.service.MIBreakpoints;
35
import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
38
import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
Lines 69-124 Link Here
69
72
70
//	private int fTotalTracingBufferSize = 0;
73
//	private int fTotalTracingBufferSize = 0;
71
	
74
	
75
	
76
    private static final String SOURCE_FILE     = "TracepointTestApp.cc";
77
    private static final String METHOD_NAME     = "testTracepoints";
78
    private static final int    LINE_NUMBER_1   = 97;
79
    private static final int    LINE_NUMBER_2   = 75;
80
    private static final int    LINE_NUMBER_3   = 76;
81
    private static final int    LINE_NUMBER_4   = 85;
82
    private static final int    LINE_LOOP_2     = 109;
83
    private static final String NO_CONDITION    = "";
84
    private static final String NO_COMMANDS     = "";
85
//    private static final int    LAST_LINE_NUMBER   = 94;
86
//    
87
//	private static final int TOTAL_FRAMES_TO_BE_COLLECTED = 1 + 1 + 10 + 1 + 10000;
88
72
	private final static int[] PASS_COUNTS = {12, 2, 32, 6, 128, 0, 0, 0, 0, 0, 0, 0};
89
	private final static int[] PASS_COUNTS = {12, 2, 32, 6, 128, 0, 0, 0, 0, 0, 0, 0};
90
	private final static String[] CONDITIONS = {"gIntVar == 543", "gBoolVar == false", "counter == 3", "counter > 4", "counter > 2 && lIntVar == 12345"};
73
91
74
//	private static CollectAction COLLECT_ACTION_1;
92
	private static CollectAction[] COLLECT_ACTIONS = new CollectAction[10];
75
//	private static CollectAction COLLECT_ACTION_2;
93
	private static EvaluateAction[] EVAL_ACTIONS = new EvaluateAction[10];
76
//	private static CollectAction COLLECT_ACTION_3;
94
//	private static WhileSteppingAction[] STEPPING_ACTION_1 = new WhileSteppingAction[3];
77
//	private static EvalAction EVAL_ACTION_1;
95
78
//	private static EvalAction EVAL_ACTION_2;
96
79
//	private static EvalAction EVAL_ACTION_3;
97
	 static {
80
//	private static WhileSteppingAction STEPPING_ACTION_1;
98
		TracepointActionManager tracepointActionMgr = TracepointActionManager.getInstance();
81
//	private static WhileSteppingAction STEPPING_ACTION_2;
99
82
//	private static WhileSteppingAction STEPPING_ACTION_3;
100
		int index = 0;
83
101
		COLLECT_ACTIONS[index] = new CollectAction();
84
102
		COLLECT_ACTIONS[index].setCollectString("$locals");
85
//	 static {
103
		COLLECT_ACTIONS[index].setName("Collect locals");
86
//		BreakpointActionManager breakpointActionMgr = CDebugCorePlugin.getDefault().getBreakpointActionManager();
104
		tracepointActionMgr.addAction(COLLECT_ACTIONS[index]);
87
//
105
		index++;
88
//		COLLECT_ACTION_1 = new CollectAction();
106
		
89
//		COLLECT_ACTION_1.setCollectString("$locals, counter");
107
		COLLECT_ACTIONS[index] = new CollectAction();
90
//		COLLECT_ACTION_1.setName("CollectAction1");
108
		COLLECT_ACTIONS[index].setCollectString("gIntVar");
91
//		breakpointActionMgr.addAction(COLLECT_ACTION_1);
109
		COLLECT_ACTIONS[index].setName("Collect gIntVar");
92
//		
110
		tracepointActionMgr.addAction(COLLECT_ACTIONS[index]);
93
//		COLLECT_ACTION_2 = new CollectAction();
111
		index++;
94
//		COLLECT_ACTION_2.setCollectString("$reg");
112
		
95
//		COLLECT_ACTION_2.setName("CollectAction2");
113
		COLLECT_ACTIONS[index] = new CollectAction();
96
//		breakpointActionMgr.addAction(COLLECT_ACTION_2);
114
		COLLECT_ACTIONS[index].setCollectString("$locals, counter, $reg");
97
//		
115
		COLLECT_ACTIONS[index].setName("Collect locals, counter and reg");
98
//		COLLECT_ACTION_3 = new CollectAction();
116
		tracepointActionMgr.addAction(COLLECT_ACTIONS[index]);
99
//		COLLECT_ACTION_3.setCollectString("$myTraceVariable");
117
		index++;
100
//		COLLECT_ACTION_3.setName("CollectAction3");
118
101
//		breakpointActionMgr.addAction(COLLECT_ACTION_3);
119
		COLLECT_ACTIONS[index] = new CollectAction();
102
//		
120
		COLLECT_ACTIONS[index].setCollectString("$reg");
103
//		
121
		COLLECT_ACTIONS[index].setName("Collect reg");
104
//		EVAL_ACTION_1 = new EvalAction();
122
		tracepointActionMgr.addAction(COLLECT_ACTIONS[index]);
105
//		EVAL_ACTION_1.setEvalString("$count=$count+1");
123
		index++;
106
//		EVAL_ACTION_1.setName("EvalAction1");
124
		
107
//		breakpointActionMgr.addAction(EVAL_ACTION_1);
125
		COLLECT_ACTIONS[index] = new CollectAction();
108
//		
126
		COLLECT_ACTIONS[index].setCollectString("counter, $locals");
109
//		EVAL_ACTION_2 = new EvalAction();
127
		COLLECT_ACTIONS[index].setName("Collect counter, locals");
110
//		EVAL_ACTION_2.setEvalString("$count2=$count2+2");
128
		tracepointActionMgr.addAction(COLLECT_ACTIONS[index]);
111
//		EVAL_ACTION_2.setName("EvalAction2");
129
		index++;
112
//		breakpointActionMgr.addAction(EVAL_ACTION_2);
130
		
113
//		
131
		COLLECT_ACTIONS[index] = new CollectAction();
114
//		EVAL_ACTION_3 = new EvalAction();
132
		COLLECT_ACTIONS[index].setCollectString("$myTraceVariable");
115
//		EVAL_ACTION_3.setEvalString("$count3=$count3+3");
133
		COLLECT_ACTIONS[index].setName("Collect myTraceVariable");
116
//		EVAL_ACTION_3.setName("EvalAction3");
134
		tracepointActionMgr.addAction(COLLECT_ACTIONS[index]);
117
//		breakpointActionMgr.addAction(EVAL_ACTION_3);
135
		index++;
118
//		
136
		
119
//		//TODO do while stepping actions
137
		index=0;
120
//		
138
		EVAL_ACTIONS[index] = new EvaluateAction();
121
//	}
139
		EVAL_ACTIONS[index].setEvalString("$count=$count+1");
140
		EVAL_ACTIONS[index].setName("Eval increment count");
141
		tracepointActionMgr.addAction(EVAL_ACTIONS[index]);
142
		index++;
143
144
		EVAL_ACTIONS[index] = new EvaluateAction();
145
		EVAL_ACTIONS[index].setEvalString("$count2=$count2+2");
146
		EVAL_ACTIONS[index].setName("Eval increment count2 by 2");
147
		tracepointActionMgr.addAction(EVAL_ACTIONS[index]);
148
		index++;
149
150
		EVAL_ACTIONS[index] = new EvaluateAction();
151
		EVAL_ACTIONS[index].setEvalString("$count3=$count3+3");
152
		EVAL_ACTIONS[index].setName("Eval increment count3 by 3");
153
		tracepointActionMgr.addAction(EVAL_ACTIONS[index]);
154
		index++;
155
		
156
		//TODO do while stepping actions
157
		index=0;
158
		
159
	}
122
160
123
	 @Before
161
	 @Before
124
	 public void initialTest() throws Exception {
162
	 public void initialTest() throws Exception {
Lines 496-512 Link Here
496
	// Below are the tests for the control of tracepoints.
534
	// Below are the tests for the control of tracepoints.
497
	// *********************************************************************
535
	// *********************************************************************
498
536
499
    private static final String SOURCE_FILE     = "TracepointTestApp.cc";
500
    private static final String METHOD_NAME     = "testTracepoints";
501
    private static final int    LINE_NUMBER_1   = 84;
502
    private static final int    LINE_NUMBER_2   = 55;
503
    private static final int    LINE_NUMBER_3   = 56;
504
    private static final int    LINE_LOOP_1     = 81;
505
    private static final int    LINE_LOOP_2     = 88;
506
    private static final String NO_CONDITION    = "";
507
//    private static final int    LAST_LINE_NUMBER   = 94;
508
//    
509
//	private static final int TOTAL_FRAMES_TO_BE_COLLECTED = 1 + 1 + 10 + 1 + 10000;
510
537
511
538
512
    private IBreakpointDMContext[] fTracepoints = null;
539
    private IBreakpointDMContext[] fTracepoints = null;
Lines 548-554 Link Here
548
//		checkTraceStatus(supported, active, frames, null, null);
575
//		checkTraceStatus(supported, active, frames, null, null);
549
//	}
576
//	}
550
577
551
    // GDB 7.0 does not support fast tracepoints, but GDB 7.1 will
578
    // GDB 7.0 does not support fast tracepoints, but GDB 7.2 will
552
    protected boolean fastTracepointsSupported() { return false; }
579
    protected boolean fastTracepointsSupported() { return false; }
553
    
580
    
554
	private class TracepointData {
581
	private class TracepointData {
Lines 557-572 Link Here
557
		String condition;
584
		String condition;
558
		int passcount;
585
		int passcount;
559
		boolean enabled;
586
		boolean enabled;
560
		String actions;
587
		String commands;
561
		boolean isFastTp;
588
		boolean isFastTp;
562
		
589
		
563
		public TracepointData(String file, int line, String cond, int pass, boolean isEnabled, String acts, boolean fast) {
590
		public TracepointData(String file, int line, String cond, int pass, boolean isEnabled, String cmds, boolean fast) {
564
			sourceFile = file;
591
			sourceFile = file;
565
			lineNumber = line;
592
			lineNumber = line;
566
			condition = cond;
593
			condition = cond;
567
			passcount = pass;
594
			passcount = pass;
568
			enabled = isEnabled;
595
			enabled = isEnabled;
569
			actions = acts;
596
			commands = cmds;
570
			if (fastTracepointsSupported()) {
597
			if (fastTracepointsSupported()) {
571
				isFastTp = fast;
598
				isFastTp = fast;
572
			} else {
599
			} else {
Lines 600-609 Link Here
600
					tp.getCondition().equals(data.condition));
627
					tp.getCondition().equals(data.condition));
601
			assertTrue("tracepoint "+i+" mismatch (wrong pass count) got " + tp.getPassCount(),
628
			assertTrue("tracepoint "+i+" mismatch (wrong pass count) got " + tp.getPassCount(),
602
					tp.getPassCount() == data.passcount);
629
					tp.getPassCount() == data.passcount);
603
			assertTrue("tracepoint "+i+" mismatch (wrong state) got " + tp.isEnabled(),
630
			assertTrue("tracepoint "+i+" mismatch (wrong enablement) got " + tp.isEnabled(),
604
					tp.isEnabled() == data.enabled);
631
					tp.isEnabled() == data.enabled);
605
			assertTrue("tracepoint mismatch (wrong actions) got " + tp.getCommands(),
632
			assertTrue("tracepoint "+i+" mismatch (wrong actions) got " + tp.getCommands(),
606
					tp.getCommands().equals(data.actions));
633
					tp.getCommands().equals(data.commands));
607
634
608
			assertTrue("tracepoint "+i+" mismatch",
635
			assertTrue("tracepoint "+i+" mismatch",
609
					tp.equals((MIBreakpointDMData)getBreakpoint(tracepoints[i])));
636
					tp.equals((MIBreakpointDMData)getBreakpoint(tracepoints[i])));
Lines 630-636 Link Here
630
	 * It also set a fast tracepoint by 
657
	 * It also set a fast tracepoint by 
631
	 */
658
	 */
632
	@Test
659
	@Test
633
	public void testCreateTracepoints() throws Throwable {
660
	public void createTracepoints() throws Throwable {
634
661
635
		Map<String, Object> attributes = null;
662
		Map<String, Object> attributes = null;
636
		int index = 0;
663
		int index = 0;
Lines 648-654 Link Here
648
				+ getBreakpointEventCount(BP_ADDED), getBreakpointEventCount(BP_ADDED) == 1);
675
				+ getBreakpointEventCount(BP_ADDED), getBreakpointEventCount(BP_ADDED) == 1);
649
		clearEventCounters();
676
		clearEventCounters();
650
		
677
		
651
		// Second tracepoint (will be a fast tracepoint)
678
		// Second tracepoint (will be a slow tracepoint)
652
		attributes = new HashMap<String, Object>();
679
		attributes = new HashMap<String, Object>();
653
		attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
680
		attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
654
		attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
681
		attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
Lines 662-672 Link Here
662
				+ getBreakpointEventCount(BP_ADDED), getBreakpointEventCount(BP_ADDED) == 1);
689
				+ getBreakpointEventCount(BP_ADDED), getBreakpointEventCount(BP_ADDED) == 1);
663
		clearEventCounters();
690
		clearEventCounters();
664
691
665
		// Third tracepoint (will be a slow tracepoint)
692
		// Third tracepoint (will be a fast tracepoint)
666
		attributes = new HashMap<String, Object>();
693
		attributes = new HashMap<String, Object>();
667
		attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
694
		attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
668
		attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
695
		attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
669
		attributes.put(MIBreakpoints.LINE_NUMBER, LINE_LOOP_1);
696
		attributes.put(MIBreakpoints.LINE_NUMBER, LINE_NUMBER_4);
670
		fTracepoints[index++] = insertBreakpoint(fBreakpointsDmc, attributes);
697
		fTracepoints[index++] = insertBreakpoint(fBreakpointsDmc, attributes);
671
698
672
		waitForBreakpointEvent();
699
		waitForBreakpointEvent();
Lines 705-715 Link Here
705
		clearEventCounters();		
732
		clearEventCounters();		
706
		
733
		
707
		ArrayList<TracepointData> dataArray = new ArrayList<TracepointData>();
734
		ArrayList<TracepointData> dataArray = new ArrayList<TracepointData>();
708
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_2, NO_CONDITION, 0, true, "", false));
735
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_2, NO_CONDITION, 0, true, NO_COMMANDS, false));
709
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_3, NO_CONDITION, 0, true, "", true));
736
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_3, NO_CONDITION, 0, true, NO_COMMANDS, false));
710
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_1, NO_CONDITION, 0, true, "", false));
737
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_4, NO_CONDITION, 0, true, NO_COMMANDS, true));
711
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_1, NO_CONDITION, 0, true, "", true));
738
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_1, NO_CONDITION, 0, true, NO_COMMANDS, true));
712
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_2, NO_CONDITION, 0, true, "", false));
739
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_2, NO_CONDITION, 0, true, NO_COMMANDS, false));
713
		
740
		
714
		checkTracepoints(dataArray.toArray(new TracepointData[dataArray.size()]));
741
		checkTracepoints(dataArray.toArray(new TracepointData[dataArray.size()]));
715
	}
742
	}
Lines 718-725 Link Here
718
	 * This test sets the different types of tracepoints and then deletes them
745
	 * This test sets the different types of tracepoints and then deletes them
719
	 */
746
	 */
720
	@Test
747
	@Test
721
	public void testDeleteTracepoints() throws Throwable {
748
	public void deleteTracepoints() throws Throwable {
722
		testCreateTracepoints();
749
		createTracepoints();
723
		// Delete all tracepoints
750
		// Delete all tracepoints
724
		for (IBreakpointDMContext tp : fTracepoints) {
751
		for (IBreakpointDMContext tp : fTracepoints) {
725
			if (tp == null) break;
752
			if (tp == null) break;
Lines 736-743 Link Here
736
	 * This test sets the different types of tracepoints and then disables them
763
	 * This test sets the different types of tracepoints and then disables them
737
	 */
764
	 */
738
	@Test
765
	@Test
739
	public void testDisableTracepoints() throws Throwable {
766
	public void disableTracepoints() throws Throwable {
740
		testCreateTracepoints();
767
		createTracepoints();
741
		
768
		
742
		Map<String, Object> delta = new HashMap<String, Object>();
769
		Map<String, Object> delta = new HashMap<String, Object>();
743
		delta.put(MIBreakpoints.IS_ENABLED, false);
770
		delta.put(MIBreakpoints.IS_ENABLED, false);
Lines 748-758 Link Here
748
		}
775
		}
749
776
750
		ArrayList<TracepointData> dataArray = new ArrayList<TracepointData>();
777
		ArrayList<TracepointData> dataArray = new ArrayList<TracepointData>();
751
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_2, NO_CONDITION, 0, false, "", false));
778
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_2, NO_CONDITION, 0, false, NO_COMMANDS, false));
752
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_3, NO_CONDITION, 0, false, "", true));
779
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_3, NO_CONDITION, 0, false, NO_COMMANDS, false));
753
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_1, NO_CONDITION, 0, false, "", false));
780
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_4, NO_CONDITION, 0, false, NO_COMMANDS, true));
754
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_1, NO_CONDITION, 0, false, "", true));
781
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_1, NO_CONDITION, 0, false, NO_COMMANDS, true));
755
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_2, NO_CONDITION, 0, false, "", false));
782
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_2, NO_CONDITION, 0, false, NO_COMMANDS, false));
756
		
783
		
757
		checkTracepoints(dataArray.toArray(new TracepointData[dataArray.size()]));
784
		checkTracepoints(dataArray.toArray(new TracepointData[dataArray.size()]));
758
	}
785
	}
Lines 761-768 Link Here
761
	 * This test sets, disables the different types of tracepoints and then enables them
788
	 * This test sets, disables the different types of tracepoints and then enables them
762
	 */
789
	 */
763
	@Test
790
	@Test
764
	public void testEnableTracepoints() throws Throwable {
791
	public void enableTracepoints() throws Throwable {
765
		testDisableTracepoints();
792
		disableTracepoints();
766
		
793
		
767
		Map<String, Object> delta = new HashMap<String, Object>();
794
		Map<String, Object> delta = new HashMap<String, Object>();
768
		delta.put(MIBreakpoints.IS_ENABLED, true);
795
		delta.put(MIBreakpoints.IS_ENABLED, true);
Lines 773-783 Link Here
773
		}
800
		}
774
801
775
		ArrayList<TracepointData> dataArray = new ArrayList<TracepointData>();
802
		ArrayList<TracepointData> dataArray = new ArrayList<TracepointData>();
776
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_2, NO_CONDITION, 0, true, "", false));
803
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_2, NO_CONDITION, 0, true, NO_COMMANDS, false));
777
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_3, NO_CONDITION, 0, true, "", true));
804
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_3, NO_CONDITION, 0, true, NO_COMMANDS, false));
778
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_1, NO_CONDITION, 0, true, "", false));
805
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_4, NO_CONDITION, 0, true, NO_COMMANDS, true));
779
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_1, NO_CONDITION, 0, true, "", true));
806
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_1, NO_CONDITION, 0, true, NO_COMMANDS, true));
780
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_2, NO_CONDITION, 0, true, "", false));
807
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_2, NO_CONDITION, 0, true, NO_COMMANDS, false));
781
808
782
		checkTracepoints(dataArray.toArray(new TracepointData[dataArray.size()]));
809
		checkTracepoints(dataArray.toArray(new TracepointData[dataArray.size()]));
783
	}
810
	}
Lines 786-793 Link Here
786
	 * This test sets the different types of tracepoints and then sets their passcount
813
	 * This test sets the different types of tracepoints and then sets their passcount
787
	 */
814
	 */
788
	@Test
815
	@Test
789
	public void testTracepointPasscount() throws Throwable {
816
	public void tracepointPasscount() throws Throwable {
790
		testCreateTracepoints();
817
		createTracepoints();
791
		
818
		
792
		Map<String, Object> delta = new HashMap<String, Object>();
819
		Map<String, Object> delta = new HashMap<String, Object>();
793
		// Set passcount for all tracepoints
820
		// Set passcount for all tracepoints
Lines 799-848 Link Here
799
		}
826
		}
800
827
801
		ArrayList<TracepointData> dataArray = new ArrayList<TracepointData>();
828
		ArrayList<TracepointData> dataArray = new ArrayList<TracepointData>();
802
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_2, NO_CONDITION, PASS_COUNTS[0], true, "", false));
829
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_2, NO_CONDITION, PASS_COUNTS[0], true, NO_COMMANDS, false));
803
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_3, NO_CONDITION, PASS_COUNTS[1], true, "", true));
830
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_3, NO_CONDITION, PASS_COUNTS[1], true, NO_COMMANDS, false));
804
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_1, NO_CONDITION, PASS_COUNTS[2], true, "", false));
831
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_4, NO_CONDITION, PASS_COUNTS[2], true, NO_COMMANDS, true));
805
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_1, NO_CONDITION, PASS_COUNTS[3], true, "", true));
832
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_1, NO_CONDITION, PASS_COUNTS[3], true, NO_COMMANDS, true));
806
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_2, NO_CONDITION, PASS_COUNTS[4], true, "", false));
833
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_2, NO_CONDITION, PASS_COUNTS[4], true, NO_COMMANDS, false));
807
		
834
		
808
		checkTracepoints(dataArray.toArray(new TracepointData[dataArray.size()]));
835
		checkTracepoints(dataArray.toArray(new TracepointData[dataArray.size()]));
809
	}
836
	}
810
837
811
	/**
838
	/**
812
	 * This test sets a tracepoint and then gives it a condition
839
	 * This test sets the different types of tracepoints and then sets some conditions
813
	 */
840
	 */
814
	//@Test
841
	@Test
815
	public void testTracepointCondition() throws Throwable {
842
	public void tracepointCondition() throws Throwable {
816
		// Use trace state variables and stuff
843
		createTracepoints();
844
		
845
		Map<String, Object> delta = new HashMap<String, Object>();
846
		// Set conditions for all tracepoints
847
		for (int i=0; i<fTracepoints.length; i++) {
848
			if (fTracepoints[i] == null) break;
849
			if (CONDITIONS[i].equals(NO_CONDITION)) continue;
850
			delta.put(MIBreakpoints.CONDITION, CONDITIONS[i]);
851
			updateBreakpoint(fTracepoints[i], delta);
852
		}
853
854
		ArrayList<TracepointData> dataArray = new ArrayList<TracepointData>();
855
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_2, CONDITIONS[0], 0, true, NO_COMMANDS, false));
856
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_3, CONDITIONS[1], 0, true, NO_COMMANDS, false));
857
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_4, CONDITIONS[2], 0, true, NO_COMMANDS, true));
858
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_1, CONDITIONS[3], 0, true, NO_COMMANDS, true));
859
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_2, CONDITIONS[4], 0, true, NO_COMMANDS, false));
860
		
861
		checkTracepoints(dataArray.toArray(new TracepointData[dataArray.size()]));
862
863
	}
864
	
865
	/**
866
	 * This test sets the different types of tracepoints and then sets some actions
867
	 */
868
	@Test
869
	public void tracepointActions() throws Throwable {
870
		createTracepoints();
871
		
872
		Map<String, Object> delta = new HashMap<String, Object>();
873
		// Set conditions for all tracepoints
874
		for (int i=0; i<fTracepoints.length; i++) {
875
			if (fTracepoints[i] == null) break;
876
			if (COLLECT_ACTIONS[i].equals(NO_COMMANDS)) continue;
877
			delta.put(MIBreakpoints.COMMANDS, COLLECT_ACTIONS[i].getName());
878
			updateBreakpoint(fTracepoints[i], delta);
879
		}
880
881
		ArrayList<TracepointData> dataArray = new ArrayList<TracepointData>();
882
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_2, NO_CONDITION, 0, true, COLLECT_ACTIONS[0].toString(), false));
883
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_3, NO_CONDITION, 0, true, COLLECT_ACTIONS[1].toString(), false));
884
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_4, NO_CONDITION, 0, true, COLLECT_ACTIONS[2].toString(), true));
885
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_1, NO_CONDITION, 0, true, COLLECT_ACTIONS[3].toString(), true));
886
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_2, NO_CONDITION, 0, true, COLLECT_ACTIONS[4].toString(), false));
887
		
888
		checkTracepoints(dataArray.toArray(new TracepointData[dataArray.size()]));
889
890
	}
891
	
892
	/**
893
	 * This test creates a tracepoint that starts disabled
894
	 */
895
	@Test
896
	public void createTracepointDisabled() throws Throwable {
897
		Map<String, Object> attributes = null;
898
		int index = 0;
899
		
900
		// First tracepoint will be a slow tracepoint
901
		attributes = new HashMap<String, Object>();
902
		attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
903
		attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
904
		attributes.put(MIBreakpoints.LINE_NUMBER, LINE_LOOP_2);
905
		attributes.put(MIBreakpoints.IS_ENABLED, false);
906
		fTracepoints[index++] = insertBreakpoint(fBreakpointsDmc, attributes);
907
908
		waitForBreakpointEvent();
909
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT event(s), received "
910
				+ fBreakpointEventCount, fBreakpointEventCount == 1);
911
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT_ADDED event(s), received "
912
				+ getBreakpointEventCount(BP_ADDED), getBreakpointEventCount(BP_ADDED) == 1);
913
		clearEventCounters();
914
915
		// Second tracepoint will be a fast tracepoint
916
		attributes = new HashMap<String, Object>();
917
		attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
918
		attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
919
		attributes.put(MIBreakpoints.LINE_NUMBER, LINE_NUMBER_1);
920
		attributes.put(MIBreakpoints.IS_ENABLED, false);
921
		fTracepoints[index++] = insertBreakpoint(fBreakpointsDmc, attributes);
922
923
		waitForBreakpointEvent();
924
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT event(s), received "
925
				+ fBreakpointEventCount, fBreakpointEventCount == 1);
926
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT_ADDED event(s), received "
927
				+ getBreakpointEventCount(BP_ADDED), getBreakpointEventCount(BP_ADDED) == 1);
928
		clearEventCounters();		
929
930
		ArrayList<TracepointData> dataArray = new ArrayList<TracepointData>();
931
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_2, NO_CONDITION, 0, false, NO_COMMANDS, false));
932
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_1, NO_CONDITION, 0, false, NO_COMMANDS, true));
933
		
934
		checkTracepoints(dataArray.toArray(new TracepointData[dataArray.size()]));
935
	}
936
937
	/**
938
	 * This test creates a tracepoint that starts with a passcount
939
	 */
940
	@Test
941
	public void createTracepointWithPasscount() throws Throwable {
942
		Map<String, Object> attributes = null;
943
		int index = 0;
944
		
945
		// First tracepoint will be a slow tracepoint
946
		attributes = new HashMap<String, Object>();
947
		attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
948
		attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
949
		attributes.put(MIBreakpoints.LINE_NUMBER, LINE_LOOP_2);
950
		attributes.put(MIBreakpoints.PASS_COUNT, PASS_COUNTS[0]);
951
		fTracepoints[index++] = insertBreakpoint(fBreakpointsDmc, attributes);
952
953
		waitForBreakpointEvent();
954
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT event(s), received "
955
				+ fBreakpointEventCount, fBreakpointEventCount == 1);
956
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT_ADDED event(s), received "
957
				+ getBreakpointEventCount(BP_ADDED), getBreakpointEventCount(BP_ADDED) == 1);
958
		clearEventCounters();
959
960
		// Second tracepoint will be a fast tracepoint
961
		attributes = new HashMap<String, Object>();
962
		attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
963
		attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
964
		attributes.put(MIBreakpoints.LINE_NUMBER, LINE_NUMBER_1);
965
		attributes.put(MIBreakpoints.PASS_COUNT, PASS_COUNTS[1]);
966
		fTracepoints[index++] = insertBreakpoint(fBreakpointsDmc, attributes);
967
968
		waitForBreakpointEvent();
969
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT event(s), received "
970
				+ fBreakpointEventCount, fBreakpointEventCount == 1);
971
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT_ADDED event(s), received "
972
				+ getBreakpointEventCount(BP_ADDED), getBreakpointEventCount(BP_ADDED) == 1);
973
		clearEventCounters();		
974
975
		ArrayList<TracepointData> dataArray = new ArrayList<TracepointData>();
976
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_2, NO_CONDITION, PASS_COUNTS[0], true, NO_COMMANDS, false));
977
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_1, NO_CONDITION, PASS_COUNTS[1], true, NO_COMMANDS, true));
978
		
979
		checkTracepoints(dataArray.toArray(new TracepointData[dataArray.size()]));
980
	}
981
982
	/**
983
	 * This test creates a tracepoint that starts with a condition
984
	 */
985
	@Test
986
	public void createTracepointWithCondition() throws Throwable {
987
		Map<String, Object> attributes = null;
988
		int index = 0;
989
		
990
		// First tracepoint will be a slow tracepoint
991
		attributes = new HashMap<String, Object>();
992
		attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
993
		attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
994
		attributes.put(MIBreakpoints.LINE_NUMBER, LINE_LOOP_2);
995
		attributes.put(MIBreakpoints.CONDITION, CONDITIONS[0]);
996
		fTracepoints[index++] = insertBreakpoint(fBreakpointsDmc, attributes);
997
998
		waitForBreakpointEvent();
999
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT event(s), received "
1000
				+ fBreakpointEventCount, fBreakpointEventCount == 1);
1001
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT_ADDED event(s), received "
1002
				+ getBreakpointEventCount(BP_ADDED), getBreakpointEventCount(BP_ADDED) == 1);
1003
		clearEventCounters();
1004
1005
		// Second tracepoint will be a fast tracepoint
1006
		attributes = new HashMap<String, Object>();
1007
		attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
1008
		attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
1009
		attributes.put(MIBreakpoints.LINE_NUMBER, LINE_NUMBER_1);
1010
		attributes.put(MIBreakpoints.CONDITION, CONDITIONS[1]);
1011
		fTracepoints[index++] = insertBreakpoint(fBreakpointsDmc, attributes);
1012
1013
		waitForBreakpointEvent();
1014
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT event(s), received "
1015
				+ fBreakpointEventCount, fBreakpointEventCount == 1);
1016
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT_ADDED event(s), received "
1017
				+ getBreakpointEventCount(BP_ADDED), getBreakpointEventCount(BP_ADDED) == 1);
1018
		clearEventCounters();		
1019
1020
		ArrayList<TracepointData> dataArray = new ArrayList<TracepointData>();
1021
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_2, CONDITIONS[0], 0, true, NO_COMMANDS, false));
1022
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_1, CONDITIONS[1], 0, true, NO_COMMANDS, true));
1023
		
1024
		checkTracepoints(dataArray.toArray(new TracepointData[dataArray.size()]));
1025
	}
1026
	
1027
	/**
1028
	 * This test creates tracepoints that start a command
1029
	 */
1030
	@Test
1031
	public void createTracepointWithCommand() throws Throwable {
1032
		Map<String, Object> attributes = null;
1033
		int index = 0;
1034
		
1035
		// First tracepoint will be a slow tracepoint
1036
		attributes = new HashMap<String, Object>();
1037
		attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
1038
		attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
1039
		attributes.put(MIBreakpoints.LINE_NUMBER, LINE_LOOP_2);
1040
		attributes.put(MIBreakpoints.COMMANDS, COLLECT_ACTIONS[0].getName());
1041
		fTracepoints[index++] = insertBreakpoint(fBreakpointsDmc, attributes);
1042
1043
		waitForBreakpointEvent();
1044
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT event(s), received "
1045
				+ fBreakpointEventCount, fBreakpointEventCount == 1);
1046
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT_ADDED event(s), received "
1047
				+ getBreakpointEventCount(BP_ADDED), getBreakpointEventCount(BP_ADDED) == 1);
1048
		clearEventCounters();
1049
1050
		// Second tracepoint will be a fast tracepoint
1051
		attributes = new HashMap<String, Object>();
1052
		attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
1053
		attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
1054
		attributes.put(MIBreakpoints.LINE_NUMBER, LINE_NUMBER_1);
1055
		attributes.put(MIBreakpoints.COMMANDS, COLLECT_ACTIONS[1].getName());
1056
		fTracepoints[index++] = insertBreakpoint(fBreakpointsDmc, attributes);
1057
1058
		waitForBreakpointEvent();
1059
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT event(s), received "
1060
				+ fBreakpointEventCount, fBreakpointEventCount == 1);
1061
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT_ADDED event(s), received "
1062
				+ getBreakpointEventCount(BP_ADDED), getBreakpointEventCount(BP_ADDED) == 1);
1063
		clearEventCounters();		
1064
1065
		ArrayList<TracepointData> dataArray = new ArrayList<TracepointData>();
1066
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_2, NO_CONDITION, 0, true, COLLECT_ACTIONS[0].toString(), false));
1067
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_1, NO_CONDITION, 0, true, COLLECT_ACTIONS[1].toString(), true));
1068
		
1069
		checkTracepoints(dataArray.toArray(new TracepointData[dataArray.size()]));
1070
	}
1071
	
1072
	/**
1073
	 * This test creates tracepoints that start with more than one command
1074
	 */
1075
	@Test
1076
	public void createTracepointWithMultipleCommands() throws Throwable {
1077
		Map<String, Object> attributes = null;
1078
		int index = 0;
1079
		
1080
		// First tracepoint will be a slow tracepoint
1081
		attributes = new HashMap<String, Object>();
1082
		attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
1083
		attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
1084
		attributes.put(MIBreakpoints.LINE_NUMBER, LINE_LOOP_2);
1085
		String commandsNames1 = COLLECT_ACTIONS[0].getName() + TracepointActionManager.TRACEPOINT_ACTION_DELIMITER +
1086
				COLLECT_ACTIONS[1].getName() + TracepointActionManager.TRACEPOINT_ACTION_DELIMITER +
1087
				COLLECT_ACTIONS[2].getName();
1088
		String commandsResult1 = COLLECT_ACTIONS[0].toString() + TracepointActionManager.TRACEPOINT_ACTION_DELIMITER +
1089
				COLLECT_ACTIONS[1].toString() + TracepointActionManager.TRACEPOINT_ACTION_DELIMITER +
1090
				COLLECT_ACTIONS[2].toString();
1091
		attributes.put(MIBreakpoints.COMMANDS, commandsNames1);
1092
		fTracepoints[index++] = insertBreakpoint(fBreakpointsDmc, attributes);
1093
1094
		waitForBreakpointEvent();
1095
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT event(s), received "
1096
				+ fBreakpointEventCount, fBreakpointEventCount == 1);
1097
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT_ADDED event(s), received "
1098
				+ getBreakpointEventCount(BP_ADDED), getBreakpointEventCount(BP_ADDED) == 1);
1099
		clearEventCounters();
1100
1101
		// Second tracepoint will be a fast tracepoint
1102
		attributes = new HashMap<String, Object>();
1103
		attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
1104
		attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
1105
		attributes.put(MIBreakpoints.LINE_NUMBER, LINE_NUMBER_1);
1106
		String commandsNames2 = COLLECT_ACTIONS[2].getName() + TracepointActionManager.TRACEPOINT_ACTION_DELIMITER +
1107
				COLLECT_ACTIONS[2].getName() + TracepointActionManager.TRACEPOINT_ACTION_DELIMITER +
1108
				COLLECT_ACTIONS[1].getName();
1109
		String commandsResult2 = COLLECT_ACTIONS[2].toString() + TracepointActionManager.TRACEPOINT_ACTION_DELIMITER +
1110
				COLLECT_ACTIONS[2].toString() + TracepointActionManager.TRACEPOINT_ACTION_DELIMITER +
1111
				COLLECT_ACTIONS[1].toString();
1112
		attributes.put(MIBreakpoints.COMMANDS, commandsNames2);
1113
		fTracepoints[index++] = insertBreakpoint(fBreakpointsDmc, attributes);
1114
1115
		waitForBreakpointEvent();
1116
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT event(s), received "
1117
				+ fBreakpointEventCount, fBreakpointEventCount == 1);
1118
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT_ADDED event(s), received "
1119
				+ getBreakpointEventCount(BP_ADDED), getBreakpointEventCount(BP_ADDED) == 1);
1120
		clearEventCounters();		
1121
1122
		ArrayList<TracepointData> dataArray = new ArrayList<TracepointData>();
1123
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_2, NO_CONDITION, 0, true, commandsResult1, false));
1124
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_1, NO_CONDITION, 0, true, commandsResult2, true));
1125
		
1126
		checkTracepoints(dataArray.toArray(new TracepointData[dataArray.size()]));
1127
	}
1128
	
1129
	/**
1130
	 * This test creates an enabled tracepoint that starts with commands, condition and passcount
1131
	 */
1132
	@Test
1133
	public void createTracepointEnabledWithCommandsConditionPasscount() throws Throwable {
1134
		Map<String, Object> attributes = null;
1135
		int index = 0;
1136
		
1137
		// First tracepoint will be a slow tracepoint
1138
		attributes = new HashMap<String, Object>();
1139
		attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
1140
		attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
1141
		attributes.put(MIBreakpoints.LINE_NUMBER, LINE_LOOP_2);
1142
		attributes.put(MIBreakpoints.COMMANDS, COLLECT_ACTIONS[0].getName());
1143
		attributes.put(MIBreakpoints.CONDITION, CONDITIONS[0]);
1144
		attributes.put(MIBreakpoints.IS_ENABLED, true);
1145
		attributes.put(MIBreakpoints.PASS_COUNT, PASS_COUNTS[0]);
1146
		fTracepoints[index++] = insertBreakpoint(fBreakpointsDmc, attributes);
1147
1148
		waitForBreakpointEvent();
1149
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT event(s), received "
1150
				+ fBreakpointEventCount, fBreakpointEventCount == 1);
1151
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT_ADDED event(s), received "
1152
				+ getBreakpointEventCount(BP_ADDED), getBreakpointEventCount(BP_ADDED) == 1);
1153
		clearEventCounters();
1154
1155
		// Second tracepoint will be a fast tracepoint
1156
		attributes = new HashMap<String, Object>();
1157
		attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
1158
		attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
1159
		attributes.put(MIBreakpoints.LINE_NUMBER, LINE_NUMBER_1);
1160
		attributes.put(MIBreakpoints.COMMANDS, COLLECT_ACTIONS[1].getName());
1161
		attributes.put(MIBreakpoints.CONDITION, CONDITIONS[1]);
1162
		attributes.put(MIBreakpoints.IS_ENABLED, true);
1163
		attributes.put(MIBreakpoints.PASS_COUNT, PASS_COUNTS[1]);
1164
		fTracepoints[index++] = insertBreakpoint(fBreakpointsDmc, attributes);
1165
1166
		waitForBreakpointEvent();
1167
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT event(s), received "
1168
				+ fBreakpointEventCount, fBreakpointEventCount == 1);
1169
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT_ADDED event(s), received "
1170
				+ getBreakpointEventCount(BP_ADDED), getBreakpointEventCount(BP_ADDED) == 1);
1171
		clearEventCounters();		
1172
1173
		ArrayList<TracepointData> dataArray = new ArrayList<TracepointData>();
1174
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_2, CONDITIONS[0], PASS_COUNTS[0], true, COLLECT_ACTIONS[0].toString(), false));
1175
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_1, CONDITIONS[1], PASS_COUNTS[1], true, COLLECT_ACTIONS[1].toString(), true));
1176
		
1177
		checkTracepoints(dataArray.toArray(new TracepointData[dataArray.size()]));
1178
	}
1179
	
1180
	/**
1181
	 * This test creates a disabled tracepoint that starts with commands, condition and passcount
1182
	 */
1183
	@Test
1184
	public void createTracepointDisabledWithCommandsConditionPasscount() throws Throwable {
1185
		Map<String, Object> attributes = null;
1186
		int index = 0;
1187
		
1188
		// First tracepoint will be a slow tracepoint
1189
		attributes = new HashMap<String, Object>();
1190
		attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
1191
		attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
1192
		attributes.put(MIBreakpoints.LINE_NUMBER, LINE_LOOP_2);
1193
		attributes.put(MIBreakpoints.COMMANDS, COLLECT_ACTIONS[0].getName());
1194
		attributes.put(MIBreakpoints.CONDITION, CONDITIONS[0]);
1195
		attributes.put(MIBreakpoints.IS_ENABLED, false);
1196
		attributes.put(MIBreakpoints.PASS_COUNT, PASS_COUNTS[0]);
1197
		fTracepoints[index++] = insertBreakpoint(fBreakpointsDmc, attributes);
1198
1199
		waitForBreakpointEvent();
1200
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT event(s), received "
1201
				+ fBreakpointEventCount, fBreakpointEventCount == 1);
1202
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT_ADDED event(s), received "
1203
				+ getBreakpointEventCount(BP_ADDED), getBreakpointEventCount(BP_ADDED) == 1);
1204
		clearEventCounters();
1205
1206
		// Second tracepoint will be a fast tracepoint
1207
		attributes = new HashMap<String, Object>();
1208
		attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
1209
		attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
1210
		attributes.put(MIBreakpoints.LINE_NUMBER, LINE_NUMBER_1);
1211
		attributes.put(MIBreakpoints.COMMANDS, COLLECT_ACTIONS[1].getName());
1212
		attributes.put(MIBreakpoints.CONDITION, CONDITIONS[1]);
1213
		attributes.put(MIBreakpoints.IS_ENABLED, false);
1214
		attributes.put(MIBreakpoints.PASS_COUNT, PASS_COUNTS[1]);
1215
		fTracepoints[index++] = insertBreakpoint(fBreakpointsDmc, attributes);
1216
1217
		waitForBreakpointEvent();
1218
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT event(s), received "
1219
				+ fBreakpointEventCount, fBreakpointEventCount == 1);
1220
		assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT_ADDED event(s), received "
1221
				+ getBreakpointEventCount(BP_ADDED), getBreakpointEventCount(BP_ADDED) == 1);
1222
		clearEventCounters();		
1223
1224
		ArrayList<TracepointData> dataArray = new ArrayList<TracepointData>();
1225
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_LOOP_2, CONDITIONS[0], PASS_COUNTS[0], false, COLLECT_ACTIONS[0].toString(), false));
1226
		dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_1, CONDITIONS[1], PASS_COUNTS[1], false, COLLECT_ACTIONS[1].toString(), true));
1227
		
1228
		checkTracepoints(dataArray.toArray(new TracepointData[dataArray.size()]));
817
	}
1229
	}
818
	
1230
	
819
1231
820
//	private void testActions(String[] actions) throws Throwable {
821
//		Map<String, Object> delta = new HashMap<String, Object>();
822
//		ArrayList<TracepointData> dataArray = new ArrayList<TracepointData>();
823
//		
824
//		for (int i=0; i<actions.length; i++) {
825
//			delta.put(MIBreakpoints.COMMANDS, actions[i]);
826
//			updateBreakpoint(fTracepoints[i], delta);
827
//			dataArray.add(new TracepointData(SOURCE_FILE, LINE_NUMBER_1, NO_CONDITION, 0, true, actions[i], false));
828
//		}
829
//		
830
//		checkTracepoints(dataArray.toArray(new TracepointData[dataArray.size()]));
831
//	}
832
//	
833
//	/**
834
//	 * This test sets the different types of tracepoints and then sets some collect actions
835
//	 */	
836
//	@Test
837
//	public void testCollectActions() throws Throwable {
838
//		final String ACTIONS1 = COLLECT_ACTION_1.getName()+","+COLLECT_ACTION_2.getName()+","+COLLECT_ACTION_3.getName();
839
//		final String ACTIONS2 = COLLECT_ACTION_1.getName()+","+COLLECT_ACTION_3.getName();
840
//		final String ACTIONS3 = COLLECT_ACTION_3.getName();
841
//
842
//		testCreateTracepoints();
843
//		testActions(new String[] {ACTIONS1, ACTIONS2, ACTIONS3, ""});
844
//	}
845
//	
846
//	/**
1232
//	/**
847
//	 * This test sets the different types of tracepoints and then sets some eval actions
1233
//	 * This test sets the different types of tracepoints and then sets some eval actions
848
//	 */
1234
//	 */
(-)src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/GDBRemoteTracepointsTest_7_2.java (+4 lines)
Lines 23-26 Link Here
23
	public static void beforeClassMethod_7_2() {
23
	public static void beforeClassMethod_7_2() {
24
		setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2);		
24
		setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2);		
25
	}
25
	}
26
	
27
	@Override
28
    protected boolean fastTracepointsSupported() { return true; }
29
26
}
30
}

Return to bug 346320