aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1994-11-02 00:50:12 +0000
committerStu Grossman <grossman@cygnus>1994-11-02 00:50:12 +0000
commitcd2df226a74a368aa791b797888cfbc6cd7f558f (patch)
treefb6957ba93b61bb11497d5151e374ada3287a0a8 /gdb
parentda15a93ea12380a05a34c15377e35d3415137375 (diff)
downloadgdb-cd2df226a74a368aa791b797888cfbc6cd7f558f.zip
gdb-cd2df226a74a368aa791b797888cfbc6cd7f558f.tar.gz
gdb-cd2df226a74a368aa791b797888cfbc6cd7f558f.tar.bz2
* 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).
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog12
-rw-r--r--gdb/Makefile.in14
-rw-r--r--gdb/configure.in2
-rw-r--r--gdb/gdbtk.c20
-rw-r--r--gdb/gdbtk.tcl8
5 files changed, 35 insertions, 21 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6b10dbe..a7f5f17 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 2efb7e5..92b6a46 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 a07bf32..4f63e1a 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 e93471e..eefac93 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 <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 */
diff --git a/gdb/gdbtk.tcl b/gdb/gdbtk.tcl
index 08e7c4b..bf5280b 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