Mail Archives: cygwin/2002/02/11/15:05:45
Hello,
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?
I submitted this to newbie AT xfree86 but didn't get any answers.
I'm hoping someone who is familiar with gdb might be able to
help me.
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.c
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -