* Makefile.in: Use $(objdir)/tcl and $(objdir)/tk if they are
authorStu Grossman <grossman@cygnus>
Wed, 2 Nov 1994 00:50:12 +0000 (00:50 +0000)
committerStu Grossman <grossman@cygnus>
Wed, 2 Nov 1994 00:50:12 +0000 (00:50 +0000)
available.
* configure.in (ENABLE_CLIBS):  Use $(TCL) and $(TK) instead of
-ltcl and -ltk.
* gdbtk.c:  Get rid of lots of unnecessary #includes.
* (gdbtk_init):  Use ConnectionNumber macro instead of referencing
Display structure directly.
* gdbtk.tcl:  Change exit button to quit button (makes shebs
happy).

gdb/ChangeLog
gdb/Makefile.in
gdb/configure.in
gdb/gdbtk.c
gdb/gdbtk.tcl

index 6b10dbe47db044b7b059e2217138e477f74480a2..a7f5f17674ef364b218eaeb5c53f2ecd821fd39e 100644 (file)
@@ -1,3 +1,15 @@
+Tue Nov  1 16:41:12 1994  Stu Grossman  (grossman@cygnus.com)
+
+       * Makefile.in:  Use $(objdir)/tcl and $(objdir)/tk if they are
+       available.
+       * configure.in (ENABLE_CLIBS):  Use $(TCL) and $(TK) instead of
+       -ltcl and -ltk.
+       * gdbtk.c:  Get rid of lots of unnecessary #includes.
+       * (gdbtk_init):  Use ConnectionNumber macro instead of referencing
+       Display structure directly.
+       * gdbtk.tcl:  Change exit button to quit button (makes shebs
+       happy).
+
 Tue Nov  1 13:00:46 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
 
        * c-valprint.c (c_value_print):  Check for plain literal `char'
index 2efb7e55a8ef5d53d1525c6ef077f4582d910a69..92b6a465d7380180b1bf8f9a21e35c2be6993688 100644 (file)
@@ -120,6 +120,18 @@ OPCODES = ../opcodes/libopcodes.a
 OP_INCLUDE = $(INCLUDE_DIR)/opcode
 OPCODES_CFLAGS = -I$(OP_INCLUDE)
 
+# Where is the TCL library?  Typically in ../tcl.
+TCL_DIR = ../tcl
+TCL = -L$(TCL_DIR) -ltcl
+TCL_SRC = $(srcdir)/$(TCL_DIR)
+TCL_CFLAGS = -I$(TCL_SRC)
+
+# Where is the TK library?  Typically in ../tk.
+TK_DIR = ../tk
+TK = -L$(TK_DIR) -ltk
+TK_SRC = $(srcdir)/$(TK_DIR)
+TK_CFLAGS = -I$(TK_SRC)
+
 # All the includes used for CFLAGS and for lint.
 # -I. for config files.
 # -I$(srcdir) for gdb internal headers and possibly for regex.h also.
@@ -1111,7 +1123,7 @@ fork-child.o: fork-child.c $(wait_h) $(defs_h) $(gdbcore_h) \
 
 gdbtk.o: gdbtk.c $(defs_h) $(symtab_h) $(inferior_h) $(command_h) \
        $(bfd_h) symfile.h objfiles.h target.h
-       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/gdbtk.c \
+       $(CC) -c $(INTERNAL_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(srcdir)/gdbtk.c \
                 -DGDBTK_FILENAME=\"$(libdir)/gdbtk.tcl\"
 
 gdbtypes.o: gdbtypes.c $(bfd_h) complaints.h $(defs_h) $(expression_h) \
index a07bf32f42998ce42c0fc24b232d25d4f44a8609..4f63e1af4d2b0716510e05dab7c71fe3a0772834 100644 (file)
@@ -417,7 +417,7 @@ if [ "${enable_gdbtk}" = "yes" ] ; then
        sed -e '/# End of host and/i\
 \
 ENABLE_DEPFILES = gdbtk.o\
-ENABLE_CLIBS = -ltcl -ltk -lX11 -lm
+ENABLE_CLIBS = $(TCL) $(TK) -lX11 -lm
 ' < Makefile > Makefile.tem
        mv -f Makefile.tem Makefile
 fi
index e93471ef42d4019d94165c1c7ad27d8a6bb961f9..eefac93e8a3564469124625f34e10a8063b26f19 100644 (file)
@@ -25,20 +25,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "symfile.h"
 #include "objfiles.h"
 #include "target.h"
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/param.h>
-#include <varargs.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/filio.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <sys/errno.h>
-#include <termios.h>
-#include <string.h>
 #include <tcl.h>
 #include <tk.h>
+#include <varargs.h>
+#include <signal.h>
+#include <fcntl.h>
 #include <unistd.h>
 
 /* Non-zero means that we're doing the gdbtk interface. */
@@ -514,10 +505,9 @@ gdbtk_init ()
   if (Tcl_EvalFile (interp, gdbtk_filename) != TCL_OK)
     error ("Failure reading %s: %s", gdbtk_filename, interp->result);
 
-  /* XXX - Get the file descriptor for the network socket.  This is not Kosher
-     as it involves looking at data private to Xlib.  */
+  /* Get the file descriptor for the X server */
 
-  x_fd = Tk_Display (mainWindow) -> fd;
+  x_fd = ConnectionNumber (Tk_Display (mainWindow));
 
   /* Setup for I/O interrupts */
 
index 08e7c4bc21b69b940601f33be1fea4355922c12d..bf5280bee557a083e83b5705e203e42ef00ffa67 100644 (file)
@@ -354,7 +354,7 @@ proc gdbtk_tcl_busy {} {
        .next configure -state disabled
        .continue configure -state disabled
        .finish configure -state disabled
-       .exit configure -state disabled
+       .quit configure -state disabled
        .up configure -state disabled
        .down configure -state disabled
        .bottom configure -state disabled
@@ -377,7 +377,7 @@ proc gdbtk_tcl_idle {} {
        .next configure -state normal
        .continue configure -state normal
        .finish configure -state normal
-       .exit configure -state normal
+       .quit configure -state normal
        .up configure -state normal
        .down configure -state normal
        .bottom configure -state normal
@@ -1337,7 +1337,7 @@ button .next -text Next -command {gdb_cmd next ; update_ptr}
 button .continue -text Continue -command {gdb_cmd continue ; update_ptr}
 button .finish -text Finish -command {gdb_cmd finish ; update_ptr}
 #button .test -text Test -command {echo [info var]}
-button .exit -text Exit -command {gdb_cmd quit}
+button .quit -text Quit -command {gdb_cmd quit}
 button .up -text Up -command {gdb_cmd up ; update_ptr}
 button .down -text Down -command {gdb_cmd down ; update_ptr}
 button .bottom -text Bottom -command {gdb_cmd {frame 0} ; update_ptr}
@@ -1367,7 +1367,7 @@ button .files -text Files -command files_command
 pack .listing -side bottom -fill both -expand yes
 #pack .test -side bottom -fill x
 pack .start .stop .step .next .continue .finish .up .down .bottom .asm_but \
-       .registers .files .exit -side left
+       .registers .files .quit -side left
 toplevel .command
 wm title .command Command
 
This page took 0.034886 seconds and 4 git commands to generate.