diff options
author | Fred Fish <fnf@specifix.com> | 1996-08-23 07:57:10 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1996-08-23 07:57:10 +0000 |
commit | fe58c81f5caf86ffa0b1df668fd0ec49bcc33bbe (patch) | |
tree | d5dc5962c35ccefceccb705eb5cc37418810ebaf | |
parent | 3c72ab70359f1c5455a70c7f2989b13e80d0f1e7 (diff) | |
download | gdb-fe58c81f5caf86ffa0b1df668fd0ec49bcc33bbe.zip gdb-fe58c81f5caf86ffa0b1df668fd0ec49bcc33bbe.tar.gz gdb-fe58c81f5caf86ffa0b1df668fd0ec49bcc33bbe.tar.bz2 |
* gdbtk.c (gdbtk_init): Check for a DISPLAY env variable and
gracefully degrade to using command line interface if none is
found.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbtk.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 888fead..3c3c92a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +Fri Aug 23 00:44:57 1996 Fred Fish <fnf@ninemoons.com> + + * gdbtk.c (gdbtk_init): Check for a DISPLAY env variable and + gracefully degrade to using command line interface if none is + found. + Wed Aug 21 16:31:27 1996 Fred Fish <fnf@rtl.cygnus.com> * valprint.c (print_longest): Test for CC_HAS_LONG_LONG as well as diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c index 1237ef5..a51f6d9 100644 --- a/gdb/gdbtk.c +++ b/gdb/gdbtk.c @@ -1240,6 +1240,13 @@ gdbtk_init () struct sigaction action; static sigset_t nullsigmask = {0}; + /* If there is no DISPLAY environment variable, Tk_Init below will fail, + causing gdb to abort. If instead we simply return here, gdb will + gracefully degrade to using the command line interface. */ + + if (getenv ("DISPLAY") == NULL) + return; + old_chain = make_cleanup (cleanup_init, 0); /* First init tcl and tk. */ |