[comp.sources.x] REPOST: v11i052: xxgdb - X front end for gdb, Part05/08

pierre@tce.COM (Pierre Willard) (03/07/91)

Submitted-by: pierre@tce.COM (Pierre Willard)
Posting-number: Volume 11, Issue 52
Archive-name: xxgdb/part05



#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 3 (of 8)."
# Contents:  dialog.c regex.h signs.c xdbx.man
# Wrapped by gilbert@phi on Tue Jan 15 13:12:47 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'dialog.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'dialog.c'\"
else
echo shar: Extracting \"'dialog.c'\" \(11941 characters\)
sed "s/^X//" >'dialog.c' <<'END_OF_FILE'
X/*****************************************************************************
X *
X *  xdbx - X Window System interface to the dbx debugger
X *
X *  Copyright 1989 The University of Texas at Austin
X *  Copyright 1990 Microelectronics and Computer Technology Corporation
X *
X *  Permission to use, copy, modify, and distribute this software and its
X *  documentation for any purpose and without fee is hereby granted,
X *  provided that the above copyright notice appear in all copies and that
X *  both that copyright notice and this permission notice appear in
X *  supporting documentation, and that the name of The University of Texas
X *  and Microelectronics and Computer Technology Corporation (MCC) not be 
X *  used in advertising or publicity pertaining to distribution of
X *  the software without specific, written prior permission.  The
X *  University of Texas and MCC makes no representations about the 
X *  suitability of this software for any purpose.  It is provided "as is" 
X *  without express or implied warranty.
X *
X *  THE UNIVERSITY OF TEXAS AND MCC DISCLAIMS ALL WARRANTIES WITH REGARD TO
X *  THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
X *  FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF TEXAS OR MCC BE LIABLE FOR
X *  ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
X *  RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
X *  CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
X *  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
X *
X *  Author:  	Po Cheung
X *  Created:   	March 10, 1989
X * 
X *****************************************************************************
X * 
X *  xxgdb - X Window System interface to the gdb debugger
X *  
X * 	Copyright 1990 Thomson Consumer Electronics, Inc.
X *  
X *  Permission to use, copy, modify, and distribute this software and its
X *  documentation for any purpose and without fee is hereby granted,
X *  provided that the above copyright notice appear in all copies and that
X *  both that copyright notice and this permission notice appear in
X *  supporting documentation, and that the name of Thomson Consumer
X *  Electronics (TCE) not be used in advertising or publicity pertaining
X *  to distribution of the software without specific, written prior
X *  permission.  TCE makes no representations about the suitability of
X *  this software for any purpose.  It is provided "as is" without express
X *  or implied warranty.
X *
X *  TCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
X *  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
X *  SHALL TCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
X *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
X *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
X *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
X *  SOFTWARE.
X *
X *  Adaptation to GDB:  Pierre Willard
X *  XXGDB Created:   	December, 1990
X *
X *****************************************************************************/
X
X/*  dialog.c
X *
X *    Create the dialogue window where the user enter dbx commands, and
X *    provide action procs to make a text widget behave like a terminal.
X *
X *    InsertSpace():	Prevent user from deleting past the prompt (action proc
X *			for DELETE or BACKSPACE).
X *    DeleteWord():	Word delete in dialog window. (action proc for Ctrl-w).
X *    DeleteLine():	Line delete in dialog window. (action proc for Ctrl-u).
X *    Dispatch():	Send an input command line to dbx. (action proc for CR).
X *    SigInt():		Send SIGINT to dbx (action proc for Ctrl-C).
X *    SigEof():		Send an EOF signal to dbx (action proc for Ctrl-D).
X *    SigQuit():	Send SIGQUIT to dbx (action proc for Ctrl-\).
X *    CreateDialogWindow(): Create dialog window and install action table.
X *    AppendDialogText():       Append string to dialog window.
X */
X
X#include <signal.h>
X#include "global.h"
X
X#define	DIALOGSIZE	100000		/* max size of dialogue window buffer */
X
XWidget	dialogWindow;			/* text window as a dbx terminal */
XBoolean FalseSignal = FALSE;		/* set to TRUE before self-generated
X					   interrupt/quit signals */
Xstatic char DialogText[DIALOGSIZE];	/* text buffer for widget */
Xstatic XawTextPosition  StartPos;      	/* starting position of input text */
X
X
X/*  This procedure prevents the user from deleting past the prompt, or
X *  any text appended by AppendDialogText() to the dialog window.
X *  It checks the last position of text, if it matches StartPos, set
X *  by AppendDialogText(), it inserts a space so that delete-previous-
X *  character() can only delete the space character.
X */
X/* ARGSUSED */
Xstatic void InsertSpace(w, event, params, num_params)
X    Widget w;
X    XEvent *event;
X    String *params;
X    Cardinal *num_params;
X{
X    XawTextBlock    textblock;
X    XawTextPosition lastPos;
X
X    if (XawTextGetInsertionPoint(w) <= StartPos) {
X    	lastPos = TextGetLastPos(w);
X	if (lastPos == StartPos) {
X	    textblock.firstPos = 0;
X	    textblock.length   = 1;
X	    textblock.ptr      = " ";
X	    XawTextReplace(w, lastPos, lastPos, &textblock);
X	    XawTextSetInsertionPoint(w, lastPos+1);
X	}
X    }
X}
X
X/*  Erases the preceding word.
X *  Simulates the action of the WERASE character (ctrl-W).
X */
X/* ARGSUSED */
Xvoid DeleteWord(w, event, params, num_params)
X    Widget w;
X    XEvent *event;
X    String *params;
X    Cardinal *num_params;
X{
X    XawTextBlock    	textblock;
X    XawTextPosition	pos;
X    Cardinal	 	i;
X
X    textblock.firstPos = 0;
X    textblock.length   = 0;
X    textblock.ptr      = "";
X
X    pos = XawTextGetInsertionPoint(w); 
X    if (pos <= StartPos)
X        pos = TextGetLastPos(w); 
X    for (i=pos; i > StartPos && DialogText[i-1] == ' '; i--);
X    for (; i > StartPos && DialogText[i-1] != ' '; i--);
X    XawTextReplace(w, i, pos, &textblock);
X    XawTextSetInsertionPoint(w, i);
X}
X
X
X/*  Deletes the entire current input line.
X *  simulates the action of the KILL character (ctrl-U).
X */
X/* ARGSUSED */
Xvoid DeleteLine(w, event, params, num_params)
X    Widget w;
X    XEvent *event;
X    String *params;
X    Cardinal *num_params;
X{
X    XawTextBlock    	textblock;
X    XawTextPosition 	pos, beginPos;
X    Cardinal	 	i;
X    char		*s;
X
X    textblock.firstPos = 0;
X    textblock.length   = 0;
X    textblock.ptr      = "";
X
X    pos = XawTextGetInsertionPoint(w); 
X    if (w == dialogWindow) {
X	s = DialogText;
X	beginPos = StartPos;
X	if (pos <= beginPos)
X    	    pos = TextGetLastPos(w);
X    }
X    for (i=pos; i > beginPos && s[i-1] != '\n'; i--);
X    XawTextReplace(w, i, pos, &textblock);
X    XawTextSetInsertionPoint(w, i);
X}
X
X
X/*  Dispatch() is invoked on every <CR>.
X *  It collects text from the dialog window and sends it to dbx.
X *  If the string is a command to dbx (Prompt would be TRUE),
X *  it is stored in the global variable, Command.
X */
X/* ARGSUSED */
Xstatic void Dispatch(w, event, params, num_params)
X    Widget w;
X    XEvent *event;
X    String *params;
X    Cardinal *num_params; 
X{
X#ifdef GDB
X	/* 
X	For GDB, '\n' means exec previous command again.
X	default command is space+CR, so that we never send
X	CR to gdb (the repeat is managed here)
X	*/
X    static char gdb_command[LINESIZ] = " \n";
X#endif
X    char s[LINESIZ];
X
X    strcpy(s, DialogText + StartPos);
X#if 1
X	/* (PW)18DEC90 : bug xdbx : without the following line,
X	xdbx sends several times the same lines when Prompt is false */
X    StartPos = TextGetLastPos(dialogWindow);
X#endif
X
X    if (Prompt) {
X#ifdef GDB
X	if (gdb_source_command(s,FALSE))	/* filter source command (& do not display source command) */
X		{
X		strcpy(gdb_command," \n");	/* do not execute anything if next command is '\n' */
X		return;
X		}
X	/* When we send \n to gdb, it executes the last command,
X	so better tell xxgdb what gdb is doing */
X    if (strcmp(s, "\n"))
X		strcpy(gdb_command,s);
X    else
X		strcpy(s,gdb_command);
X#endif /* GDB */
X	send_command(s);
X    }
X    else {
X    	write_dbx(s);
X    }
X}
X
X
X/*  Sends an interrupt signal, SIGINT, to dbx.
X *  Simulates the action of the INTR character (ctrl-C).
X */
X/* ARGSUSED */
Xstatic void SigInt(w, event, params, num_params)
X    Widget w;
X    XEvent *event;
X    String *params;
X    Cardinal *num_params;
X{
X    FalseSignal = TRUE;
X    killpg(dbxpid, SIGINT);
X}
X
X
X/*  Sends an EOF signal to dbx. (ctrl-D) */
X/* ARGSUSED */
Xstatic void SigEof(w, event, params, num_params)
X    Widget w;
X    XEvent *event;
X    String *params;
X    Cardinal *num_params;
X{
X    write_dbx("\04");
X}
X
X
X/*  Sends a QUIT signal, SIGQUIT, to dbx. 
X *  Simulates the action of the QUIT character (ctrl-\) 
X */
X/* ARGSUSED */
Xstatic void SigQuit(w, event, params, num_params)
X    Widget w;
X    XEvent *event;
X    String *params;
X    Cardinal *num_params;
X{
X    FalseSignal = TRUE;
X    killpg(dbxpid, SIGQUIT);
X}
X
X
X/* 
X *  Dialog window has its own set of translations for editing.
X *  Special action procedures for keys Delete/Backspace, Carriage Return,
X *  Ctrl-U, Ctrl-C, Ctrl-D, Ctrl-\, and word selection.
X */
Xvoid CreateDialogWindow(parent)
XWidget parent;
X{
X    Arg 	args[MAXARGS];
X    Cardinal 	n;
X
X    static XtActionsRec dialog_actions[] = {
X	{"SigInt", 	(XtActionProc) SigInt},
X	{"SigEof", 	(XtActionProc) SigEof},
X	{"SigQuit", 	(XtActionProc) SigQuit},
X	{"InsertSpace", (XtActionProc) InsertSpace},
X	{"Dispatch", 	(XtActionProc) Dispatch},
X        {NULL, NULL}
X    };
X
X    static String translations = "#override\n\
X 	Ctrl<Key>C:	SigInt()\n\
X 	Ctrl<Key>D:	SigEof()\n\
X 	Ctrl<Key>|:	SigQuit()\n\
X 	Ctrl<Key>W:	DeleteWord()\n\
X 	Ctrl<Key>U:	DeleteLine()\n\
X 	Ctrl<Key>H:	InsertSpace() delete-previous-character()\n\
X 	<Key>Delete:	InsertSpace() delete-previous-character()\n\
X 	<Key>BackSpace:	InsertSpace() delete-previous-character()\n\
X 	<Key>Return:	newline() Dispatch()\n\
X    ";
X
X    n = 0;
X    XtSetArg(args[n], XtNuseStringInPlace, True);                       n++;
X    XtSetArg(args[n], XtNstring, (XtArgVal) DialogText);		n++;
X    XtSetArg(args[n], XtNlength, (XtArgVal) DIALOGSIZE);		n++;
X    XtSetArg(args[n], XtNeditType, (XtArgVal) XawtextAppend);		n++;
X    XtSetArg(args[n], XtNscrollVertical, XawtextScrollAlways);		n++;
X    XtSetArg(args[n], XtNwrap, XawtextWrapWord);			n++;
X    dialogWindow = XtCreateManagedWidget("dialogWindow", asciiTextWidgetClass,
X					 parent, args, n );
X    XtOverrideTranslations(dialogWindow, XtParseTranslationTable(translations));
X    XtAppAddActions(app_context, dialog_actions, XtNumber(dialog_actions));
X}
X
Xstatic void TextSetLastPos(w, lastPos)
XWidget w;
XXawTextPosition lastPos;
X{
X    TextWidget ctx = (TextWidget) w;
X    ctx->text.lastPos = lastPos;
X}
X 
Xvoid AppendDialogText(s)
X    char   *s;
X{
X    XawTextPosition     i, lastPos;
X    XawTextBlock        textblock, nullblock;
X    Arg 		args[MAXARGS];
X    Cardinal 		n;
X
X    if (!s || !strcmp(s, "")) return;
X
X    textblock.firstPos = 0;
X    textblock.length   = strlen(s);
X    textblock.ptr      = s;
X
X    lastPos = TextGetLastPos(dialogWindow);
X    if (textblock.length > DIALOGSIZE) {
X	bell(0);
X#ifdef GDB
X	fprintf(stderr, "xxgdb error: cannot display string in dialogue window\n\
X            string has %d bytes; dialogue window size limit is %d bytes\n",
X	    textblock.length, DIALOGSIZE);
X#else
X	fprintf(stderr, "xdbx error: cannot display string in dialogue window\n\
X            string has %d bytes; dialogue window size limit is %d bytes\n",
X	    textblock.length, DIALOGSIZE);
X#endif
X        return;
X    }
X    if (lastPos + textblock.length > DIALOGSIZE) {
X	nullblock.firstPos = 0;
X	nullblock.length = 0;
X	nullblock.ptr = "";
X
X	i = textblock.length - (DIALOGSIZE - lastPos);
X	if (i < 0.9*DIALOGSIZE)
X	    i += 0.1*DIALOGSIZE;
X        while (DialogText[i] != '\n') i++;
X        XawTextReplace(dialogWindow, 0, i+1, &nullblock);
X    	lastPos = TextGetLastPos(dialogWindow);
X    }
X    XawTextReplace(dialogWindow, lastPos, lastPos, &textblock);
X    StartPos = TextGetLastPos(dialogWindow);
X    XawTextSetInsertionPoint(dialogWindow, StartPos);
X}
END_OF_FILE
if test 11941 -ne `wc -c <'dialog.c'`; then
    echo shar: \"'dialog.c'\" unpacked with wrong size!
