From 77a8995732352e5c16d0a2b9da61e8e4f448537c Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Thu, 6 Apr 1995 21:08:05 +0000 Subject: [PATCH] Initial Linux ELF support. --- gdb/ChangeLog | 16 ++++++++++++++++ gdb/configure.in | 21 ++++++++++++++++++++- gdb/gdbtk.c | 2 ++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d0cb66c5070..7d8f0e1f5ca 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,19 @@ +Thu Apr 6 17:00:46 1995 Michael Meissner + + * Makefile.in (X11_INCLUDES): Define as empty. + (X11_CFLAGS): Define as including $(X11_INCLUDES). + (X11_LIB_SWITCHES): Define as empty. + (X11_LIBS): Define as -lX11. + + * configure.in (enable_gdbtk): If gdbtk, support the --x-includes + and --x-libraries switches, setting the X11_INCLUDES and + X11_LIB_SWITCHES respectively. Instead of using a hardcoded -lX11 + in ENABLE_CLIBS, use the X11_LIB_SWITCHES and X11_LIBS variables. + + * gdbtk.c (gdbtk_init): If SIOCSPGRP is not available, don't use + it. This means that the stop button doesn't work, but is better + than nothing. + Wed Apr 5 19:57:38 1995 Jim Kingdon (kingdon@lioth.cygnus.com) * mips-tdep.c (mips_print_register): Remove unused variable diff --git a/gdb/configure.in b/gdb/configure.in index c2fc4ba10a1..52cebd8ba66 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -437,11 +437,30 @@ fi # start-sanitize-gdbtk if [ "${enable_gdbtk}" = "yes" ] ; then + if [ x"${other_options}" != x"" ]; then + for opt in $other_options; do + case "$opt" in + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + X11_INCLUDES=`echo "$opt" | sed 's/[-_a-zA-Z0-9]*=//'` + sed -e "s;^\\(X11_INCLUDES[ ]*=\\).*\$;\\1 -I${X11_INCLUDES};" \ + < Makefile > Makefile.tem + mv -f Makefile.tem Makefile;; + + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + X11_LIB_SWITCHES=`echo "$opt" | sed 's/[-_a-zA-Z0-9]*=//'` + sed -e "s;^\\(X11_LIB_SWITCHES[ ]*=\\).*\$;\\1 -L${X11_LIB_SWITCHES};" \ + < Makefile > Makefile.tem + mv -f Makefile.tem Makefile;; + esac + done + fi sed -e '/# End of host and/i\ \ ENABLE_GDBTK = 1\ ENABLE_DEPFILES = gdbtk.o\ -ENABLE_CLIBS = $(TCL) $(TK) -lX11 -lm +ENABLE_CLIBS = $(TCL) $(TK) $(X11_LIB_SWITCHES) $(X11_LIBS) -lm ' < Makefile > Makefile.tem mv -f Makefile.tem Makefile fi diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c index fd4aeed4968..f3d820495e8 100644 --- a/gdb/gdbtk.c +++ b/gdb/gdbtk.c @@ -1117,9 +1117,11 @@ gdbtk_init () if (ioctl (x_fd, FIOASYNC, &i)) perror_with_name ("gdbtk_init: ioctl FIOASYNC failed"); +#ifdef SIOCSPGRP i = getpid(); if (ioctl (x_fd, SIOCSPGRP, &i)) perror_with_name ("gdbtk_init: ioctl SIOCSPGRP failed"); +#endif #else if (ioctl (x_fd, I_SETSIG, S_INPUT|S_RDNORM) < 0) perror_with_name ("gdbtk_init: ioctl I_SETSIG failed"); -- 2.30.2