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 306427
Collapse All | Expand All

(-)src/org/eclipse/cdt/gdb/eventbkpts/IEventBreakpointConstants.java (-69 / +13 lines)
Lines 1-3 Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2010 Freescale Semiconductor 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
 *     Freescale Semiconductor - Initial API and implementation
10
 *******************************************************************************/
1
package org.eclipse.cdt.gdb.eventbkpts;
11
package org.eclipse.cdt.gdb.eventbkpts;
2
12
3
public interface IEventBreakpointConstants {
13
public interface IEventBreakpointConstants {
Lines 19-33 Link Here
19
29
20
	/**
30
	/**
21
	 * An event breakpoint of this type suspends the target program when it
31
	 * An event breakpoint of this type suspends the target program when it
22
	 * catches a signal (POSIX). This type of event has a single parameter of
23
	 * type in, indicating the specific signal.
24
	 * 
25
	 * @since 7.0
26
	 */
27
	public static final String EVENT_TYPE_SIGNAL_CATCH = "org.eclipse.cdt.debug.gdb.signal"; //$NON-NLS-1$
28
29
	/**
30
	 * An event breakpoint of this type suspends the target program when it
31
	 * calls fork() (POSIX). This type of event has no parameters.
32
	 * calls fork() (POSIX). This type of event has no parameters.
32
	 * 
33
	 * 
33
	 * @since 7.0
34
	 * @since 7.0
Lines 52-118 Link Here
52
53
53
	/**
54
	/**
54
	 * An event breakpoint of this type suspends the target program when it
55
	 * An event breakpoint of this type suspends the target program when it
55
	 * calls exit() (POSIX). This type of event has no parameters.
56
	 * makes a system call (POSIX). This type of event takes a single parameter:
56
	 * 
57
	 * the name or number of the system call.
57
	 * @since 7.0
58
	 */
59
	public static final String EVENT_TYPE_EXIT = "org.eclipse.cdt.debug.gdb.catch_exit"; //$NON-NLS-1$
60
61
	/**
62
	 * An event breakpoint of this type suspends the target program when a new
63
	 * process starts. This type of event has no parameters.
64
	 * 
65
	 * @since 7.0
66
	 */
67
	public static final String EVENT_TYPE_PROCESS_START = "org.eclipse.cdt.debug.gdb.catch_start"; //$NON-NLS-1$
68
69
	/**
70
	 * An event breakpoint of this type suspends the target program when a
71
	 * process exits. This type of event has no parameters.
72
	 * 
73
	 * @since 7.0
74
	 */
75
	public static final String EVENT_TYPE_PROCESS_STOP = "org.eclipse.cdt.debug.gdb.catch_stop"; //$NON-NLS-1$
76
77
	/**
78
	 * An event breakpoint of this type suspends the target program when a new
79
	 * thread starts. This type of event has no parameters.
80
	 * 
81
	 * @since 7.0
82
	 */
83
	public static final String EVENT_TYPE_THREAD_START = "org.eclipse.cdt.debug.gdb.catch_thread_start"; //$NON-NLS-1$
84
85
	/**
86
	 * An event breakpoint of this type suspends the target program when a
87
	 * thread exits. This type of event has no parameters.
88
	 * 
89
	 * @since 7.0
90
	 */
91
	public static final String EVENT_TYPE_THREAD_EXIT = "org.eclipse.cdt.debug.gdb.catch_thread_exit"; //$NON-NLS-1$
92
93
	/**
94
	 * An event breakpoint of this type suspends the target program when a
95
	 * thread joins another one (waits for it to exit) This type of event has no
96
	 * parameters.
97
	 * 
98
	 * @since 7.0
99
	 */
100
	public static final String EVENT_TYPE_THREAD_JOIN = "org.eclipse.cdt.debug.gdb.catch_thread_join"; //$NON-NLS-1$
101
102
	/**
103
	 * An event breakpoint of this type suspends the target program when it
104
	 * loads a library. This type of event has no parameters.
105
	 * 
58
	 * 
106
	 * @since 7.0
59
	 * @since 7.0
107
	 */
60
	 */
108
	public static final String EVENT_TYPE_LIBRARY_LOAD = "org.eclipse.cdt.debug.gdb.catch_load"; //$NON-NLS-1$
61
	public static final String EVENT_TYPE_SYSCALL = "org.eclipse.cdt.debug.gdb.catch_syscall"; //$NON-NLS-1$
109
110
	/**
111
	 * An event breakpoint of this type suspends the target program when it
112
	 * unloads a library. This type of event has no parameters.
113
	 * 
114
	 * @since 7.0
115
	 */
116
	public static final String EVENT_TYPE_LIBRARY_UNLOAD = "org.eclipse.cdt.debug.gdb.catch_unload"; //$NON-NLS-1$
117
118
}
62
}
(-)src/org/eclipse/cdt/gdb/internal/eventbkpts/GdbCatchpoints.java (-9 / +1 lines)
Lines 24-41 Link Here
24
		// to event breakpoints selector
