This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[PATCH] clear init_ui_hook if no DISPLAY
- From: Keith Seitz <keiths at cygnus dot com>
- To: Insight Maling List <insight at sources dot redhat dot com>
- Date: Tue, 20 Nov 2001 13:28:39 -0800 (PST)
- Subject: [PATCH] clear init_ui_hook if no DISPLAY
Hi,
The following patch will allow Insight-enabled gdb's to run as "gdb -nw"
when DISPLAY is not set (on unix boxen).
Keith
ChangeLog
2001-11-20 Keith Seitz <keiths@redhat.com>
* generic/gdbtk.c (gdbtk_init): If DISPLAY is not set on Unix,
clear the init_ui_hook so that gdb will properly initialize
the cli.
Patch
Index: generic/gdbtk.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.c,v
retrieving revision 1.23
diff -u -p -r1.23 gdbtk.c
--- gdbtk.c 2001/10/04 15:01:35 1.23
+++ gdbtk.c 2001/11/20 21:26:44
@@ -370,7 +370,10 @@ gdbtk_init (argv0)
#ifndef _WIN32
if (getenv ("DISPLAY") == NULL)
- return;
+ {
+ init_ui_hook = NULL;
+ return;
+ }
#endif
old_chain = make_cleanup (cleanup_init, 0);