00001 /***************************************************************************** 00002 * 00003 * xdbx - X Window System interface to the dbx debugger 00004 * 00005 * Copyright 1989 The University of Texas at Austin 00006 * Copyright 1990 Microelectronics and Computer Technology Corporation 00007 * 00008 * Permission to use, copy, modify, and distribute this software and its 00009 * documentation for any purpose and without fee is hereby granted, 00010 * provided that the above copyright notice appear in all copies and that 00011 * both that copyright notice and this permission notice appear in 00012 * supporting documentation, and that the name of The University of Texas 00013 * and Microelectronics and Computer Technology Corporation (MCC) not be 00014 * used in advertising or publicity pertaining to distribution of 00015 * the software without specific, written prior permission. The 00016 * University of Texas and MCC makes no representations about the 00017 * suitability of this software for any purpose. It is provided "as is" 00018 * without express or implied warranty. 00019 * 00020 * THE UNIVERSITY OF TEXAS AND MCC DISCLAIMS ALL WARRANTIES WITH REGARD TO 00021 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 00022 * FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF TEXAS OR MCC BE LIABLE FOR 00023 * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER 00024 * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF 00025 * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 00026 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 00027 * 00028 * Author: Po Cheung 00029 * Created: March 10, 1989 00030 * 00031 ***************************************************************************** 00032 * 00033 * xxgdb - X Window System interface to the gdb debugger 00034 * 00035 * Copyright 1990 Thomson Consumer Electronics, Inc. 00036 * 00037 * Permission to use, copy, modify, and distribute this software and its 00038 * documentation for any purpose and without fee is hereby granted, 00039 * provided that the above copyright notice appear in all copies and that 00040 * both that copyright notice and this permission notice appear in 00041 * supporting documentation, and that the name of Thomson Consumer 00042 * Electronics (TCE) not be used in advertising or publicity pertaining 00043 * to distribution of the software without specific, written prior 00044 * permission. TCE makes no representations about the suitability of 00045 * this software for any purpose. It is provided "as is" without express 00046 * or implied warranty. 00047 * 00048 * TCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 00049 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT 00050 * SHALL TCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES 00051 * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 00052 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 00053 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 00054 * SOFTWARE. 00055 * 00056 * Adaptation to GDB: Pierre Willard 00057 * XXGDB Created: December, 1990 00058 * 00059 *****************************************************************************/ 00060 00061 /* global.h: 00062 * 00063 * Contain extern declarations of variables and functions. 00064 */ 00065 00066 00067 #ifdef __STDC__ 00068 #ifndef __PARAMS 00069 #define __PARAMS(paramlist) paramlist 00070 #endif 00071 #else 00072 #ifndef __PARAMS 00073 #define __PARAMS(paramlist) () 00074 #endif 00075 #endif 00076 00077 #include "machine.h" 00078 #include "defs.h" 00079 00080 #include "All-extern.h" 00081 00082 /* calldbx.c */ 00083 00084 extern void calldbx(); /* fork child, exec dbx */ 00085 00086 /* command.c */ 00087 00088 extern void CreateCommandPanel(); 00089 extern void send_command(); 00090 extern char *get_command(); 00091 extern void insert_command(); 00092 extern void delete_command(); 00093 00094 /* datadpy.c */ 00095 00096 extern void print_handler(); /* printing variables */ 00097 00098 /* dbx.c */ 00099 00100 extern void debug_init(); /* initial source display */ 00101 extern void read_dbx(); /* get data from dbx */ 00102 extern void write_scilab(); /* send data to dbx */ 00103 extern void query_dbx(); /* ask dbx for info */ 00104 00105 00106 /* filemenu.c */ 00107 00108 extern void File(),FileE(),FileG(); /* file button callback */ 00109 00110 /* handler.c */ 00111 00112 extern void TextSetTopPosition(); /* sets topDisplayPosition */ 00113 extern void AdjustText(); /* adjust display position */ 00114 extern void exec_handler(); /* run, cont, next, step */ 00115 extern void done_handler(); /* run, cont, next, step */ 00116 extern void stop_at_handler(); /* stop at line */ 00117 extern void stop_in_handler(); /* stop in function */ 00118 extern void updown_handler(); /* move up/down the stack */ 00119 extern void delete_handler(); /* delete stop signs */ 00120 extern void func_handler(); /* display function */ 00121 extern void file_handler(); /* display file */ 00122 extern void debug_handler(); /* debug program */ 00123 extern void cd_handler(); /* change directory */ 00124 extern void pwd_handler(); /* print working directory */ 00125 extern void use_handler(); /* update use directory list */ 00126 extern void search_handler(); /* display searched string */ 00127 extern void list_handler(); /* list source code */ 00128 extern void display_handler(); /* show display variables */ 00129 00130 /* parser.c */ 00131 00132 extern void parser_init(); /* initialization */ 00133 extern void parse(); /* parse dbx output */ 00134 extern void filter(); /* modify dbx output */ 00135 00136 /* signals.c */ 00137 extern void trap_signals(); /* signal handling for xdbx */ 00138 00139 /* signs.c */ 00140 00141 extern void signs_init(); /* initilalize routine */ 00142 extern void DisplayStop(); /* show stop sign */ 00143 extern void UpdateStops(); /* update position of stops */ 00144 extern void ClearStops(); /* mark all stops invalid */ 00145 extern void RemoveStop(); /* undisplay stop sign */ 00146 extern void UpdateArrow(); /* update position of arrow */ 00147 extern void UpdateUpdown(); /* update position of updown */ 00148 extern void UpdateBomb(); /* update position of bomb */ 00149 00150 /* source.c */ 00151 00152 extern void SelectStart(); /* modified select-start */ 00153 extern void SelectEnd(); /* modified select-end */ 00154 extern void SelectWord(); /* my select word */ 00155 extern void PrintSelection(); /* select variable and print */ 00156 extern void Update(); /* update line label */ 00157 extern void source_init(); /* init routine */ 00158 extern void CreateSourceWindow(); 00159 extern int LoadFile(); /* display source file */ 00160 extern int LoadCurrentFile(); /* display source file */ 00161 extern char *GetPathname(); /* get full path name of file */ 00162 extern void MakeDirList(); /* maintain list of dirs */ 00163 00164 /* utils.c */ 00165 00166 extern int TextPositionToLine(); /* convert line # to text pos */ 00167 extern int LineToStop_no(); /* convert line # to stop # */ 00168 extern void DisableWindowResize(); /* do not allow window resize */ 00169 extern void bell(); /* sound bell */ 00170 extern char *concat(); /* substring search */ 00171 00172 /* windows.c */ 00173 00174 00175 extern void UpdateFileLabel(); /* update current file name */ 00176 extern void UpdateLineLabel(); /* update current line num */ 00177 extern void UpdateMessageWindow(); /* update xdbx message */ 00178 00179 /* extern variables */ 00180 00181 extern Display *display; 00182 extern XtAppContext app_con; 00183 extern Widget toplevel, fileWindow, 00184 sourceForm, sourceWindow, messageWindow, 00185 dialogWindow, searchWindow, separator; 00186 00187 extern Cursor watch; /* XC_watch cursor */ 00188 extern XdbxResources application_resources; /* application resources */ 00189 extern char xdbxinit[]; /* initialization filename */ 00190 extern char *dbxprompt; /* dbx prompt string */ 00191 extern char *xdbxprompt; /* xdbx prompt string */ 00192 extern Boolean Tstartup; 00193 extern Boolean debug_jpc; 00194 00195 extern FileRec *displayedFile; /* pointer to current file info */ 00196 extern Tokens Token; /* token structure */ 00197 extern PatternRec dataPattern[]; /* data display pattern */ 00198 00199 extern Boolean Echo; /* echo dbx output onto window ? */ 00200 extern Boolean Prompt; /* command or program input ? */ 00201 extern Boolean Parse; /* flag for parser */ 00202 extern Boolean FalseSignal; /* real/false signal ? */ 00203 extern Boolean PopupMode; /* True if graphical display */ 00204 extern int dbxpid; /* dbx process id */ 00205 extern FILE *dbxfp; /* file pointer to dbx process */ 00206 00207 extern char CurrentFile[]; /* string for dbx output */ 00208 extern char cwd[]; /* current working directory of dbx */ 00209 00210 extern Arrow arrow; /* arrow widget and mapped info */ 00211 extern Updown updown; /* updown widget and mapped info */ 00212 extern Stops stops[]; /* stop widget and mapped info */ 00213 extern Bomb bomb; /* bomb widget and mapped info */ 00214 extern Cardinal nstops; /* number of stops */ 00215
1.5.1