24
		// to event breakpoints selector
25
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_CATCH, "catch"); //$NON-NLS-1$
25
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_CATCH, "catch"); //$NON-NLS-1$
26
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_THROW, "throw"); //$NON-NLS-1$
26
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_THROW, "throw"); //$NON-NLS-1$
27
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_SIGNAL_CATCH, "signal"); //$NON-NLS-1$
28
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_EXEC, "exec"); //$NON-NLS-1$
27
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_EXEC, "exec"); //$NON-NLS-1$
29
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_FORK, "fork"); //$NON-NLS-1$
28
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_FORK, "fork"); //$NON-NLS-1$
30
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_VFORK, "vfork"); //$NON-NLS-1$
29
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_VFORK, "vfork"); //$NON-NLS-1$
31
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_EXIT, "exit"); //$NON-NLS-1$
30
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_SYSCALL, "syscall"); //$NON-NLS-1$
32
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_PROCESS_START, "start"); //$NON-NLS-1$
33
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_PROCESS_STOP, "stop"); //$NON-NLS-1$
34
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_THREAD_START, "thread_start"); //$NON-NLS-1$
35
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_THREAD_EXIT, "thread_exit"); //$NON-NLS-1$
36
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_THREAD_JOIN, "thread_join"); //$NON-NLS-1$
37
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_LIBRARY_LOAD, "load"); //$NON-NLS-1$
38
		sIdToKeyword.put(IEventBreakpointConstants.EVENT_TYPE_LIBRARY_UNLOAD, "unload"); //$NON-NLS-1$
39
	}
31
	}
