/*****************************************************************************
 *
 *  xdbx - X Window System interface to the dbx debugger
 *
 *  Copyright 1989 The University of Texas at Austin
 *  Copyright 1990 Microelectronics and Computer Technology Corporation
 *
 *  Permission to use, copy, modify, and distribute this software and its
 *  documentation for any purpose and without fee is hereby granted,
 *  provided that the above copyright notice appear in all copies and that
 *  both that copyright notice and this permission notice appear in
 *  supporting documentation, and that the name of The University of Texas
 *  and Microelectronics and Computer Technology Corporation (MCC) not be 
 *  used in advertising or publicity pertaining to distribution of
 *  the software without specific, written prior permission.  The
 *  University of Texas and MCC makes no representations about the 
 *  suitability of this software for any purpose.  It is provided "as is" 
 *  without express or implied warranty.
 *
 *  THE UNIVERSITY OF TEXAS AND MCC DISCLAIMS ALL WARRANTIES WITH REGARD TO
 *  THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
 *  FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF TEXAS OR MCC BE LIABLE FOR
 *  ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
 *  RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
 *  CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 *  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 *
 *  Author:  	Po Cheung
 *  Created:   	March 10, 1989
 * 
 *****************************************************************************
 * 
 *  xxgdb - X Window System interface to the gdb debugger
 *  
 * 	Copyright 1990 Thomson Consumer Electronics, Inc.
 *  
 *  Permission to use, copy, modify, and distribute this software and its
 *  documentation for any purpose and without fee is hereby granted,
 *  provided that the above copyright notice appear in all copies and that
 *  both that copyright notice and this permission notice appear in
 *  supporting documentation, and that the name of Thomson Consumer
 *  Electronics (TCE) not be used in advertising or publicity pertaining
 *  to distribution of the software without specific, written prior
 *  permission.  TCE makes no representations about the suitability of
 *  this software for any purpose.  It is provided "as is" without express
 *  or implied warranty.
 *
 *  TCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 *  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
 *  SHALL TCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
 *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
 *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
 *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 *  SOFTWARE.
 *
 *  Adaptation to GDB:  Pierre Willard
 *  XXGDB Created:   	December, 1990
 *
 *****************************************************************************
 *
 *  Modifications for use under System V
 *
 *      Copyright 1990 Bull Worldwide Information Systems, Inc.
 *
 *  Permission to use, copy, modify, and distribute this software and its
 *  documentation for any purpose and without fee is hereby granted,
 *  provided that the above copyright notice appear in all copies and that
 *  both that copyright notice and this permission notice appear in
 *  supporting documentation, and that the name of Bull Worldwide
 *  Information Systems not be used in advertising or publicity pertaining
 *  to distribution of the software without specific, written prior
 *  permission.  Bull makes no representations about the suitability of
 *  this software for any purpose.  It is provided "as is" without express
 *  or implied warranty.
 *
 *  BULL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 *  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
 *  SHALL BULL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
 *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
 *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
 *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 *  SOFTWARE.
 *
 *  Adaptation to SYSV: James Tsillas
 *                      March, 1991
 *
 *****************************************************************************
 *
 *	Note that this software uses some files which are 
 *  Copyright (C) 1985 Free Software Foundation, Inc.
 *	See copyright header in regex.c and regex.h.
 *
 *****************************************************************************/

Please send XDBX comments and bug reports to:

    Po Cheung
    cheung@sw.mcc.com	
    Microelectronics and Computer Technology Corporation
      -- or --
    po@cerc.utexas.edu 	
    University of Texas at Austin

Please send XXGDB comments and bug reports to:

	Pierre Willard
	pierre@la.tce.com
	Thomson Consumer Electronics, Inc.

