"Fossies" - the Fresh Open Source Software Archive

Member "xxgdb-1.12/XXGDB_README" (16 Nov 1995, 15117 Bytes) of package /linux/misc/old/xxgdb-1.12.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 /*****************************************************************************
    2  *
    3  *  xdbx - X Window System interface to the dbx debugger
    4  *
    5  *  Copyright 1989 The University of Texas at Austin
    6  *  Copyright 1990 Microelectronics and Computer Technology Corporation
    7  *
    8  *  Permission to use, copy, modify, and distribute this software and its
    9  *  documentation for any purpose and without fee is hereby granted,
   10  *  provided that the above copyright notice appear in all copies and that
   11  *  both that copyright notice and this permission notice appear in
   12  *  supporting documentation, and that the name of The University of Texas
   13  *  and Microelectronics and Computer Technology Corporation (MCC) not be 
   14  *  used in advertising or publicity pertaining to distribution of
   15  *  the software without specific, written prior permission.  The
   16  *  University of Texas and MCC makes no representations about the 
   17  *  suitability of this software for any purpose.  It is provided "as is" 
   18  *  without express or implied warranty.
   19  *
   20  *  THE UNIVERSITY OF TEXAS AND MCC DISCLAIMS ALL WARRANTIES WITH REGARD TO
   21  *  THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
   22  *  FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF TEXAS OR MCC BE LIABLE FOR
   23  *  ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
   24  *  RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
   25  *  CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
   26  *  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   27  *
   28  *  Author:  	Po Cheung
   29  *  Created:   	March 10, 1989
   30  * 
   31  *****************************************************************************
   32  * 
   33  *  xxgdb - X Window System interface to the gdb debugger
   34  *  
   35  * 	Copyright 1990,1994 Thomson Consumer Electronics, Inc.
   36  *  
   37  *  Permission to use, copy, modify, and distribute this software and its
   38  *  documentation for any purpose and without fee is hereby granted,
   39  *  provided that the above copyright notice appear in all copies and that
   40  *  both that copyright notice and this permission notice appear in
   41  *  supporting documentation, and that the name of Thomson Consumer
   42  *  Electronics (TCE) not be used in advertising or publicity pertaining
   43  *  to distribution of the software without specific, written prior
   44  *  permission.  TCE makes no representations about the suitability of
   45  *  this software for any purpose.  It is provided "as is" without express
   46  *  or implied warranty.
   47  *
   48  *  TCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
   49  *  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
   50  *  SHALL TCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
   51  *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
   52  *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
   53  *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
   54  *  SOFTWARE.
   55  *
   56  *  Adaptation to GDB:  Pierre Willard
   57  *  XXGDB Created:   	December, 1990
   58  *
   59  *****************************************************************************
   60  *
   61  *  Modifications for use under System V
   62  *
   63  *      Copyright 1990 Bull Worldwide Information Systems, Inc.
   64  *
   65  *  Permission to use, copy, modify, and distribute this software and its
   66  *  documentation for any purpose and without fee is hereby granted,
   67  *  provided that the above copyright notice appear in all copies and that
   68  *  both that copyright notice and this permission notice appear in
   69  *  supporting documentation, and that the name of Bull Worldwide
   70  *  Information Systems not be used in advertising or publicity pertaining
   71  *  to distribution of the software without specific, written prior
   72  *  permission.  Bull makes no representations about the suitability of
   73  *  this software for any purpose.  It is provided "as is" without express
   74  *  or implied warranty.
   75  *
   76  *  BULL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
   77  *  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
   78  *  SHALL BULL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
   79  *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
   80  *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
   81  *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
   82  *  SOFTWARE.
   83  *
   84  *  Adaptation to SYSV: James Tsillas
   85  *                      March, 1991
   86  *
   87  *****************************************************************************
   88  *
   89  *	Note that this software uses some files which are 
   90  *  Copyright (C) 1985 Free Software Foundation, Inc.
   91  *	See copyright header in regex.c and regex.h.
   92  *
   93  *****************************************************************************/
   94 
   95 Please send XDBX comments and bug reports to:
   96 
   97     Po Cheung
   98     cheung@sw.mcc.com	
   99     Microelectronics and Computer Technology Corporation
  100       -- or --
  101     po@cerc.utexas.edu 	
  102     University of Texas at Austin
  103 
  104 Please send XXGDB comments and bug reports to:
  105 
  106 	Pierre Willard
  107 	pierre@eng.sun.com
  108 	Thomson Consumer Electronics, Inc.
  109 
  110 XXGDB version 1.12
  111 ------------------
  112 
  113 	>> SEE ALSO XDBX DOCUMENTATION <<
  114 	>> SEE ALSO xxgdb.man DOCUMENTATION <<
  115 	
  116 	XXGDB is a X window interface to the GDB debugger.
  117 	
  118 	GDB must be accessible in the current path.
  119 	
  120 	xxgdb should run gdb 4.x (as well as the older versions).
  121 	
  122 	This X window interface has been adapted to GDB from the source
  123 	distribution files of XDBX version 2.1 (patch level 2) which
  124 	implements an X window interface to the DBX debugger.
  125 	
  126 	See the XDBX_README file for more information on XDBX.
  127 	
  128 	XXGDB has been originally tested on Sparc workstation running Solaris
  129 	It should also run on SUN OS.
  130 	
  131 	To build, xxgdb, first build the makefile by using 'xmkmf' or other
  132 	shell script using 'imake'.
  133 	
  134     Also, any System V should be able to build by setting the -DSYSV flag.
  135     SCO Unix also requires the -Dsco flag. Bull DPX/2 [23]00 requires the
  136     -Dncl_mr flag as well as -DSYSV. Some systems may also need to set
  137     -DUSG to use the GNU malloc instead of the native one. The GNU malloc
  138     works much quicker and is much more reliable. SCO Unix requires GNU
  139     malloc to work correctly. GNU malloc is not provided here, you should
  140     get malloc.c and getpagesize.h from the source of gdb.
  141 
  142     Also note that if building on SCO you must also link with -lsocket
  143     and if building on DPX/2 you must also link with -linet. You will need
  144     the R4 release of X11 for both.
  145 
  146 	- When compiled with -DCREATE_IO_WINDOW, xxgdb will use a separate io
  147 	window to talk to gdb, so program output is not confused with gdb output.
  148 	This is not the default. Link with -lsocket is necessary in that case.
  149 	Type command 'iowin' to create io window. Also the program xxgdbiowin 
  150 	has to be compiled because it is used for this io window.
  151 
  152 	- When compiled with -DNEW_INTERFACE -DOPEN_ALL_WINDOWS, xxgdb uses
  153 	a new interface with 4 different X windows for the source, the commands,
  154 	the buttons and the display window. See README.NEW_INTERFACE and
  155 	XDbx.NEW_INTERFACE.
  156 
  157 	- When linking on SunOS 4.1, it could happen that you get the
  158 	following error when linking :
  159 	 	ld: Undefined symbol
  160  	   		_get_wmShellWidgetClass
  161  	  		_get_applicationShellWidgetClass
  162 	It is a dynamic linking problem. I am not sure why it happens.
  163 	Anyway, you can either do a static link (gcc -static), or just
  164 	set the execution bit, and the program will run.
  165 
  166 	- XXGDB changes the GDB default 'set prettyprint' to ON (or 'set
  167 	p pretty' if gdb 4.0). This is necessary to be able to display
  168 	the pointed object when clicking a pointer value in a popup window
  169 	(see also 'Displaying C Data Structures' in xdbx documentation).
  170 	Except for this feature, xxgdb works with 'set prettyprint off'.
  171 	
  172 	- XXGDB changes the GDB default 'set screensize' to 0 (or 
  173 	'set height' and 'set width' to 0 if gdb 4.0).
  174 
  175 	- XXGDB changes the GDB default 'set confirm' to off (if gdb 4.0).
  176 	THIS IS IMPORTANT. DO NOT SET CONFIRM TO OFF OR XXGDB MIGHT HANG. 
  177 
  178 	- With the 'list' command, XXGDB will put the cursor at the last 
  179 	listed line and will make sure that this last line is visible
  180 	in the source window.
  181 	
  182 	- The file button will execute 'core-file <filename>' if the file
  183 	is named 'core', 'list <filename>:1' if the file is not executable
  184 	and 'exec-file <filename> symbol-file <filename> if the file
  185 	is executable. Executable files are displayed with a trailing '*'
  186 	character.
  187 	
  188 	- For systems which do not have the ANSI strstr function in their
  189 	library, one is included in gdb_parser.c and is compiled if NEED_STRSTR
  190 	is defined.
  191 	
  192 	- if you define UNDISPWIN when compiling, then the display window
  193 	will disappear when there is nothing to display.
  194 	(eg, add -DUNDISPWIN in DEFGDB definition in Imakefile).
  195 	See display_info_handler function in gdb_handler.c
  196 	
  197 	- Copy the application default file (XDbx.ad) into your home
  198 	directory or into the X '/usr/lib/X11/app-defaults' directory
  199 	(without the .ad suffix) (eg, 'cp -p XDbx.ad ~/XDbx').
  200 	
  201 	- The name of the debugger called by xxgdb is by default 'gdb'.
  202 	It can be overridden with the environment variable XXGDB_DEBUGGER.
  203 	WARNING : by default prompt is the name of the debugger enclosed in
  204 	parenthesis followed by a space. So if the prompt is still "(gdb) ",
  205 	you HAVE TO use -db_prompt "gdb"
  206 	
  207 	- DO NOT modify the gdb prompt (using the 'set prompt' command).
  208 	XXGDB assumes that the gdb prompt is 'gdb' or the XXGDB_DEBUGGER
  209 	environment variable if defined.
  210 	
  211 	There are new application resources and command line args:
  212    	 - db_name can be used to specify the name of the debugger to
  213      override the default "gdb" (instead of using an env. variable).
  214      - db_prompt can be used to specify to xgdb the string to be used by
  215      the debugger as a prompt.  The default is to expect the prompt
  216      used by the debugger to be the name of the debugger enclosed in
  217      parenthesis.  This is no good for gdbvx, which expects a prompt
  218      of (gdb).
  219    	 - i can be used the name of the command file automatically
  220 	 loaded by gdb. The default is ".gdbinit" file.
  221 
  222 
  223 	To build xxgdb, 'Imakefile' defines :
  224 	
  225 #define TARGET_IS_GDB 1
  226 
  227 
  228 XXGDB version BUG LIST
  229 ----------------------
  230 
  231 This version of XXGDB is pretty much working. 
  232 The following bugs will probably be fixed in future versions.
  233 
  234 	- 'define' command of GDB is not completely supported by xxgdb
  235 		because xxgdb does not interpret what the defined commands
  236 		do.
  237 		
  238 	- 'set confirm off' might hang xxgdb later on.
  239 	
  240 	- 'source' command of XXGDB behaves slighlty differently from 
  241 	the one in GDB. The specified file is read line by line by xxgdb
  242 	and each line is sent to gdb. Thus gdb will ask confirmation of
  243 	some commands (except for gdb 4.0 because of 'set confirm off'
  244 	used by xxgdb).
  245 	This is also the case for the execution of the '.gdbinit' file.
  246 	
  247 	- Repeat command of XXGDB behaves slighlty differently from the one
  248 	in GDB.
  249 
  250 	- '~' character in filename is not expanded by xxgdb.
  251 
  252 FAQ
  253 ---
  254 Why do ^M characters appear at the end of each line ?
  255 
  256 	This is because the terminal settings are WRONG. The possible
  257 	reason is that xxgdb was compiled with gcc and NON ANSI include
  258 	files. Solution : run 'fixincludes' of gcc and/or check the '-I'
  259 	options. In particular, on Sun, make sure you do not have
  260 	/usr/include in the include path.
  261 
  262 
  263 SunOS 5.3:
  264 ----------
  265 Compile with :
  266 	gcc -O -I/usr/openwin/include -DSYSV -DSVR4 -DSUNOS4 -DGDB -DCREATE_IO_WINDOW
  267 Link with :
  268 	-lXaw -lXmu -lXt -lXext -lX11 -lm -lsocket
  269 
  270 
  271 SunOS 4.1:
  272 ----------
  273 Compile with :
  274 	gcc -O -I/usr/openwin/include -DGDB -DCREATE_IO_WINDOW
  275 Link with :
  276 	-lXaw -lXmu -lXt -lXext -lX11 -lm -static
  277 
  278 
  279 AIX 2.3 (RS6000):
  280 -----------------
  281 Compile with :
  282 	xlc -qlanglvl=ansi -I/usr/openwin/include -DSYSV -D_POSIX_SOURCE -D_ALL_SOURCE -DREAD_ZERO_NOT_EOF -DBSD=45 -DGDB -g 
  283 Link with :
  284 	-L/usr/openwin/lib/R5 -lXaw -lXmu -lXt -lXext -lX11 -lm -lc
  285 
  286 
  287 XXGDB history
  288 -------------
  289 	
  290 	1.0		December 1990.
  291 	1.01	January 1991 (posted to comp.sources.x news group)
  292 				Fix bug with display command (when displaying structures).
  293 				Fix bug with undisplay command (display window went blank).
  294 				Add XXGDB no warranty message at start-up.
  295 	1.02	February 1991.
  296 				Add source files selection in file button.
  297 				Special test for core file in file button.
  298 				Fix bug includeDir resource.
  299 				Fix bug source file directories.
  300 				Add patches for SUN-OS3.
  301 				Add strstr function in gdb_parser.c (with #ifdef NEED_STRSTR)
  302 				Remove bad test for MIPS and BSD in case of GDB.
  303 	1.03	April 1991
  304 				Miscellaneous patches for lint.
  305 				Port to SYSV + SCO +SYSV32.
  306 				Fix bug up/down/frame when arguments are on several lines.
  307 				Fix bug in UpdateMessageWindow when arguments are too long.
  308 				Fix bug define commands in .gdbinit or source files
  309 				Add db_name and db_prompt option (GWC)
  310 	1.04	May 1991
  311 				display command print all error messages (if any).
  312 				fix bug display C structures.
  313 				several patches for more generic BSD machines (JBL)
  314 				patches for NeXT because some GDB incompatibilities.
  315 				display gdb messages when executing list command.
  316 				fix problem scrolling symbols while scrolling with keys (GWC).
  317 				fix bug displaying arrow when up/down in recursive function.
  318 	1.05	July - September 1991
  319 				Fix bug in search window.
  320 				Update for gdb 4.0 (PW)(SH).
  321 	1.06	October 1991
  322 				Fix bug in creating more than 16 popup windows.
  323 				Edit defs.h for X11R5.
  324 				Remove xxgdb start-up error message with no file specified.
  325 				Fix bug display arrays.
  326 				Port to SysVr4 and miscellaneous improvements (MJH)
  327 				Fix bug for directories in filemenu (Norbert Kiesel)
  328 				Fix bug pointers in arrays in popup windows.
  329 				Add option -nx for xxgdb.
  330 				Color for scrollbar is black in resource file.	
  331 				Fix pb when no image file is loaded at startup (Tom Pavel)
  332 	1.07	February 1992
  333 				Fix problem xxgdb for NeXT because of test for gdb-4.0.
  334 				Fix 'info break' problem with gdb 4.5 (Ken Mandelberg)
  335 				New buttons and misc. improvements (Amir J. Katz)(AJK)
  336 	1.08	November 1993
  337 				Update for gdb 4.11.
  338 				Cleanup + Alpha port + NEW_INTERFACE from Dean Michaels, TRLabs.
  339 	1.09	April 1994
  340 				New -gdbinit resource and command line option to specify init filename.
  341 				Fix problem 'Inappropriate ioctl for device' on Solaris.
  342 				Fix bugs displaying C++ structures (Klamer).
  343 				Use reliable signals on SYSV (Iand).
  344 				Fix problem compiling with 'cc'.
  345 	1.10	August 1994
  346 				Cleanup calldbx.c (svalente@MIT.EDU)
  347 				Add fix for Modula-2 (Norbert Kiesel)
  348 				Fix bug command too long for fputs.
  349 				Port to RS6000 (AIX 2.3 rs6000)
  350 				Add configurable tab widths (Matt Day <mday@artisoft.com>)
  351 	1.11	March 1995
  352 				Misc. updates.
  353 	1.12	November 1995
  354 			Do not define signal for linux in signals.c (schweikh@ito.uni-stuttgart.de)
  355 			In global.h define alloca only in certain cases.
  356 			Test for MAXPATHLEN already defined (in global.h)
  357 			Update Imakefile for different architectures (Philippe.Defert@cern.ch)
  358 			Update for NeXT (doug@foxtrot.ccmrc.ucsb.edu)
  359 			Update for gdb-4.14 : different address format when step/next/up/down.
  360 
  361 	
  362 				--------------------------
  363