This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Fix -w option


Hi,

The -w option does not do anything anymore.

The attached patch fixes the problem and allows it to open Insight once more. It also tidies up the use of interpreter_p a little wrt the tui.

Andrew Stubbs
2005-10-25  Andrew Stubbs  <andrew.stubbs@st.com>

	* main.c (main): Use INTERP_TUI instead of "tui".
	Set interpreter to INTERP_INSIGHT when '-w' given.
	* interps.h (INTERP_INSIGHT): New define.


Index: src/gdb/main.c
===================================================================
--- src.orig/gdb/main.c	2005-10-17 15:23:23.000000000 +0100
+++ src/gdb/main.c	2005-10-17 15:29:40.000000000 +0100
@@ -339,11 +339,16 @@ captured_main (void *data)
 	  case OPT_TUI:
 	    /* --tui is equivalent to -i=tui.  */
 	    xfree (interpreter_p);
-	    interpreter_p = xstrdup ("tui");
+	    interpreter_p = xstrdup (INTERP_TUI);
 	    break;
 	  case OPT_WINDOWS:
 	    /* FIXME: cagney/2003-03-01: Not sure if this option is
                actually useful, and if it is, what it should do.  */
+#ifdef GDBTK
+	    /* --windows is equivalent to -i=insight.  */
+	    xfree (interpreter_p);
+	    interpreter_p = xstrdup (INTERP_INSIGHT);
+#endif
 	    use_windows = 1;
 	    break;
 	  case OPT_NOWINDOWS:
Index: src/gdb/interps.h
===================================================================
--- src.orig/gdb/interps.h	2005-10-17 15:23:23.000000000 +0100
+++ src/gdb/interps.h	2005-10-17 15:29:40.000000000 +0100
@@ -76,5 +76,6 @@ extern void clear_interpreter_hooks (voi
 #define INTERP_MI3             "mi3"
 #define INTERP_MI		"mi"
 #define INTERP_TUI		"tui"
+#define INTERP_INSIGHT		"insight"
 
 #endif

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]