XXGDB version 1.06
------------------

	>> SEE ALSO XDBX DOCUMENTATION <<
	>> SEE ALSO xxgdb.man DOCUMENTATION <<
	
	XXGDB is a X window interface to the GDB debugger.
	
	GDB must be accessible in the current path.
	
	xxgdb should run the new gdb 4.0 (as well as the older versions).
	
	This X window interface has been adapted to GDB from the source
	distribution files of XDBX version 2.1 (patch level 2) which
	implements an X window interface to the DBX debugger.
	
	See the XDBX_README file for more information on XDBX.
	
	XXGDB has been originally tested on SUN 4 running OS 4.1.
	It should also run on SUN OS3.
	
    Also, any System V should be able to build by setting the -DSYSV flag.
    SCO Unix also requires the -Dsco flag. Bull DPX/2 [23]00 requires the
    -Dncl_mr flag as well as -DSYSV. Some systems may also need to set
    -DUSG to use the GNU malloc instead of the native one. The GNU malloc
    works much quicker and is much more reliable. SCO Unix requires GNU
    malloc to work correctly. GNU malloc is not provided here, you should
    get malloc.c and getpagesize.h from the source of gdb.

    Also note that if building on SCO you must also link with -lsocket
    and if building on DPX/2 you must also link with -linet. You will need
    the R4 release of X11 for both.
			
	- XXGDB changes the GDB default 'set prettyprint' to ON (or 'set
	p pretty' if gdb 4.0). This is necessary to be able to display
	the pointed object when clicking a pointer value in a popup window
	(see also 'Displaying C Data Structures' in xdbx documentation).
	Except for this feature, xxgdb works with 'set prettyprint off'.
	
	- XXGDB changes the GDB default 'set screensize' to 0 (or 
	'set height' and 'set width' to 0 if gdb 4.0).

	- XXGDB changes the GDB default 'set confirm' to off (if gdb 4.0).
	THIS IS IMPORTANT. DO NOT SET CONFIRM TO OFF OR XXGDB MIGHT HANG. 

	- With the 'list' command, XXGDB will put the cursor at the last 
	listed line and will make sure that this last line is visible
	in the source window.
	
	- The file button will execute 'core-file <filename>' if the file
	is named 'core', 'list <filename>:1' if the file is not executable
	and 'exec-file <filename> symbol-file <filename> if the file
	is executable. Executable files are displayed with a trailing '*'
	character.
	
	- For systems which do not have the ANSI strstr function in their
	library, one is included in gdb_parser.c and is compiled if NEED_STRSTR
	is defined.
	
	- if you define UNDISPWIN when compiling, then the display window
	will disappear when there is nothing to display.
	(eg, add -DUNDISPWIN in DEFGDB definition in Imakefile).
	See display_info_handler function in gdb_handler.c
	
	- Copy the application default file (XDbx.ad) into your home
	directory or into the X '/usr/lib/X11/app-defaults' directory
	(eg, 'cp -p XDbx.ad ~/XDbx').
	
	- The name of the debugger called by xxgdb is by default 'gdb'.
	It can be overridden with the environment variable XXGDB_DEBUGGER.
	
	- DO NOT modify the gdb prompt (using the 'set prompt' command).
	XXGDB assumes that the gdb prompt is 'gdb' or the XXGDB_DEBUGGER
	environment variable if defined.
	
	There are two new application resources and command line args:
   	 - db_name can be used to specify the name of the debugger to
     override the default "gdb" (instead of using an env. variable).
     - db_prompt can be used to specify to xgdb the string to be used by
     the debugger as a prompt.  The default is to expect the prompt
     used by the debugger to be the name of the debugger enclosed in
     parenthesis.   This is no good for gdbvx, which expects a prompt
     of (gdb).


	To build xxgdb, 'Imakefile' defines :
	
#define TARGET_IS_GDB 1


XXGDB version BUG LIST
----------------------

This version of XXGDB is pretty much working. 
The following bugs will probably be fixed in future versions.

	- 'define' command of GDB is not completely supported by xxgdb
		because xxgdb does not interpret what the defined commands
		do.
		
	- 'set confirm off' might hang xxgdb later on.
	
	- 'source' command of XXGDB behaves slighlty differently from 
	the one in GDB. The specified file is read line by line by xxgdb
	and each line is sent to gdb. Thus gdb will ask confirmation of
	some commands (except for gdb 4.0 because of 'set confirm off'
	used by xxgdb).
	This is also the case for the execution of the '.gdbinit' file.
	
	- Repeat command of XXGDB behaves slighlty differently from the one
	in GDB.



XXGDB history
-------------
	
	1.0		December 1990.
	1.01	January 1991 (posted to comp.sources.x news group)
				Fix bug with display command (when displaying structures).
				Fix bug with undisplay command (display window went blank).
				Add XXGDB no warranty message at start-up.
	1.02	February 1991.
				Add source files selection in file button.
				Special test for core file in file button.
				Fix bug includeDir resource.
				Fix bug source file directories.
				Add patches for SUN-OS3.
				Add strstr function in gdb_parser.c (with #ifdef NEED_STRSTR)
				Remove bad test for MIPS and BSD in case of GDB.
	1.03	April 1991
				Miscellaneous patches for lint.
				Port to SYSV + SCO +SYSV32.
				Fix bug up/down/frame when arguments are on several lines.
				Fix bug in UpdateMessageWindow when arguments are too long.
				Fix bug define commands in .gdbinit or source files
				Add db_name and db_prompt option (GWC)
	1.04	May 1991
				display command print all error messages (if any).
				fix bug display C structures.
				several patches for more generic BSD machines (JBL)
				patches for NeXT because some GDB incompatibilities.
				display gdb messages when executing list command.
				fix problem scrolling symbols while scrolling with keys (GWC).
				fix bug displaying arrow when up/down in recursive function.
	1.05	July - September 1991
				Fix bug in search window.
				Update for gdb 4.0 (PW)(SH).
	1.06	October 1991
				Fix bug in creating more than 16 popup windows.
				Edit defs.h for X11R5.
				Remove xxgdb start-up error message with no file specified.
				Fix bug display arrays.
				Port to SysVr4 and miscellaneous improvements (MJH)
				Fix bug for directories in filemenu (Norbert Kiesel)
				Fix bug pointers in arrays in popup windows.
				Add option -nx for xxgdb.
				Color for scrollbar is black in resource file.	
				Fix pb when no image file is loaded at startup (Tom Pavel)

Acknowledgement
---------------

	Thanks to Guy Cherry (GWC) for his numerous bug reports and
	suggestions, and to all of you who helped improve xxgdb.
	Thanks to j braham levy (JBL) for his modifications for
	generic BSD machines.
	Thanks to Stephan Heuer (SH) for some updates to gdb 4.0.
	Thanks to Mark J. Hewitt (MJH) for porting to SysVr4.

	
				--------------------------