fi
# end of 'dialog.c'
fi
if test -f 'regex.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'regex.h'\"
else
echo shar: Extracting \"'regex.h'\" \(10832 characters\)
sed "s/^X//" >'regex.h' <<'END_OF_FILE'
X/* Definitions for data structures callers pass the regex library.
X   Copyright (C) 1985 Free Software Foundation, Inc.
X
X		       NO WARRANTY
X
X  BECAUSE THIS PROGRAM IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY
XNO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW.  EXCEPT
XWHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC,
XRICHARD M. STALLMAN AND/OR OTHER PARTIES PROVIDE THIS PROGRAM "AS IS"
XWITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
XBUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
XFITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY
XAND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE
XDEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
XCORRECTION.
X
X IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M.
XSTALLMAN, THE FREE SOFTWARE FOUNDATION, INC., AND/OR ANY OTHER PARTY
XWHO MAY MODIFY AND REDISTRIBUTE THIS PROGRAM AS PERMITTED BELOW, BE
XLIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR
XOTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
XUSE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR
XDATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR
XA FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) THIS
XPROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
XDAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.
X
X		GENERAL PUBLIC LICENSE TO COPY
X
X  1. You may copy and distribute verbatim copies of this source file
Xas you receive it, in any medium, provided that you conspicuously and
Xappropriately publish on each copy a valid copyright notice "Copyright
X(C) 1985 Free Software Foundation, Inc."; and include following the
Xcopyright notice a verbatim copy of the above disclaimer of warranty
Xand of this License.  You may charge a distribution fee for the
Xphysical act of transferring a copy.
X
X  2. You may modify your copy or copies of this source file or
Xany portion of it, and copy and distribute such modifications under
Xthe terms of Paragraph 1 above, provided that you also do the following:
X
X    a) cause the modified files to carry prominent notices stating
X    that you changed the files and the date of any change; and
X
X    b) cause the whole of any work that you distribute or publish,
X    that in whole or in part contains or is a derivative of this
X    program or any part thereof, to be licensed at no charge to all
X    third parties on terms identical to those contained in this
X    License Agreement (except that you may choose to grant more extensive
X    warranty protection to some or all third parties, at your option).
X
X    c) You may charge a distribution fee for the physical act of
X    transferring a copy, and you may at your option offer warranty
X    protection in exchange for a fee.
X
XMere aggregation of another unrelated program with this program (or its
Xderivative) on a volume of a storage or distribution medium does not bring
Xthe other program under the scope of these terms.
X
X  3. You may copy and distribute this program (or a portion or derivative
Xof it, under Paragraph 2) in object code or executable form under the terms
Xof Paragraphs 1 and 2 above provided that you also do one of the following:
X
X    a) accompany it with the complete corresponding machine-readable
X    source code, which must be distributed under the terms of
X    Paragraphs 1 and 2 above; or,
X
X    b) accompany it with a written offer, valid for at least three
X    years, to give any third party free (except for a nominal
X    shipping charge) a complete machine-readable copy of the
X    corresponding source code, to be distributed under the terms of
X    Paragraphs 1 and 2 above; or,
X
X    c) accompany it with the information you received as to where the
X    corresponding source code may be obtained.  (This alternative is
X    allowed only for noncommercial distribution and only if you
X    received the program in object code or executable form alone.)
X
XFor an executable file, complete source code means all the source code for
Xall modules it contains; but, as a special exception, it need not include
Xsource code for modules which are standard libraries that accompany the
Xoperating system on which the executable file runs.
X
X  4. You may not copy, sublicense, distribute or transfer this program
Xexcept as expressly provided under this License Agreement.  Any attempt
Xotherwise to copy, sublicense, distribute or transfer this program is void and
Xyour rights to use the program under this License agreement shall be
Xautomatically terminated.  However, parties who have received computer
Xsoftware programs from you with this License Agreement will not have
Xtheir licenses terminated so long as such parties remain in full compliance.
X
X  5. If you wish to incorporate parts of this program into other free
Xprograms whose distribution conditions are different, write to the Free
XSoftware Foundation at 675 Mass Ave, Cambridge, MA 02139.  We have not yet
Xworked out a simple rule that can be stated here, but we will often permit
Xthis.  We will be guided by the two goals of preserving the free status of
Xall derivatives of our free software and of promoting the sharing and reuse of
Xsoftware.
X
X
XIn other words, you are welcome to use, share and improve this program.
XYou are forbidden to forbid anyone else to use, share and improve
Xwhat you give them.   Help stamp out software-hoarding!  */
X
X
X#ifndef RE_NREGS
X#define RE_NREGS 10
X#endif
X
X/* This data structure is used to represent a compiled pattern. */
X
Xstruct re_pattern_buffer
X  {
X    char *buffer;	/* Space holding the compiled pattern commands. */
X    int allocated;	/* Size of space that  buffer  points to */
X    int used;		/* Length of portion of buffer actually occupied */
X    char *fastmap;	/* Pointer to fastmap, if any, or zero if none. */
X			/* re_search uses the fastmap, if there is one,
X			   to skip quickly over totally implausible characters */
X    char *translate;	/* Translate table to apply to all characters 
X                           before comparing.
X			   Or zero for no translation.
X			   The translation is applied to a pattern when it is compiled
X			   and to data when it is matched. */
X    char fastmap_accurate;
X			/* Set to zero when a new pattern is stored,
X			   set to one when the fastmap is updated from it. */
X    char can_be_null;   /* Set to one by compiling fastmap
X			   if this pattern might match the null string.
X			   It does not necessarily match the null string
X			   in that case, but if this is zero, it cannot.
X			   2 as value means can match null string
X			   but at end of range or before a character
X			   listed in the fastmap.  */
X  };
X
X/* Structure to store "register" contents data in.
X
X   Pass the address of such a structure as an argument to re_match, etc.,
X   if you want this information back.
X
X   start[i] and end[i] record the string matched by \( ... \) grouping i,
X   for i from 1 to RE_NREGS - 1.
X   start[0] and end[0] record the entire string matched. */
X
Xstruct re_registers
X  {
X    int start[RE_NREGS];
X    int end[RE_NREGS];
X  };
X
X/* These are the command codes that appear in compiled regular expressions, 
X  one per byte.
X  Some command codes are followed by argument bytes.
X  A command code can specify any interpretation whatever for its arguments.
X  Zero-bytes may appear in the compiled regular expression. */
X
Xenum regexpcode
X  {
X    unused,
X    exactn,    /* followed by one byte giving n, and then by n literal bytes */
X    begline,   /* fails unless at beginning of line */
X    endline,   /* fails unless at end of line */
X    jump,	 /* followed by two bytes giving relative address to jump to */
X    on_failure_jump,	 /* followed by two bytes giving relative address of place
X		            to resume at in case of failure. */
X    finalize_jump,	 /* Throw away latest failure point and then 
X			    jump to address. */
X    maybe_finalize_jump, /* Like jump but finalize if safe to do so.
X			    This is used to jump back to the beginning
X			    of a repeat.  If the command that follows
X			    this jump is clearly incompatible with the
X			    one at the beginning of the repeat, such that
X			    we can be sure that there is no use backtracking
X			    out of repetitions already completed,
X			    then we finalize. */
X    dummy_failure_jump,  /* jump, and push a dummy failure point.
X			    This failure point will be thrown away
X			    if an attempt is made to use it for a failure.
X			    A + construct makes this before the first repeat.  */
X    anychar,	 /* matches any one character */
X    charset,     /* matches any one char belonging to specified set.
X		    First following byte is # bitmap bytes.
X		    Then come bytes for a bit-map saying which chars are in.
X		    Bits in each byte are ordered low-bit-first.
X		    A character is in the set if its bit is 1.
X		    A character too large to have a bit in the map
X		    is automatically not in the set */
X    charset_not, /* similar but match any character that is NOT one 
X                    of those specified */
X    start_memory, /* starts remembering the text that is matched
X		    and stores it in a memory register.
X		    followed by one byte containing the register number.
X		    Register numbers must be in the range 0 through NREGS. */
X    stop_memory, /* stops remembering the text that is matched
X		    and stores it in a memory register.
X		    followed by one byte containing the register number.
X		    Register numbers must be in the range 0 through NREGS. */
X    duplicate,    /* match a duplicate of something remembered.
X		    Followed by one byte containing the index of the memory register. */
X    before_dot,	 /* Succeeds if before dot */
X    at_dot,	 /* Succeeds if at dot */
X    after_dot,	 /* Succeeds if after dot */
X    begbuf,      /* Succeeds if at beginning of buffer */
X    endbuf,      /* Succeeds if at end of buffer */
X    wordchar,    /* Matches any word-constituent character */
X    notwordchar, /* Matches any char that is not a word-constituent */
X    wordbeg,	 /* Succeeds if at word beginning */
X    wordend,	 /* Succeeds if at word end */
X    wordbound,   /* Succeeds if at a word boundary */
X    notwordbound, /* Succeeds if not at a word boundary */
X    syntaxspec,  /* Matches any character whose syntax is specified.
X		    followed by a byte which contains a syntax code, Sword 
X	            or such like */
X    notsyntaxspec /* Matches any character whose syntax differs from 
X                     the specified. */
X  };
X
Xextern char *re_compile_pattern ();
X/* Is this really advertised? */
Xextern void re_compile_fastmap ();
Xextern int re_search (), re_search_2 ();
Xextern int re_match (), re_match_2 ();
X
X/* 4.2 bsd compatibility (yuck) */
Xextern char *re_comp ();
Xextern int re_exec ();
X
X#ifdef SYNTAX_TABLE
Xextern char *re_syntax_table;
X#endif
END_OF_FILE
if test 10832 -ne `wc -c <'regex.h'`; then
    echo shar: \"'regex.h'\" unpacked with wrong size!
