annotate agent/src/os/solaris/dbx/shell_imp.h @ 3237:399aa66d375e

Fixed a bug in which the valueEquals method was misused. The method does only check the equality of the node data and not full GVN equality by taking inputs and successors into account.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 27 Jul 2011 14:16:38 -0700
parents c18cbe5936b8
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) 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 SHELL_IMP_H
a61af66fc99e Initial load
duke
parents:
diff changeset
26 #define SHELL_IMP_H
a61af66fc99e Initial load
duke
parents:
diff changeset
27
a61af66fc99e Initial load
duke
parents:
diff changeset
28 #ifdef __cplusplus
a61af66fc99e Initial load
duke
parents:
diff changeset
29 extern "C" {
a61af66fc99e Initial load
duke
parents:
diff changeset
30 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
31
a61af66fc99e Initial load
duke
parents:
diff changeset
32 #include <stdio.h>
a61af66fc99e Initial load
duke
parents:
diff changeset
33
a61af66fc99e Initial load
duke
parents:
diff changeset
34 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
35 CCR info
a61af66fc99e Initial load
duke
parents:
diff changeset
36
a61af66fc99e Initial load
duke
parents:
diff changeset
37 Vesrion history:
a61af66fc99e Initial load
duke
parents:
diff changeset
38
a61af66fc99e Initial load
duke
parents:
diff changeset
39 1.0 - Initial CCR release
a61af66fc99e Initial load
duke
parents:
diff changeset
40
a61af66fc99e Initial load
duke
parents:
diff changeset
41 Release information for automatic CCR updates:
a61af66fc99e Initial load
duke
parents:
diff changeset
42
a61af66fc99e Initial load
duke
parents:
diff changeset
43 BEGIN RELEASE NOTES: (signifies what gets put into CCR release notes)
a61af66fc99e Initial load
duke
parents:
diff changeset
44 1.1
a61af66fc99e Initial load
duke
parents:
diff changeset
45 - Entry points for va_list style msgs; new shell_imp_vmsg()
a61af66fc99e Initial load
duke
parents:
diff changeset
46 and shell_imp_verrmsg()
a61af66fc99e Initial load
duke
parents:
diff changeset
47 - shell_imp_env_checker() is now shell_imp_var_checker().
a61af66fc99e Initial load
duke
parents:
diff changeset
48 Also the var_checker callback gets passed interp.
a61af66fc99e Initial load
duke
parents:
diff changeset
49 1.2 - interposition framework (used by jdbx)
a61af66fc99e Initial load
duke
parents:
diff changeset
50 - access to input FILE pointer.
a61af66fc99e Initial load
duke
parents:
diff changeset
51
a61af66fc99e Initial load
duke
parents:
diff changeset
52 END RELEASE NOTES: (signifies what gets put into CCR release notes)
a61af66fc99e Initial load
duke
parents:
diff changeset
53
a61af66fc99e Initial load
duke
parents:
diff changeset
54 Following is used as a CCR version number:
a61af66fc99e Initial load
duke
parents:
diff changeset
55 #define CCR_SHELL_IMP_VERSION 1.1
a61af66fc99e Initial load
duke
parents:
diff changeset
56 */
a61af66fc99e Initial load
duke
parents:
diff changeset
57
a61af66fc99e Initial load
duke
parents:
diff changeset
58 #include <stdarg.h>
a61af66fc99e Initial load
duke
parents:
diff changeset
59
a61af66fc99e Initial load
duke
parents:
diff changeset
60 #define SHELL_IMP_MAJOR 1
a61af66fc99e Initial load
duke
parents:
diff changeset
61 #define SHELL_IMP_MINOR 2
a61af66fc99e Initial load
duke
parents:
diff changeset
62 #define SHELL_IMP_FLAG_GLOB 0x1
a61af66fc99e Initial load
duke
parents:
diff changeset
63 #define SHELL_IMP_FLAG_ARGQ 0x2
a61af66fc99e Initial load
duke
parents:
diff changeset
64
a61af66fc99e Initial load
duke
parents:
diff changeset
65 typedef void *shell_imp_interp_t;
a61af66fc99e Initial load
duke
parents:
diff changeset
66 typedef void *shell_imp_command_t;
a61af66fc99e Initial load
duke
parents:
diff changeset
67 typedef int shell_imp_fun_t(shell_imp_interp_t, int, char **, void *);
a61af66fc99e Initial load
duke
parents:
diff changeset
68
a61af66fc99e Initial load
duke
parents:
diff changeset
69 int
a61af66fc99e Initial load
duke
parents:
diff changeset
70 shell_imp_init(
a61af66fc99e Initial load
duke
parents:
diff changeset
71 int, /* major version number */
a61af66fc99e Initial load
duke
parents:
diff changeset
72 int, /* minor version number */
a61af66fc99e Initial load
duke
parents:
diff changeset
73 shell_imp_interp_t, /* interpreter */
a61af66fc99e Initial load
duke
parents:
diff changeset
74 int, /* argc */
a61af66fc99e Initial load
duke
parents:
diff changeset
75 char *[] /* argv */
a61af66fc99e Initial load
duke
parents:
diff changeset
76 );
a61af66fc99e Initial load
duke
parents:
diff changeset
77
a61af66fc99e Initial load
duke
parents:
diff changeset
78 int
a61af66fc99e Initial load
duke
parents:
diff changeset
79 shell_imp_fini(shell_imp_interp_t);
a61af66fc99e Initial load
duke
parents:
diff changeset
80
a61af66fc99e Initial load
duke
parents:
diff changeset
81 shell_imp_command_t
a61af66fc99e Initial load
duke
parents:
diff changeset
82 shell_imp_define_command(char *, /* command name e.g. "tnf" */
a61af66fc99e Initial load
duke
parents:
diff changeset
83 shell_imp_fun_t *, /* callback function */
a61af66fc99e Initial load
duke
parents:
diff changeset
84 int, /* SHELL_IMP_FLAG_* bit vector */
a61af66fc99e Initial load
duke
parents:
diff changeset
85 void *, /* client_data Passed as last arg to
a61af66fc99e Initial load
duke
parents:
diff changeset
86 /* callback function */
a61af66fc99e Initial load
duke
parents:
diff changeset
87 char * /* help message, e.g. */
a61af66fc99e Initial load
duke
parents:
diff changeset
88 /* "enable the specified tnf probes" */
a61af66fc99e Initial load
duke
parents:
diff changeset
89 );
a61af66fc99e Initial load
duke
parents:
diff changeset
90
a61af66fc99e Initial load
duke
parents:
diff changeset
91 int
a61af66fc99e Initial load
duke
parents:
diff changeset
92 shell_imp_undefine_command(shell_imp_command_t);
a61af66fc99e Initial load
duke
parents:
diff changeset
93
a61af66fc99e Initial load
duke
parents:
diff changeset
94 int
a61af66fc99e Initial load
duke
parents:
diff changeset
95 shell_imp_var_checker(shell_imp_interp_t,
a61af66fc99e Initial load
duke
parents:
diff changeset
96 const char *, /* var name */
a61af66fc99e Initial load
duke
parents:
diff changeset
97 int (*)(shell_imp_interp_t, const char*) /* env checker */
a61af66fc99e Initial load
duke
parents:
diff changeset
98 );
a61af66fc99e Initial load
duke
parents:
diff changeset
99
a61af66fc99e Initial load
duke
parents:
diff changeset
100 int
a61af66fc99e Initial load
duke
parents:
diff changeset
101 shell_imp_execute(shell_imp_interp_t, const char *);
a61af66fc99e Initial load
duke
parents:
diff changeset
102
a61af66fc99e Initial load
duke
parents:
diff changeset
103 const char *
a61af66fc99e Initial load
duke
parents:
diff changeset
104 shell_imp_get_var(shell_imp_interp_t, const char *);
a61af66fc99e Initial load
duke
parents:
diff changeset
105
a61af66fc99e Initial load
duke
parents:
diff changeset
106 void
a61af66fc99e Initial load
duke
parents:
diff changeset
107 shell_imp_msg(shell_imp_interp_t, const char *, ...);
a61af66fc99e Initial load
duke
parents:
diff changeset
108
a61af66fc99e Initial load
duke
parents:
diff changeset
109 void
a61af66fc99e Initial load
duke
parents:
diff changeset
110 shell_imp_errmsg(shell_imp_interp_t, const char *, ...);
a61af66fc99e Initial load
duke
parents:
diff changeset
111
a61af66fc99e Initial load
duke
parents:
diff changeset
112 void
a61af66fc99e Initial load
duke
parents:
diff changeset
113 shell_imp_vmsg(shell_imp_interp_t, const char *, va_list);
a61af66fc99e Initial load
duke
parents:
diff changeset
114
a61af66fc99e Initial load
duke
parents:
diff changeset
115 void
a61af66fc99e Initial load
duke
parents:
diff changeset
116 shell_imp_verrmsg(shell_imp_interp_t, const char *, va_list);
a61af66fc99e Initial load
duke
parents:
diff changeset
117
a61af66fc99e Initial load
duke
parents:
diff changeset
118
a61af66fc99e Initial load
duke
parents:
diff changeset
119
a61af66fc99e Initial load
duke
parents:
diff changeset
120 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
121 * Stuff added for 1.2
a61af66fc99e Initial load
duke
parents:
diff changeset
122 */
a61af66fc99e Initial load
duke
parents:
diff changeset
123
a61af66fc99e Initial load
duke
parents:
diff changeset
124 struct shell_imp_interposition_info_t {
a61af66fc99e Initial load
duke
parents:
diff changeset
125 shell_imp_fun_t *
a61af66fc99e Initial load
duke
parents:
diff changeset
126 new_func;
a61af66fc99e Initial load
duke
parents:
diff changeset
127 void * new_client_data;
a61af66fc99e Initial load
duke
parents:
diff changeset
128 shell_imp_fun_t *
a61af66fc99e Initial load
duke
parents:
diff changeset
129 original_func;
a61af66fc99e Initial load
duke
parents:
diff changeset
130 void * original_client_data;
a61af66fc99e Initial load
duke
parents:
diff changeset
131 int original_flags;
a61af66fc99e Initial load
duke
parents:
diff changeset
132 };
a61af66fc99e Initial load
duke
parents:
diff changeset
133
a61af66fc99e Initial load
duke
parents:
diff changeset
134 typedef int shell_imp_dispatcher_t(shell_imp_interp_t, int, char **,
a61af66fc99e Initial load
duke
parents:
diff changeset
135 shell_imp_interposition_info_t *);
a61af66fc99e Initial load
duke
parents:
diff changeset
136
a61af66fc99e Initial load
duke
parents:
diff changeset
137 shell_imp_command_t
a61af66fc99e Initial load
duke
parents:
diff changeset
138 shell_imp_interpose(char *name,
a61af66fc99e Initial load
duke
parents:
diff changeset
139 shell_imp_fun_t *new_func,
a61af66fc99e Initial load
duke
parents:
diff changeset
140 int flags,
a61af66fc99e Initial load
duke
parents:
diff changeset
141 void *client_data,
a61af66fc99e Initial load
duke
parents:
diff changeset
142 char * description,
a61af66fc99e Initial load
duke
parents:
diff changeset
143 shell_imp_dispatcher_t *);
a61af66fc99e Initial load
duke
parents:
diff changeset
144
a61af66fc99e Initial load
duke
parents:
diff changeset
145 int shell_imp_uninterpose(shell_imp_command_t);
a61af66fc99e Initial load
duke
parents:
diff changeset
146
a61af66fc99e Initial load
duke
parents:
diff changeset
147 int
a61af66fc99e Initial load
duke
parents:
diff changeset
148 shell_imp_dispatch_interposition(shell_imp_interp_t,
a61af66fc99e Initial load
duke
parents:
diff changeset
149 shell_imp_interposition_info_t *,
a61af66fc99e Initial load
duke
parents:
diff changeset
150 int argc, char *argv[]);
a61af66fc99e Initial load
duke
parents:
diff changeset
151
a61af66fc99e Initial load
duke
parents:
diff changeset
152 int
a61af66fc99e Initial load
duke
parents:
diff changeset
153 shell_imp_dispatch_original(shell_imp_interp_t,
a61af66fc99e Initial load
duke
parents:
diff changeset
154 shell_imp_interposition_info_t *,
a61af66fc99e Initial load
duke
parents:
diff changeset
155 int argc, char *argv[]);
a61af66fc99e Initial load
duke
parents:
diff changeset
156
a61af66fc99e Initial load
duke
parents:
diff changeset
157 FILE *
a61af66fc99e Initial load
duke
parents:
diff changeset
158 shell_imp_cur_input(shell_imp_interp_t);
a61af66fc99e Initial load
duke
parents:
diff changeset
159
a61af66fc99e Initial load
duke
parents:
diff changeset
160 #ifdef __cplusplus
a61af66fc99e Initial load
duke
parents:
diff changeset
161 }
a61af66fc99e Initial load
duke
parents:
diff changeset
162 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
163
a61af66fc99e Initial load
duke
parents:
diff changeset
164 #endif