This is the mail archive of the
insight@sourceware.org
mailing list for the Insight project.
[PATCH] insight/299
- From: Keith Seitz <keiths at redhat dot com>
- To: insight <insight at sourceware dot org>
- Date: Thu, 30 Nov 2006 18:10:41 -0800
- Subject: [PATCH] insight/299
Hi,
I've committed the attached patch which fixes insight/299 (crash when
DISPLAY unset on unix).
Keith
ChangeLog
2006-11-30 Keith Seitz <keiths@redhat.com>
insight/299:
* generic/gdbtk.c (gdbtk_init): Don't check if DISPLAY is set,
it isn't needed anymore. Gdb will not abort, and Tk_Init will
fail gracefully.
Index: generic/gdbtk.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.c,v
retrieving revision 1.44
diff -u -p -r1.44 gdbtk.c
--- generic/gdbtk.c 23 Dec 2005 18:23:16 -0000 1.44
+++ generic/gdbtk.c 1 Dec 2006 02:08:29 -0000
@@ -1,5 +1,5 @@
/* Startup code for Insight
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, 2004
+ Copyright (C) 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, 2004, 2006
Free Software Foundation, Inc.
Written by Stu Grossman <grossman@cygnus.com> of Cygnus Support.
@@ -358,17 +358,6 @@ gdbtk_init (void)
const char **exec_path;
CONST char *internal_exec_name;
- /* 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. */
-
-#ifndef _WIN32
- if (getenv ("DISPLAY") == NULL)
- {
- return;
- }
-#endif
-
old_chain = make_cleanup (cleanup_init, 0);
/* First init tcl and tk. */