annotate agent/src/os/win32/Message.hpp @ 1552:c18cbe5936b8

6941466: Oracle rebranding changes for Hotspot repositories Summary: Change all the Sun copyrights to Oracle copyright Reviewed-by: ohair
author trims
date Thu, 27 May 2010 19:08:38 -0700
parents a61af66fc99e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
2 * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 #ifndef _MESSAGE_
a61af66fc99e Initial load
duke
parents:
diff changeset
26 #define _MESSAGE_
a61af66fc99e Initial load
duke
parents:
diff changeset
27
a61af66fc99e Initial load
duke
parents:
diff changeset
28 // These are the commands sent from the server to the child processes
a61af66fc99e Initial load
duke
parents:
diff changeset
29 // over the child processes' stdin pipes. A subset of the commands
a61af66fc99e Initial load
duke
parents:
diff changeset
30 // understood by the overall system, these require responses from the
a61af66fc99e Initial load
duke
parents:
diff changeset
31 // child process. Having a data structure rather than sending text
a61af66fc99e Initial load
duke
parents:
diff changeset
32 // simplifies parsing on the child side. The child replies by sending
a61af66fc99e Initial load
duke
parents:
diff changeset
33 // back fully-formatted replies which are copied by the server process
a61af66fc99e Initial load
duke
parents:
diff changeset
34 // to the clients' sockets.
a61af66fc99e Initial load
duke
parents:
diff changeset
35
a61af66fc99e Initial load
duke
parents:
diff changeset
36 struct PeekArg {
a61af66fc99e Initial load
duke
parents:
diff changeset
37 DWORD address;
a61af66fc99e Initial load
duke
parents:
diff changeset
38 DWORD numBytes;
a61af66fc99e Initial load
duke
parents:
diff changeset
39 };
a61af66fc99e Initial load
duke
parents:
diff changeset
40
a61af66fc99e Initial load
duke
parents:
diff changeset
41 // NOTE: when sending a PokeArg to the child process, we handle the
a61af66fc99e Initial load
duke
parents:
diff changeset
42 // buffer specially
a61af66fc99e Initial load
duke
parents:
diff changeset
43 struct PokeArg {
a61af66fc99e Initial load
duke
parents:
diff changeset
44 DWORD address;
a61af66fc99e Initial load
duke
parents:
diff changeset
45 DWORD numBytes;
a61af66fc99e Initial load
duke
parents:
diff changeset
46 void* data;
a61af66fc99e Initial load
duke
parents:
diff changeset
47 };
a61af66fc99e Initial load
duke
parents:
diff changeset
48
a61af66fc99e Initial load
duke
parents:
diff changeset
49 // Used for continueevent
a61af66fc99e Initial load
duke
parents:
diff changeset
50 struct BoolArg {
a61af66fc99e Initial load
duke
parents:
diff changeset
51 bool val;
a61af66fc99e Initial load
duke
parents:
diff changeset
52 };
a61af66fc99e Initial load
duke
parents:
diff changeset
53
a61af66fc99e Initial load
duke
parents:
diff changeset
54 // Used for duphandle, closehandle, and getcontext
a61af66fc99e Initial load
duke
parents:
diff changeset
55 struct HandleArg {
a61af66fc99e Initial load
duke
parents:
diff changeset
56 HANDLE handle;
a61af66fc99e Initial load
duke
parents:
diff changeset
57 };
a61af66fc99e Initial load
duke
parents:
diff changeset
58
a61af66fc99e Initial load
duke
parents:
diff changeset
59 // Used for setcontext
a61af66fc99e Initial load
duke
parents:
diff changeset
60 const int NUM_REGS_IN_CONTEXT = 22;
a61af66fc99e Initial load
duke
parents:
diff changeset
61 struct SetContextArg {
a61af66fc99e Initial load
duke
parents:
diff changeset
62 HANDLE handle;
a61af66fc99e Initial load
duke
parents:
diff changeset
63 DWORD Eax;
a61af66fc99e Initial load
duke
parents:
diff changeset
64 DWORD Ebx;
a61af66fc99e Initial load
duke
parents:
diff changeset
65 DWORD Ecx;
a61af66fc99e Initial load
duke
parents:
diff changeset
66 DWORD Edx;
a61af66fc99e Initial load
duke
parents:
diff changeset
67 DWORD Esi;
a61af66fc99e Initial load
duke
parents:
diff changeset
68 DWORD Edi;
a61af66fc99e Initial load
duke
parents:
diff changeset
69 DWORD Ebp;
a61af66fc99e Initial load
duke
parents:
diff changeset
70 DWORD Esp;
a61af66fc99e Initial load
duke
parents:
diff changeset
71 DWORD Eip;
a61af66fc99e Initial load
duke
parents:
diff changeset
72 DWORD Ds;
a61af66fc99e Initial load
duke
parents:
diff changeset
73 DWORD Es;
a61af66fc99e Initial load
duke
parents:
diff changeset
74 DWORD Fs;
a61af66fc99e Initial load
duke
parents:
diff changeset
75 DWORD Gs;
a61af66fc99e Initial load
duke
parents:
diff changeset
76 DWORD Cs;
a61af66fc99e Initial load
duke
parents:
diff changeset
77 DWORD Ss;
a61af66fc99e Initial load
duke
parents:
diff changeset
78 DWORD EFlags;
a61af66fc99e Initial load
duke
parents:
diff changeset
79 DWORD Dr0;
a61af66fc99e Initial load
duke
parents:
diff changeset
80 DWORD Dr1;
a61af66fc99e Initial load
duke
parents:
diff changeset
81 DWORD Dr2;
a61af66fc99e Initial load
duke
parents:
diff changeset
82 DWORD Dr3;
a61af66fc99e Initial load
duke
parents:
diff changeset
83 DWORD Dr6;
a61af66fc99e Initial load
duke
parents:
diff changeset
84 DWORD Dr7;
a61af66fc99e Initial load
duke
parents:
diff changeset
85 };
a61af66fc99e Initial load
duke
parents:
diff changeset
86
a61af66fc99e Initial load
duke
parents:
diff changeset
87 // Used for selectorentry
a61af66fc99e Initial load
duke
parents:
diff changeset
88 struct SelectorEntryArg {
a61af66fc99e Initial load
duke
parents:
diff changeset
89 HANDLE handle;
a61af66fc99e Initial load
duke
parents:
diff changeset
90 DWORD selector;
a61af66fc99e Initial load
duke
parents:
diff changeset
91 };
a61af66fc99e Initial load
duke
parents:
diff changeset
92
a61af66fc99e Initial load
duke
parents:
diff changeset
93 struct Message {
a61af66fc99e Initial load
duke
parents:
diff changeset
94 typedef enum {
a61af66fc99e Initial load
duke
parents:
diff changeset
95 ATTACH,
a61af66fc99e Initial load
duke
parents:
diff changeset
96 DETACH,
a61af66fc99e Initial load
duke
parents:
diff changeset
97 LIBINFO,
a61af66fc99e Initial load
duke
parents:
diff changeset
98 PEEK,
a61af66fc99e Initial load
duke
parents:
diff changeset
99 POKE,
a61af66fc99e Initial load
duke
parents:
diff changeset
100 THREADLIST,
a61af66fc99e Initial load
duke
parents:
diff changeset
101 DUPHANDLE,
a61af66fc99e Initial load
duke
parents:
diff changeset
102 CLOSEHANDLE,
a61af66fc99e Initial load
duke
parents:
diff changeset
103 GETCONTEXT,
a61af66fc99e Initial load
duke
parents:
diff changeset
104 SETCONTEXT,
a61af66fc99e Initial load
duke
parents:
diff changeset
105 SELECTORENTRY,
a61af66fc99e Initial load
duke
parents:
diff changeset
106 SUSPEND,
a61af66fc99e Initial load
duke
parents:
diff changeset
107 RESUME,
a61af66fc99e Initial load
duke
parents:
diff changeset
108 POLLEVENT,
a61af66fc99e Initial load
duke
parents:
diff changeset
109 CONTINUEEVENT
a61af66fc99e Initial load
duke
parents:
diff changeset
110 } Type;
a61af66fc99e Initial load
duke
parents:
diff changeset
111
a61af66fc99e Initial load
duke
parents:
diff changeset
112 Type type;
a61af66fc99e Initial load
duke
parents:
diff changeset
113 union {
a61af66fc99e Initial load
duke
parents:
diff changeset
114 PeekArg peekArg;
a61af66fc99e Initial load
duke
parents:
diff changeset
115 PokeArg pokeArg;
a61af66fc99e Initial load
duke
parents:
diff changeset
116 BoolArg boolArg;
a61af66fc99e Initial load
duke
parents:
diff changeset
117 HandleArg handleArg;
a61af66fc99e Initial load
duke
parents:
diff changeset
118 SetContextArg setContextArg;
a61af66fc99e Initial load
duke
parents:
diff changeset
119 SelectorEntryArg selectorArg;
a61af66fc99e Initial load
duke
parents:
diff changeset
120 };
a61af66fc99e Initial load
duke
parents:
diff changeset
121 };
a61af66fc99e Initial load
duke
parents:
diff changeset
122
a61af66fc99e Initial load
duke
parents:
diff changeset
123 #endif // #defined _MESSAGE_