Hello,

I am a member of this list!!!

I am running xfree86 on top of cygwin on a WindowsNT. I compile
a short program ( included below with make file ) and run it
in gdb:

        gdb -nowindows mtest0_bin.exe
        run

As soon as the window it creates appears, if I enter a Cntl-C
in the gdb window, the xserver dies.

Is there a way to break into gdb without killing the xserver?

Thanks,

David

THE PROGRAM:


/**************************************************************************
**
**************************************************************************/
#include <stdio.h>

#include <X11/Shell.h>
#include <Xm/Xm.h>
#include <Xm/Form.h>


int
main( int argc, char *argv[] )
{
        int wargc = 0;
        Widget form;
        Arg warg[10];
        Display *TheTopDisplay;
        Widget  TheTopShell;
        XtAppContext TheTopContext;

        TheTopShell
         = XtVaAppInitialize( &TheTopContext, "mtest0",
                                        NULL, 0, &argc, argv, NULL, NULL );
        TheTopDisplay = XtDisplay( TheTopShell );

        /* Create main form for application */
        XtSetArg( warg[wargc], XmNwidth,    50 ); wargc++;
        XtSetArg( warg[wargc], XmNheight,   50 ); wargc++;
        form
         = XtCreateManagedWidget("form",
                                 xmFormWidgetClass, TheTopShell, warg, wargc );
        XtRealizeWidget(TheTopShell);

        /* Main loop */
        XtAppMainLoop(TheTopContext);
}


MAKEFILE


X11=/usr/X11R6
MOTIF=/usr/X11R6/LessTif
CFLAGS=-g -I$(MOTIF)/include -I$(X11)/include 

# the name of the program to make
PROG=mtest0_bin

# the libraries needed for X and motif 
XLIBS = -L$(MOTIF)/lib -lXm -L$(X11)/lib -lXt -lX11

# add or delete libraries as needed
DBLIBS= -lm -lSM -lice

LIBDEP= $(DBLDEP)

LIBS=$(XLIBS) $(DBLIBS)

SRC=mtest0.c



OBJECTS=$(SRC:.c=.o)

all: $(PROG)

$(PROG): $(OBJECTS) $(LIBDEP)
        $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBS)

$(OBJECTS):

mtest0.o:       mtest0.ad \
                mtest0.c


_______________________________________________
Newbie mailing list
[EMAIL PROTECTED]
*** To unsubscribe , or change message options, see:
http://XFree86.Org/mailman/listinfo/newbie

Reply via email to