author | erikj |
Tue, 12 Sep 2017 19:03:39 +0200 | |
changeset 47216 | 71c04702a3d5 |
parent 45714 | jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VMAction.java@1820d351198d |
permissions | -rw-r--r-- |
2 | 1 |
/* |
45714 | 2 |
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
package com.sun.tools.jdi; |
|
27 |
||
28 |
import java.util.EventObject; |
|
29 |
||
45714 | 30 |
import com.sun.jdi.ThreadReference; |
31 |
import com.sun.jdi.VirtualMachine; |
|
32 |
||
2 | 33 |
/* |
34 |
* The name "action" is used to avoid confusion |
|
35 |
* with JDI events. |
|
36 |
*/ |
|
37 |
class VMAction extends EventObject { |
|
45714 | 38 |
|
11277 | 39 |
private static final long serialVersionUID = -1701944679310296090L; |
40 |
||
2 | 41 |
// Event ids |
42 |
static final int VM_SUSPENDED = 1; |
|
43 |
static final int VM_NOT_SUSPENDED = 2; |
|
44 |
||
45 |
int id; |
|
836
d81b1f62fb82
6700889: Thread resume invalidates all stack frames, even from other threads
jjh
parents:
2
diff
changeset
|
46 |
ThreadReference resumingThread; |
2 | 47 |
|
48 |
VMAction(VirtualMachine vm, int id) { |
|
836
d81b1f62fb82
6700889: Thread resume invalidates all stack frames, even from other threads
jjh
parents:
2
diff
changeset
|
49 |
this(vm, null, id); |
d81b1f62fb82
6700889: Thread resume invalidates all stack frames, even from other threads
jjh
parents:
2
diff
changeset
|
50 |
} |
d81b1f62fb82
6700889: Thread resume invalidates all stack frames, even from other threads
jjh
parents:
2
diff
changeset
|
51 |
|
d81b1f62fb82
6700889: Thread resume invalidates all stack frames, even from other threads
jjh
parents:
2
diff
changeset
|
52 |
// For id = VM_NOT_SUSPENDED, if resumingThread != null, then it is |
d81b1f62fb82
6700889: Thread resume invalidates all stack frames, even from other threads
jjh
parents:
2
diff
changeset
|
53 |
// the only thread that is being resumed. |
45714 | 54 |
VMAction(VirtualMachine vm, ThreadReference resumingThread, int id) { |
2 | 55 |
super(vm); |
56 |
this.id = id; |
|
836
d81b1f62fb82
6700889: Thread resume invalidates all stack frames, even from other threads
jjh
parents:
2
diff
changeset
|
57 |
this.resumingThread = resumingThread; |
2 | 58 |
} |
45714 | 59 |
|
2 | 60 |
VirtualMachine vm() { |
61 |
return (VirtualMachine)getSource(); |
|
62 |
} |
|
45714 | 63 |
|
2 | 64 |
int id() { |
65 |
return id; |
|
66 |
} |
|
836
d81b1f62fb82
6700889: Thread resume invalidates all stack frames, even from other threads
jjh
parents:
2
diff
changeset
|
67 |
|
d81b1f62fb82
6700889: Thread resume invalidates all stack frames, even from other threads
jjh
parents:
2
diff
changeset
|
68 |
ThreadReference resumingThread() { |
d81b1f62fb82
6700889: Thread resume invalidates all stack frames, even from other threads
jjh
parents:
2
diff
changeset
|
69 |
return resumingThread; |
d81b1f62fb82
6700889: Thread resume invalidates all stack frames, even from other threads
jjh
parents:
2
diff
changeset
|
70 |
} |
2 | 71 |
} |