delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/02/11/15:05:45

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Mon, 11 Feb 2002 20:04:51 GMT
From: David <cupcake AT otaku DOT freeshell DOT org>
Message-Id: <200202112004.g1BK4pL29525@otaku.freeshell.org>
To: cygwin AT cygwin DOT com
Subject: gdb in xfree86: ^C

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019