INSTALLED_LIBS=-lbfd -lreadline $(TERMCAP) -lopcodes -lmmalloc \
-liberty $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(ENABLE_CLIBS)
CLIBS = $(BFD) $(READLINE) $(OPCODES) $(MMALLOC) \
- $(LIBIBERTY) $(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) \
- $(ENABLE_CLIBS)
+ $(ENABLE_CLIBS) $(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) \
+ $(LIBIBERTY)
CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(BFD) $(READLINE) $(OPCODES) \
$(MMALLOC) $(LIBIBERTY)
@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
uninstall: force
- rm -f $(bindir)/gdb $(man1dir)/gdb.1
+ transformed_name=`t='$(program_transform_name)'; \
+ echo gdb | sed -e "s/brokensed/brokensed/" $$t` ; \
+ if test "x$$transformed_name" = x; then \
+ transformed_name=gdb ; \
+ else \
+ true ; \
+ fi ; \
+ rm -f $(bindir)/$$transformed_name $(man1dir)/$$transformed_name.1
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
# We do this by grepping through sources. If that turns out to be too slow,
## with no dependencies and no actions.
unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
-# These are things from config/*/*.m? fragments. There is no good reason
-# why they are separate from the lists of files above.
-
-HPREAD_SOURCE=
-# start-sanitize-hpread
-HPREAD_SOURCE=hpread.c
-# end-sanitize-hpread
-
ALLDEPFILES = 29k-share/udi/udip2soc.c 29k-share/udi/udr.c \
29k-share/udi/udi2go32.c \
a29k-pinsn.c a29k-tdep.c a68v-nat.c alpha-nat.c alpha-tdep.c \
delta68-nat.c dpx2-nat.c dstread.c exec.c fork-child.c \
go32-xdep.c gould-pinsn.c gould-xdep.c h8300-tdep.c h8500-tdep.c \
hp300ux-nat.c hppa-pinsn.c hppa-tdep.c hppab-nat.c hppah-nat.c \
+ hpread.c \
i386-pinsn.c i386-tdep.c i386b-nat.c i386mach-nat.c i386v-nat.c \
i386aix-nat.c i386m3-nat.c i386v4-nat.c i386ly-tdep.c \
i387-tdep.c \
somsolib.o: somsolib.c $(defs_h)
-# start-sanitize-hpread
hpread.o: hpread.c $(bfd_h) buildsym.h complaints.h $(defs_h) \
gdb-stabs.h objfiles.h symfile.h $(symtab_h)
-# end-sanitize-hpread
parse.o: parse.c $(command_h) $(defs_h) $(expression_h) $(frame_h) \
$(gdbtypes_h) language.h parser-defs.h $(symtab_h) $(value_h)
#include <unistd.h>
#include <setjmp.h>
#include "top.h"
-#ifndef FASYNC
+#include <sys/ioctl.h>
+#include <string.h>
+
+#ifndef FIOASYNC
#include <sys/stropts.h>
#endif
-#include <string.h>
/* Non-zero means that we're doing the gdbtk interface. */
int gdbtk = 0;
int pid;
struct target_waitstatus *ourstatus;
{
-#ifdef FASYNC
- signal (SIGIO, x_event);
-#else
-#if 1
- sigset (SIGIO, x_event);
-#else
- /* This is possibly needed for SVR4... */
- {
- struct sigaction action;
- static sigset_t nullsigmask = {0};
-
- action.sa_handler = iosig;
- action.sa_mask = nullsigmask;
- action.sa_flags = SA_RESTART;
- sigaction(SIGIO, &action, NULL);
- }
-#endif
+ struct sigaction action;
+ static sigset_t nullsigmask = {0};
+
+#ifndef SA_RESTART
+ /* Needed for SunOS 4.1.x */
+#define SA_RESTART 0
#endif
+ action.sa_handler = x_event;
+ action.sa_mask = nullsigmask;
+ action.sa_flags = SA_RESTART;
+ sigaction(SIGIO, &action, NULL);
+
pid = target_wait (pid, ourstatus);
- signal (SIGIO, SIG_IGN);
+ action.sa_handler = SIG_IGN;
+ sigaction(SIGIO, &action, NULL);
return pid;
}
struct cleanup *old_chain;
char *gdbtk_filename;
int i;
+ struct sigaction action;
+ static sigset_t nullsigmask = {0};
old_chain = make_cleanup (cleanup_init, 0);
/* Setup for I/O interrupts */
- signal (SIGIO, SIG_IGN);
+ action.sa_mask = nullsigmask;
+ action.sa_flags = 0;
+ action.sa_handler = SIG_IGN;
+ sigaction(SIGIO, &action, NULL);
+
+#ifdef FIOASYNC
+ i = 1;
+ if (ioctl (x_fd, FIOASYNC, &i))
+ perror_with_name ("gdbtk_init: ioctl FIOASYNC failed");
-#ifdef FASYNC
- i = fcntl (x_fd, F_GETFL, 0);
- fcntl (x_fd, F_SETFL, i|FASYNC);
- fcntl (x_fd, F_SETOWN, getpid());
+ i = getpid();
+ if (ioctl (x_fd, SIOCSPGRP, &i))
+ perror_with_name ("gdbtk_init: ioctl SIOCSPGRP failed");
#else
if (ioctl (x_fd, I_SETSIG, S_INPUT|S_RDNORM) < 0)
- perror ("gdbtk_init: ioctl I_SETSIG failed");
-#endif /* ifndef FASYNC */
+ perror_with_name ("gdbtk_init: ioctl I_SETSIG failed");
+#endif /* ifndef FIOASYNC */
command_loop_hook = Tk_MainLoop;
fputs_unfiltered_hook = gdbtk_fputs;