fi
# end of 'regex.h'
fi
if test -f 'signs.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'signs.c'\"
else
echo shar: Extracting \"'signs.c'\" \(11423 characters\)
sed "s/^X//" >'signs.c' <<'END_OF_FILE'
X/*****************************************************************************
X *
X *  xdbx - X Window System interface to the dbx debugger
X *
X *  Copyright 1989 The University of Texas at Austin
X *  Copyright 1990 Microelectronics and Computer Technology Corporation
X *
X *  Permission to use, copy, modify, and distribute this software and its
X *  documentation for any purpose and without fee is hereby granted,
X *  provided that the above copyright notice appear in all copies and that
X *  both that copyright notice and this permission notice appear in
X *  supporting documentation, and that the name of The University of Texas
X *  and Microelectronics and Computer Technology Corporation (MCC) not be 
X *  used in advertising or publicity pertaining to distribution of
X *  the software without specific, written prior permission.  The
X *  University of Texas and MCC makes no representations about the 
X *  suitability of this software for any purpose.  It is provided "as is" 
X *  without express or implied warranty.
X *
X *  THE UNIVERSITY OF TEXAS AND MCC DISCLAIMS ALL WARRANTIES WITH REGARD TO
X *  THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
X *  FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF TEXAS OR MCC BE LIABLE FOR
X *  ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
X *  RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
X *  CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
X *  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
X *
X *  Author:  	Po Cheung
X *  Created:   	March 10, 1989
X *
X *****************************************************************************/
X
X/*  signs.c
X *
X *  This file contains all the routines for the creation and manipulation of 
X *  symbols used in xdbx.  There are 3 different signs:
X *    arrow  - a solid right arrow to indicate the current execution point.
X *    updown - an outlined right arrow to indicate position in stack trace.
X *    stop   - a stop hand symbol to indicate a breakpoint is set.
X *    bomb  - a bomb symbol to indicate the point of segmentation fault.
X *
X *  To display a sign on a given line in the source window, it is first
X *  created and mapped.  To undisplay it, the sign is unmapped.  It can
X *  be mapped again when the sign is needed.  Note that the sign is never
X *  moved, so that there can be as many signs created (but not mapped) as
X *  the number of lines in the source window.
X *  For arrow and updown, there can be at most one of each mapped at a time.
X *  For stop, there can be more than one mapped at the same time.
X */
X
X#include "global.h"
X#include "bitmaps.h"
X
X#define MAXSTOPS        256             /* max number of stops */
X#define MAXSIGNS        256             /* max number of signs */
X#define OFFSET	        2             	/* offset for displaying signs */
X
Xtypedef struct {
X    Widget      w;
X    Boolean     mapped;
X} ArrowSign;
X
Xtypedef struct {
X    Widget      w;
X    Boolean     mapped;
X} UpdownSign;
X
Xtypedef struct {
X    Widget      w;
X    Boolean     mapped;
X} StopSign;
X
Xtypedef struct {
X    Widget      w;
X    Boolean     mapped;
X} BombSign;
X
Xstatic ArrowSign 	arrowsign[MAXSIGNS];
Xstatic UpdownSign 	updownsign[MAXSIGNS];
Xstatic StopSign		stopsign[MAXSIGNS];
Xstatic BombSign 	bombsign[MAXSIGNS];
X
XArrow 		arrow;
XUpdown 		updown;
XStops		stops[MAXSTOPS];	/* array of stops */
XBomb 		bomb;
XCardinal	nstops;			/* number of stops */
X
X/* Initialize data structures */
X
Xvoid signs_init()
X{
X    int i;
X
X    for (i=0; i<MAXSIGNS; i++) {
X	arrowsign[i].w = NULL;
X	arrowsign[i].mapped = FALSE;
X    }
X    for (i=0; i<MAXSIGNS; i++) {
X	stopsign[i].w = NULL;
X	stopsign[i].mapped = FALSE;
X    }
X    arrow.i = 0;
X    arrow.line = 0;
X    strcpy(arrow.file, "");
X    updown.i = 0;
X    updown.line = 0;
X    strcpy(updown.file, "");
X    nstops = 0;
X    bomb.i = 0;
X    bomb.line = 0;
X    strcpy(bomb.file, "");
X}
X
X
X/*  Create an arrow symbol, updown symbol or stop symbol:
X *    calculate the position of the symbol based on i, the number of lines
X *    from the top line.
X *    create the pixmap of the symbol
X *    display the symbol as a bitmap in a label widget.
X */
Xstatic Widget CreateSign(parent, sign, i)
X    Widget	parent;
X    char	*sign;
X    Cardinal 	i;
X{
X    TextWidget 	ctx = (TextWidget) sourceWindow;
X    Arg 	args[15];
X    Cardinal 	n;
X    Dimension 	source_height, height, width; 
X    char	*bits;
X    Pixel       fg, bg;
X    int 	horizDistance, vertDistance, height_per_line;
X    int         screen;
X    Dimension	vbar_width = 0;
X    Dimension	border_width = 0;
X
X    if (displayedFile == NULL) return NULL;
X
X    /* Get height and background pixel values of parent window */
X    n = 0;
X    XtSetArg(args[n], XtNheight, &source_height);			n++;
X    XtSetArg(args[n], XtNbackground, &bg);				n++;
X    XtGetValues(parent, args, n);
X
X    height_per_line = source_height/displayedFile->lines;
X    vertDistance = OFFSET + (i * height_per_line); 
X
X    screen = DefaultScreen(display);
X
X    if (sign && !strcmp(sign, "arrow")) {
X	bits = arrow_bits;
X	width = arrow_width;
X	height = arrow_height;
X	horizDistance = 0;
X	fg = app_resources.arrow_color;
X    }
X    else if (sign && !strcmp(sign, "updown")) {
X	bits = updown_bits;
X	width = updown_width;
X	height = updown_height;
X	horizDistance = 0;
X	fg = app_resources.updown_color;
X    }
X    else if (sign && !strcmp(sign, "stop")) {
X	bits = stop_bits;
X	width = stop_width;
X	height = stop_height;
X	horizDistance = arrow_width;
X	fg = app_resources.stop_color;
X    }
X    else if (sign && !strcmp(sign, "bomb")) {
X	bits = bomb_bits;
X	width = bomb_width;
X	height = bomb_height;
X	horizDistance = 0;
X	fg = app_resources.bomb_color;
X    };
X
X    if( ctx->text.vbar != NULL )
X    {
X	    n = 0;
X	    XtSetArg(args[n], XtNwidth, &vbar_width); 			n++;
X	    XtSetArg(args[n], XtNborderWidth, &border_width);		n++;
X	    XtGetValues(ctx->text.vbar, args, n);
X	    vbar_width += (border_width * 2);
X    }
X    
X    n = 0;
X    XtSetArg(args[n], XtNborderWidth, 0);				n++;
X    XtSetArg(args[n], XtNwidth, (XtArgVal) width);			n++;
X    XtSetArg(args[n], XtNheight, (XtArgVal) height);			n++;
X    XtSetArg(args[n], XtNresize, (XtArgVal) False);			n++;
X    XtSetArg(args[n], XtNmappedWhenManaged, (XtArgVal) False);		n++;
X    XtSetArg(args[n], XtNbitmap, XCreatePixmapFromBitmapData (
X        display, DefaultRootWindow(display), bits, width, height,
X        fg, bg, DefaultDepth(display, screen)));			n++;
X
X    XtSetArg(args[n], XtNfromVert, (XtArgVal) NULL);			n++;
X    XtSetArg(args[n], XtNfromHoriz, (XtArgVal) NULL);			n++;
X    XtSetArg(args[n], XtNhorizDistance, (XtArgVal) horizDistance+vbar_width);
X									n++;
X    XtSetArg(args[n], XtNvertDistance, (XtArgVal) vertDistance);	n++;
X    XtSetArg(args[n], XtNtop, (XtArgVal) XawChainTop);			n++;
X    XtSetArg(args[n], XtNleft, (XtArgVal) XawChainLeft);		n++;
X    XtSetArg(args[n], XtNbottom, (XtArgVal) XawChainTop);		n++;
X    XtSetArg(args[n], XtNright, (XtArgVal) XawChainLeft);		n++;
X
X    return XtCreateManagedWidget(sign, labelWidgetClass, parent, args, n);
X}
X
X/*
X *  Given a line number, displays a stop sign if that line is viewable.
X *  If the stop widget for that line does not exist, create one and map it.
X *  If the stop widget exists but not mapped, map it.
X */
Xvoid DisplayStop(file, line)
XFileRec *file;
Xint	line;
X{
X    Cardinal i;
X
X    if (line >= file->topline && line <= file->bottomline) {
X	i = line - file->topline;
X	if (stopsign[i].w == NULL) {	/* widget does not exist */
X	    stopsign[i].w = CreateSign(sourceForm, "stop", i);
X	    XtMapWidget(stopsign[i].w);
X	    stopsign[i].mapped = 1;
X	}
X	else if (!stopsign[i].mapped) { /* widget not mapped */
X	    XtMapWidget(stopsign[i].w);
X	    stopsign[i].mapped = 1;
X	}
X    }
X}
X
X/*
X *  Unmap all stop signs and then display only those stops that are viewable.
X */
Xvoid UpdateStops(file)
XFileRec *file;
X{
X    Cardinal i;
X    int	 line;
X
X    if (file == NULL) return;
X    for (i=0; i<file->lines; i++)
X	if (stopsign[i].w && stopsign[i].mapped) {
X	    XtUnmapWidget(stopsign[i].w);
X	    stopsign[i].mapped = 0;
X	}
X
X    for (i=1; i<=nstops; i++)
X	if (stops[i].file && !strcmp(stops[i].file, file->pathname) &&
X	    (line=stops[i].line) && line >= file->topline &&
X	    line <= file->bottomline) {
X	    DisplayStop(file, line);
X	}
X}
X
X/*
X * Given a line number, unmap the stop sign associated with that line.
X */
Xvoid RemoveStop(line)
Xint line;
X{
X    Cardinal i;
X
X    if (displayedFile && line >= displayedFile->topline && 
X			 line <= displayedFile->bottomline) {
X	i = line - displayedFile->topline;
X	if (stopsign[i].w && stopsign[i].mapped) {
X	    XtUnmapWidget(stopsign[i].w);
X	    stopsign[i].mapped = 0;
X	}
X    }
X}
X
Xvoid ClearStops()
X{
X    int i;
X
X    for (i=1; i<=nstops; i++) {
X	stops[i].file = NULL;
X	stops[i].line = 0;
X    }
X}
X
X/*  Unmap the current arrow sign.
X *  Display a new arrow sign if it is viewable.
X */
Xvoid UpdateArrow(file)
XFileRec *file;
X{
X    Cardinal i;
X    int	     line;
X
X    if (file == NULL) return;
X    i = arrow.i;
X    if (i>=0 && i<file->lines)
X	if (arrowsign[i].w && arrowsign[i].mapped) {
X	    XtUnmapWidget(arrowsign[i].w);
X	    arrowsign[i].mapped = 0;
X	}
X    line = arrow.line;
X    if (arrow.file && !strcmp(arrow.file, file->pathname) &&
X    	line >= file->topline && line <= file->bottomline) {
X        i = line - file->topline;
X	arrow.i = i;
X	if (arrowsign[i].w == NULL) {
X	    arrowsign[i].w = CreateSign(sourceForm, "arrow", i);
X	    XtMapWidget(arrowsign[i].w);
X	    arrowsign[i].mapped = TRUE;
X	}
X	else if (!arrowsign[i].mapped) {
X	    XtMapWidget(arrowsign[i].w);
X	    arrowsign[i].mapped = TRUE;
X	}
X    }
X}
X
X
X/*  If the new updown is on the same line as the arrow, remove the updown.
X *  Unmap current updown sign.
X *  Display the updown if it is viewable.
X */
Xvoid UpdateUpdown(file)
XFileRec *file;
X{
X    Cardinal i;
X    int	     line;
X
X    if (file == NULL) return;
X    if (updown.file && !strcmp(updown.file, arrow.file) && 
X	!strcmp(updown.func, arrow.func)) {
X	updown.line = 0;
X	strcpy(updown.file, "");
X    }
X    i = updown.i;
X    if (i>=0 && i<file->lines)
X	if (updownsign[i].w && updownsign[i].mapped) {
X	    XtUnmapWidget(updownsign[i].w);
X	    updownsign[i].mapped = 0;
X	}
X    line = updown.line;
X    if (updown.file && !strcmp(updown.file, file->pathname) &&
X    	line >= file->topline && line <= file->bottomline) {
X        i = line - file->topline;
X	updown.i = i;
X	if (updownsign[i].w == NULL) {
X	    updownsign[i].w = CreateSign(sourceForm, "updown", i);
X	    XtMapWidget(updownsign[i].w);
X	    updownsign[i].mapped = TRUE;
X	}
X	else if (!updownsign[i].mapped) {
X	    XtMapWidget(updownsign[i].w);
X	    updownsign[i].mapped = TRUE;
X	}
X    }
X}
X
X/*  Unmap the current bomb sign, if any.
X *  Display a new bomb sign.
X */
Xvoid UpdateBomb(file)
XFileRec *file;
X{
X    Cardinal i;
X    int	     line;
X
X    if (file == NULL) return;
X    i = bomb.i;
X    if (i>=0 && i<file->lines)
X	if (bombsign[i].w && bombsign[i].mapped) {
X	    XtUnmapWidget(bombsign[i].w);
X	    bombsign[i].mapped = 0;
X	}
X    line = bomb.line;
X    if (bomb.file && !strcmp(bomb.file, file->pathname) &&
X    	line >= file->topline && line <= file->bottomline) {
X        i = line - file->topline;
X	bomb.i = i;
X	if (bombsign[i].w == NULL) {
X	    bombsign[i].w = CreateSign(sourceForm, "bomb", i);
X	    XtMapWidget(bombsign[i].w);
X	    bombsign[i].mapped = TRUE;
X	}
X	else if (!bombsign[i].mapped) {
X	    XtMapWidget(bombsign[i].w);
X	    bombsign[i].mapped = TRUE;
X	}
X    }
X}
END_OF_FILE
if test 11423 -ne `wc -c <'signs.c'`; then
    echo shar: \"'signs.c'\" unpacked with wrong size!
