From: Stu Grossman Date: Wed, 2 Nov 1994 00:50:12 +0000 (+0000) Subject: * Makefile.in: Use $(objdir)/tcl and $(objdir)/tk if they are X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cd2df226a74a368aa791b797888cfbc6cd7f558f;p=binutils-gdb.git * 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). --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6b10dbe47db..a7f5f17674e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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' diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 2efb7e55a8e..92b6a465d73 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -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) \ diff --git a/gdb/configure.in b/gdb/configure.in index a07bf32f429..4f63e1af4d2 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -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 diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c index e93471ef42d..eefac93e8a3 100644 --- a/gdb/gdbtk.c +++ b/gdb/gdbtk.c @@ -25,20 +25,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "symfile.h" #include "objfiles.h" #include "target.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include +#include +#include +#include #include /* 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 */ diff --git a/gdb/gdbtk.tcl b/gdb/gdbtk.tcl index 08e7c4bc21b..bf5280bee55 100644 --- a/gdb/gdbtk.tcl +++ b/gdb/gdbtk.tcl @@ -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