DBA Data[Home] [Help]

PACKAGE: OWAPUB.DEBUG_CARTX

Source


1 package DEBUG_CARTX as
2 -- -- ************************************************************************
3 --  Copyright (c) 1991, 1998 by Oracle Corporation.  All Rights Reserved.
4 --
5 --  NAME
6 --    DEBUG_CARTX Pakcage Spec
7 --  DESCRIPTION
8 --    This package implements PL/SQL cartridge debugging using
9 --    Oracle Procedure Builder.
10 --
11 --  NOTES
12 --    The user of this package should have Execute permission on the to be
13 --    debugged Procedure.  This package is compatible with Oracle Database of
14 --    version 7.3.4 and 8.0.4 or above, Oracle Procedure Builder 6.1 or above.
15 --    This package is dependent on WebDB 2.1 or above or OAS 4.0.8 or above.
16 --
17 --    MODIFIED  MM/DD/YY   Comments
18 --
19 --    jmojnida  10/26/98   Created
20 --
21 -- ***************************************************************************
22 
23 	"PDE_OUT_OF_SYNC" EXCEPTION;
24 	"PDE_QUIT_DEBUG_CARTX" EXCEPTION;
25 	"PDE_CTX_TGT" EXCEPTION;
26 	"PDE_CTX_DBG" EXCEPTION;
27 
28 	DEBUG_CARTX_SUCCESS integer := 0;
29 	--Following are the states when a debug session can be aborted.
30   DEBUG_CARTX_QUIT        constant integer := -1;
31   DEBUG_CARTX_ERR         constant integer := -2;
32   DEBUG_CARTX_ERR_INIT    constant integer := -3;
33   DEBUG_CARTX_ERR_RDSRC   constant integer := -4;
34   DEBUG_CARTX_ERR_CRTPROC constant integer := -5;
35   DEBUG_CARTX_ERR_SNDRES  constant integer := -6;
36   DEBUG_CARTX_ERR_INFO    constant integer := -7;
37   DEBUG_CARTX_ABORT       constant integer := -8;
38   DEBUG_CARTX_SUSPEND     constant integer := -9;
39   DEBUG_CARTX_ERR_PROC_EXISTS constant integer := -10;
40 
41   type dbg_stack is table of varchar2(2000) index by binary_integer;
42 
43  	--Can be executed by the target connections.
44 	--Shuts down the debug session.
45 	--Cleans-up the pipes and the global area.
46  	PROCEDURE resetDebugSession;
47 
48 	--Can be executed by a third connections.
49 	--Use this in case of errors/hangs in debugger.
50 	--Shuts down the specified debug session.
51 	--Cleans-up the pipes and the global area.
52  	PROCEDURE cleanupDebugSession(SessionId  varchar2);
53 
54   --Programmatic interface for WebView to get the current session id.
55   --Should be called from WebView directly.
56   PROCEDURE getDebugSessionId(SessionId out varchar2);
57 
58 --
59  	--Executed by the target connection
60  	--Prints an HTML page which has the sessionID.
61 	--Session ID is guaranteed to be instance-wide unique.
62 	--This Session ID is used extensively in all other procedures.
63  	PROCEDURE     getDebugSession;
64 --
65 
66 
67  	-- Executed by the target connection
68 	-- Target connection waits in this procedure for the results to arrive from
69   -- the debug connection. When the results arrive it saves the same in the
70   -- htp array for future OWA.get_page calls.
71 	-- sDownloadFileList    The download file.
72 	-- nCompress            Mimetype information.
73  	PROCEDURE tgt_fetch_results(sDownloadFileList out varchar2,
74                               nCompress out number);
75 --
76 
77   --Executed by the target connection
78 	--Send the source that actually needs to be executed in the anonymous block.
79   PROCEDURE tgt_exec_block(source varchar2);
80  --
81 
82   --Executed by Debug Connection
83 	--Receives the CGI environment variables from the target connection.
84 	--Initializes the CGI environment in the debug connection context.
85 	--SessionID   The session ID the user has entered in the attach dialog.
86 	--status      Has the error code or success.
87   PROCEDURE dbg_init_cgi_env(SessID varchar2, status IN OUT integer,
88                              err_info IN OUT varchar2);
89 --
90 
91   --Executed by Debug Connection
92 	--After the intended SPU is executed in the debug connection, the results
93   --are sent to the target connection.
94 	--SessionID   The session ID the user has entered in the attach dialog.
95 	--status      Has the error code or success.
96   PROCEDURE dbg_send_results(SessID varchar2, status IN OUT integer,
97                              filename varchar2, mimetype number,
98                              err_info IN varchar2);
99 --
100   --Executed by the Debug Connection
101 	--Gets the actual source to be executed in the debug connection.
102 	--SessionID   The session ID the user has entered in the attach dialog.
103 	--status      Has the error code or success.
104 	--execBlock   Has the complete source that needs to be executed.
105 	PROCEDURE dbg_get_exec_block(SessID  varchar2,
106                                status  IN OUT integer,
107                                execBlock  OUT varchar2,
108                                err_info IN OUT varchar2);
109 --
110   --Executed by the Debug Connection.
111   --Stops the debug session by sending an error or quit.
112   PROCEDURE dbg_stop_debugging(SessId varchar2, status OUT integer,
113                                stopflag integer);
114 --
115 
116   --Executed by the Debug Connection.
117   --Stops the debug session by sending an error or quit.
118   PROCEDURE dbg_stop_debugging(SessId varchar2, status OUT integer,
119                                stopflag integer, err_info varchar2);
120 --
121 
122   --A helper procedure.
123   --Provide owner name, procedure name and the argument name get the argument
124   --type.  Useful when the argument type is a PL/SQL table.  Arguememnt type
125   --is the exact datatype as described in the procedure. Kinda' supplement to
126   --DBMS_DESCRIBE.Describe_Procedure????
127   PROCEDURE misc_GetArgType(owner_name varchar2, proc_name varchar2,
128                             arg_name varchar2, arg_type_name OUT varchar2,
129                             package_name varchar2 default NULL);
130 
131 
132   FUNCTION dbg_get_schema_name(schemaname OUT varchar2) RETURN integer;
133 
134 
135   /*
136     Do not move this.  This needs to be the last entry point.  If you want to
137     load this spec on the build machine remove this entry point.
138   */
139 	--Executed by the target connection.
140 	--Initializes the CGI environment. This is similar to the OWA.init_cgi_env.
141 	--numCGIParams   number of CGI environment variables passed.
142 	--cgiArgn       names of the environment variables.
143 	--cgiArgv       variables of the environment variables.
144  	PROCEDURE tgt_init_cgi_env(num_params in number, param_name in owa.vc_arr,
145                              param_val in owa.vc_arr);
146 --
147 
148 end DEBUG_CARTX;
149 
150 
151 
152