fi
# end of 'signs.c'
fi
if test -f 'xdbx.man' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xdbx.man'\"
else
echo shar: Extracting \"'xdbx.man'\" \(10825 characters\)
sed "s/^X//" >'xdbx.man' <<'END_OF_FILE'
X.TH XDBX 1 "July 25 1990" "X Version 11"
X.SH NAME
Xxdbx \- X window system interface to the dbx debugger.
X.SH SYNOPSIS
X.B xdbx
X[ \fI-toolkitoption ... \fP] [\fI-xdbxoption ... \fP] [\fI-dbxoption ... \fP] [\fIobjfile\fP 
X[ \fIcorefile\fP ]]
X.SH DESCRIPTION
X\fIXdbx\fP is a graphical user interface to the \fIdbx\fP debugger under the
XX Window System.  It provides visual feedback and mouse input for the
Xuser to control program execution through breakpoints, to examine and
Xtraverse the function call stack, to display values of
Xvariables and data structures, and to browse source files and functions.
X.LP
X\fIXdbx\fP allows initial dbx commands stored in the file \fI.dbxinit\fP 
Xto be executed immediately after the symbolic information is 
Xread.  If \fI.dbxinit\fP does not exist in the current directory, the 
Xuser's home directory is searched (\fI~/.dbxinit\fP).
X.LP
X\fIObjfile\fP is an object file produced by a compiler with the
Xappropriate option (-g) specified to produce symbol table
Xinformation for dbx.  For Sun dbx, if no \fIobjfile\fP is specified,
Xthe \fBdebug\fP command can be used later to specify the program to be
Xdebugged.
X.LP
XIf a file named \fIcore\fP exists in the current directory or a
X\fIcorefile\fP is specified, \fIxdbx\fP can be used to examine the
Xstate of the program when the core dump occurred.
X.LP
XThe name of the debugger invoked by \fIxdbx\fP is, by default, dbx, but
Xit can be overridden with the environment variable DEBUGGER.
X.SH OPTIONS
X\fIXdbx\fP accepts all of the standard X Toolkit command line options 
X(see \fIX\fP(1)), and all the dbx options (see \fIdbx\fP(1)), plus
Xthe following xdbx specific options:
X.IP -bigicon
XUses a 64x64 icon instead of the default 48x48 icon.
X.SH SUBWINDOWS
X\fIXdbx\fP consists of the following subwindows:
X.IP "File Window" 20
XDisplay the full pathname of the file displayed in the source window,
Xand the line number of the caret.
X.IP "Source Window" 20
XDisplay the contents of a source file.
X.IP "Message Window" 20
XDisplay the execution status and error messages of \fIxdbx\fP .
X.IP "Command Window" 20
XProvide a list of the common dbx commands which are invoked by simply
Xclicking the LEFT mouse button.
X.IP "Dialogue Window" 20
XProvide a typing interface to dbx.
X.IP "Display Window" 20
XProvide a window for displaying variables each time execution stops.
X(Sun dbx only)
X.LP
XThe relative sizes of the source window, command window, and the dialogue
Xwindow can be adjusted by dragging the grip (a small square near the
Xright edge of a horizontal border) with the LEFT mouse button down.
X.SH SELECTION
XText selection in the source window is modified to make it easier to
Xselect C expressions.  LEFT mouse button down selects a C expression by
Xhighlighting it in reverse-video.  LEFT mouse button down also positions the
Xcaret and updates the line label accordingly.
X.LP
XC expression selection is based on the resource \fIdelimiters\fP which
Xdetermines the set of characters that delimits a C expression.  (The
Xdefault word selection behavior in the Athena text widget selects a
Xword delimited by white spaces.)  Text selection adjustment is possible
Xby holding the LEFT mouse button down and dragging.
X.LP
XA LEFT mouse button click with the SHIFT button down prints the value
Xof the expression selected.
X.LP
X.SH SCROLLBAR
XPressing the LEFT mouse button scrolls the text forward, whereas
Xpressing the RIGHT mouse button scrolls the text backward.  The amount
Xof scrolling depends on the distance of the pointer button away from
Xthe top of the scrollbar.  If the button is pressed at the top of the
Xscrollbar, only one line of text is scrolled.  If the button is pressed
Xat the bottom of the scrollbar, one screenful of text is scrolled.
X.LP
XPressing the MIDDLE mouse button changes the thumb position of the
Xscrollbar.  Dragging the MIDDLE mouse button down moves the thumb along
Xand changes the text displayed.
X.SH COMMAND BUTTONS
X.SS "Execution Commands"
X.IP "\fBrun\fP" 12
XBegin program execution.
X.IP "\fBcont\fP"
XContinue execution from where it stopped.
X.IP "\fBstep\fP"
XExecute one source line, stepping into a function if the source line
Xcontains a function call.
X.IP "\fBnext\fP"
XExecute one source line, without stepping into any function call.
X.IP "\fBreturn\fP"
X(Berkeley dbx only) Continue execution until the selected procedure
Xreturns; the current procedure is used if none is selected.
X
X.LP
X.SS "Breakpoint Commands"
X.IP "\fBstop at\fP" 10
XStop program execution at the line selected.  To set a breakpoint in
Xthe program, place the caret on the source line and click the \fBstop
Xat\fP button.  A stop sign will appear next to the source line.
X.IP "\fBstop in\fP"
XStop program execution in the function selected.  To set a breakpoint
Xin a function, select the function name and click the \fBstop in\fP
Xbutton.  A stop sign will be placed near the first executable line of
Xthe function.
X.IP "\fBdelete\fP"
XRemove the breakpoint on the source line selected or the breakpoint
Xnumber selected.
X.IP "\fBstatus\fP"
XShow the current breakpoints and traces.
X
X.LP
X.SS "Stack Commands"
X.IP "\fBwhere\fP" 10
XShow a stack trace of the functions called.
X.IP "\fBup\fP"
XMove up one level on the call stack.
X.IP "\fBdown\fP"
XMove down one level on the call stack.
X
X.LP
X.SS "Data Display Commands"
X.IP "\fBprint\fP" 10
XPrint the value of a selected expression.
X.IP "\fBprint *\fP"
XPrint the value of the object the selected expression is pointing to.
X.IP "\fBdisplay\fP"
XDisplay the value of a selected expression in the display window,
Xupdating its value every time execution stops. (Sun dbx only)
X.IP "\fBundisplay\fP"
XStop displaying the value of the selected expression in the display
Xwindow.  If the selected expression is a constant, it refers to the
Xdisplay number associated with an expression in the display window.
X(Sun dbx only)
X.IP "\fBdump\fP"
XPrint the names and values of local variables and parameters in the
Xcurrent or selected function.
X
X.LP
X.SS "Miscellaneous Commands"
X.IP "\fBfunc\fP"
XDisplay a selected function on the source window, and change the scope
Xfor variable name resolution to the selected function.  The file scope
Xis changed to the file containing the function.
X.IP "\fBfile\fP"
XPop up a directory browser that allows the user to move up and down
Xin the directory tree, to select a text file to be displayed, or (in
XSun dbx) to select an executable file to debug.  Directory entries are
Xmarked with a trailing slash (`/') and executables with a trailing
Xasterisk (`*').  Filenames beginning with a dot (`.') or ending with a
Xtilde (`~') are not listed in the menu.
X.IP "\fBsearch\fP"
XPop up a search panel which allows both forward (>>) and reverse (<<)
Xsearch of text strings in the source file.  Hitting carriage return
Xafter entering the search string will begin a forward search and pop
Xdown the search panel.
X.IP "\fBquit\fP"
XExit \fIxdbx\fP.
X
X.LP
X.SS "Displaying C Data Structures (Sun dbx only)"
X\fIXdbx\fP provides some primitive support for graphically displaying C
Xstructures and the ability of following pointers.  Pressing the RIGHT
Xmouse button on the \fBprint\fP (or \fBprint *\fP) command button
Xdisplays the value of the selected expression (or the value the
Xselected expression is pointing to) in a popup.  If the value is a
Xpointer or a structure containing pointers, the user can examine the
Xvalue of the object that pointer is pointing to by clicking the pointer
Xvalue.  This will create another popup that displays the object the
Xpointer points to.  Clicking the label of the popup pops down itself
Xand all of its descendants.
X.SH X DEFAULTS
XTo change the default values of widget resources used in \fIxdbx\fP,
Xyou need to reference the widgets by name or by class.  The widget
Xhierarchies for the main window, the file menu, the search dialog box,
Xand the popup data display used in xdbx are shown as follows, with the
Xname of the widget followed by the name of its class in parentheses:
X.nf
X
XMain window:
X    toplevel (ToplevelShell)
X      vpane (Paned)
X	fileWindow (Form)
X	  fileLabel (Label)
X	  lineLabel (Label)
X	sourceForm (Form)
X	  sourceWindow (AsciiText)
X	messageWindow (Label)
X	commandWindow (Box)
X	  run (Command)
X	  cont (Command)
X	  next (Command)
X	  return (Command)
X	  step (Command)
X	  stop at (Command)
X	  stop in (Command)
X	  delete (Command)
X	  where (Command)
X	  up (Command)
X	  down (Command)
X	  print (Command)
X	  print * (Command)
X	  func (Command)
X	  file (Command)
X	  status (Command)
X	  display (Command)
X	  undisplay (Command)
X	  dump (Command)
X	  search (Command)
X	  quit (Command)
X	dialogWindow (AsciiText)
X	displayWindow (AsciiText)
X   
XFile menu:
X    File Directory (TransientShell)
X      popup (Paned)
X	fileMenuLabel (Label)
X	fileMenu (List)
X	cancelButton (Command)
X
XSearch dialog box:
X    Search (TransientShell)
X      searchPopup (Dialog)
X	<< (Command)
X	>> (Command)
X	DONE (Command)
X
XData display popup:
X    Data Popup (TransientShell)
X      popup (Form)
X	label (Label)
X	dataDpyWindow (AsciiText)
X.LP
X.fi
XIn addition to the standard X resources, \fIxdbx\fP uses the following
Xapplication-specific resources for user customization.  The value in
Xparentheses is the default value.
X.IP \fBbell\fP
XIf True, the bell is on. (True)
X.IP \fBdisplayWindow\fP
XIf True, the display window appears on start up. (False)
X.IP \fBdelimiters\fP
XThe set of delimiters for word selection. (" !%^&*()+=~|;:{},/#<?\"\n\t")
X.IP \fBprompt\fP
XThe prompt string used in xdbx. ("(xdbx) ")
X.IP \fBstop_color\fP
XColor of the stop sign. (Red)
X.IP \fBarrow_color\fP
XColor of the arrow sign. (Blue)
X.IP \fBupdown_color\fP
XColor of the updown sign. (Blue)
X.IP \fBbomb_color\fP
XColor of the bomb sign. (Red)
X.IP \fBdataDpyMaxHeight\fP
XMaximum height of the data display window. (300)
X.IP \fBdataDpyMaxWidth\fP
XMaximum width of the data display window. (600)
X.LP
X
X.SH FILES
X.nf
Xa.out 		default object file
Xcore 		default core file
X\&.dbxinit 		local initial commands file
X~/.dbxinit 	user's initial commands file
X.SH SEE ALSO
XX(1), dbx(1)
X.SH LIMITATIONS
XXdbx does not handle all the dbx commands properly.  Only a subset of
Xthe commands is supported:
X.nf
X
X        run     stop at	   where   print   list   display     return
X        cont    stop in	   up      dump    /      undisplay
X        next    delete     down    func    ?
X        step    status     use     file    quit
X
X.SH BUGS
XSparc dbx does not always return correct source line position after
Xan up or down command.  Also, the file variable in sparc dbx sometimes
Xhas an extra slash, as in /file.c, which could break what normally works.  
XOne way of getting around the latter is to specify the current directory
Xbefore the program name, as in 'xdbx ./a.out' or 'debug ./a.out'.
X.SH COPYRIGHT
XCopyright 1989 The University of Texas at Austin
XCopyright 1990 Microelectronics and Computer Technology Corporation
X.SH AUTHOR
XPo Cheung
END_OF_FILE
if test 10825 -ne `wc -c <'xdbx.man'`; then
    echo shar: \"'xdbx.man'\" unpacked with wrong size!
fi
# end of 'xdbx.man'
fi
echo shar: End of archive 3 \(of 8\).
cp /dev/null ark3isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 8 archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0

--
Dan Heller
------------------------------------------------
O'Reilly && Associates		 Z-Code Software
Senior Writer			       President
argv@ora.com			argv@zipcode.com