40
32
41
	/**
33
	/**
(-)plugin.properties (-17 / +8 lines)
Lines 12-32 Link Here
12
providerName=Eclipse CDT
12
providerName=Eclipse CDT
13
13
14
catchType.label = Event Type
14
catchType.label = Event Type
15
catchSignal.label = Signal Caught
15
catchSyscall.label = syscall called
16
catchSignal.arg.label = Signal Number
16
catchSyscall.arg.label = System call name or number
17
catchCatch.label = Exception Caught
17
catchCatch.label = exception caught
18
catchThrow.label = Exception Thrown
18
catchThrow.label = exception thrown
19
19
20
#Note: fork, vfork and exec is not translatable words
20
#Note: fork, vfork and exec are not translatable words
21
catchFork.label = Stop on fork
21
catchFork.label = fork called
22
catchVfork.label = Stop on vfork
22
catchVfork.label = vfork called
23
catchExec.label = Stop on exec
23
catchExec.label = exec called
24
25
catchExit.label = Process exit
26
catchStop.label = Process suspend
27
catchStart.label = Process start
28
catchThreadExit.label = Thread exit
29
catchThreadStart.label = Thread start
30
catchThreadJoin.label =  Thread join
31
catchLoad.label = Library load
32
catchUnload.label = Library unload
(-)plugin.xml (-28 / +4 lines)
Lines 12-22 Link Here
12
	        	label="%catchThrow.label"
12
	        	label="%catchThrow.label"
13
	        	value="org.eclipse.cdt.debug.gdb.throw"/>
13
	        	value="org.eclipse.cdt.debug.gdb.throw"/>
14
			<value 
14
			<value 
15
				label="%catchSignal.label"
15
				label="%catchSyscall.label"
16
				value="org.eclipse.cdt.debug.gdb.signal">
16
				value="org.eclipse.cdt.debug.gdb.catch_syscall">
17
				<attribute 
17
				<attribute 
18
					name="org.eclipse.cdt.debug.core.eventbreakpoint_event_arg" label="%catchSignal.arg.label" 
18
					name="org.eclipse.cdt.debug.core.eventbreakpoint_event_arg" label="%catchSyscall.arg.label" 
19
					type="integer" fieldEditor="org.eclipse.jface.preference.IntegerFieldEditor"/>
19
					type="string" fieldEditor="org.eclipse.jface.preference.StringFieldEditor"/>
20
			</value>
20
			</value>
21
			<value
21
			<value
22
				label="%catchFork.label"
22
				label="%catchFork.label"
Lines 27-56 Link Here
27
			<value
27
			<value
28
				label="%catchExec.label"
28
				label="%catchExec.label"
29
				value="org.eclipse.cdt.debug.gdb.catch_exec"/>
29
				value="org.eclipse.cdt.debug.gdb.catch_exec"/>
30
			<value 
31
				label="%catchExit.label"
32
				value="org.eclipse.cdt.debug.gdb.catch_exit"/>
33
			<value 
34
				label="%catchStop.label"
35
				value="org.eclipse.cdt.debug.gdb.catch_stop"/>
36
			<value 
37
				label="%catchStart.label"
38
				value="org.eclipse.cdt.debug.gdb.catch_start"/>
39
			<value 
40
				label="%catchThreadStart.label"
41
				value="org.eclipse.cdt.debug.gdb.catch_thread_start"/>
42
			<value 
43
				label="%catchThreadExit.label"
44
				value="org.eclipse.cdt.debug.gdb.catch_thread_exit"/>
45
			<value 
46
				label="%catchThreadJoin.label"
47
				value="org.eclipse.cdt.debug.gdb.catch_thread_join"/>
48
			<value 
49
				label="%catchLoad.label"
50
				value="org.eclipse.cdt.debug.gdb.catch_load"/>
51
			<value 
52
				label="%catchUnload.label"
53
				value="org.eclipse.cdt.debug.gdb.catch_unload"/>
54
		</attribute> 
30
		</attribute> 
55
	</breakpointLabels>
31
	</breakpointLabels>
56
</extension>
32
</extension>
(-)src/org/eclipse/cdt/tests/dsf/gdb/tests/MICatchpointsTest.java (-2 / +2 lines)
Lines 1201-1209 Link Here
1201
	@Test
1201
	@Test
1202
	public void catchpointConversions() throws Throwable {
1202
	public void catchpointConversions() throws Throwable {
1203
		assertEquals("catch", GdbCatchpoints.eventToGdbCatchpointKeyword(IEventBreakpointConstants.EVENT_TYPE_CATCH));
1203
		assertEquals("catch", GdbCatchpoints.eventToGdbCatchpointKeyword(IEventBreakpointConstants.EVENT_TYPE_CATCH));
1204
		assertEquals("signal", GdbCatchpoints.eventToGdbCatchpointKeyword(IEventBreakpointConstants.EVENT_TYPE_SIGNAL_CATCH));
1204
		assertEquals("syscall", GdbCatchpoints.eventToGdbCatchpointKeyword(IEventBreakpointConstants.EVENT_TYPE_SYSCALL));
1205
		assertEquals(IEventBreakpointConstants.EVENT_TYPE_CATCH, GdbCatchpoints.gdbCatchpointKeywordToEvent("catch"));
1205
		assertEquals(IEventBreakpointConstants.EVENT_TYPE_CATCH, GdbCatchpoints.gdbCatchpointKeywordToEvent("catch"));
1206
		assertEquals(IEventBreakpointConstants.EVENT_TYPE_SIGNAL_CATCH, GdbCatchpoints.gdbCatchpointKeywordToEvent("signal"));
1206
		assertEquals(IEventBreakpointConstants.EVENT_TYPE_SYSCALL, GdbCatchpoints.gdbCatchpointKeywordToEvent("syscall"));
1207
		assertNull(GdbCatchpoints.gdbCatchpointKeywordToEvent("signa"));
1207
		assertNull(GdbCatchpoints.gdbCatchpointKeywordToEvent("signa"));
1208
		assertNull(GdbCatchpoints.gdbCatchpointKeywordToEvent("signals"));
1208
		assertNull(GdbCatchpoints.gdbCatchpointKeywordToEvent("signals"));
1209
	}
1209
	}

Return to bug 306427