Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* PATCH: Fix -w option
@ 2005-10-25 22:22 Andrew STUBBS
  2005-11-04 22:36 ` Andrew STUBBS
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew STUBBS @ 2005-10-25 22:22 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 209 bytes --]

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

[-- Attachment #2: option_-w_fix.patch --]
[-- Type: text/plain, Size: 1413 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: Fix -w option
  2005-10-25 22:22 PATCH: Fix -w option Andrew STUBBS
@ 2005-11-04 22:36 ` Andrew STUBBS
  2005-11-07  0:19   ` Jim Blandy
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew STUBBS @ 2005-11-04 22:36 UTC (permalink / raw)
  To: Andrew Stubbs; +Cc: gdb-patches

Andrew Stubbs wrote:
> 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.

No word on this one yet. Is it OK?

Andrew Stubbs


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: Fix -w option
  2005-11-04 22:36 ` Andrew STUBBS
@ 2005-11-07  0:19   ` Jim Blandy
  2005-11-07 15:04     ` Andrew STUBBS
  0 siblings, 1 reply; 4+ messages in thread
From: Jim Blandy @ 2005-11-07  0:19 UTC (permalink / raw)
  To: Andrew STUBBS; +Cc: gdb-patches


Andrew STUBBS <andrew.stubbs@st.com> writes:
> Andrew Stubbs wrote:
>> 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.
>
> No word on this one yet. Is it OK?

Yes, it looks fine.  Could you correct the use of "tui" instead of
INTERP_TUI in tui/tui-interp.c, too?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: Fix -w option
  2005-11-07  0:19   ` Jim Blandy
@ 2005-11-07 15:04     ` Andrew STUBBS
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew STUBBS @ 2005-11-07 15:04 UTC (permalink / raw)
  To: Jim Blandy; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 515 bytes --]

Jim Blandy wrote:
> Andrew STUBBS <andrew.stubbs@st.com> writes:
> 
>>Andrew Stubbs wrote:
>>
>>>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.
>>
>>No word on this one yet. Is it OK?
> 
> 
> Yes, it looks fine.  Could you correct the use of "tui" instead of
> INTERP_TUI in tui/tui-interp.c, too?
> 

Certainly, I have commited the attached.

Thanks

Andrew

[-- Attachment #2: option_-w_fix.patch --]
[-- Type: text/plain, Size: 2353 bytes --]

2005-11-07  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.
	* tui/tui-interp.c (_initialize_tui_interp): Use INTERP_TUI instead
	of "tui".


Index: src/gdb/main.c
===================================================================
--- src.orig/gdb/main.c	2005-11-07 11:50:25.000000000 +0000
+++ src/gdb/main.c	2005-11-07 12:24:25.000000000 +0000
@@ -350,11 +350,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-11-07 11:50:25.000000000 +0000
+++ src/gdb/interps.h	2005-11-07 12:24:25.000000000 +0000
@@ -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: src/gdb/tui/tui-interp.c
===================================================================
--- src.orig/gdb/tui/tui-interp.c	2005-04-26 06:03:41.000000000 +0100
+++ src/gdb/tui/tui-interp.c	2005-11-07 12:25:44.000000000 +0000
@@ -199,13 +199,13 @@ _initialize_tui_interp (void)
 
   /* Create a default uiout builder for the TUI. */
   tui_out = tui_out_new (gdb_stdout);
-  interp_add (interp_new ("tui", NULL, tui_out, &procs));
-  if (interpreter_p && strcmp (interpreter_p, "tui") == 0)
+  interp_add (interp_new (INTERP_TUI, NULL, tui_out, &procs));
+  if (interpreter_p && strcmp (interpreter_p, INTERP_TUI) == 0)
     tui_start_enabled = 1;
 
   if (interpreter_p && strcmp (interpreter_p, INTERP_CONSOLE) == 0)
     {
       xfree (interpreter_p);
-      interpreter_p = xstrdup ("tui");
+      interpreter_p = xstrdup (INTERP_TUI);
     }
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-11-07 12:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-25 22:22 PATCH: Fix -w option Andrew STUBBS
2005-11-04 22:36 ` Andrew STUBBS
2005-11-07  0:19   ` Jim Blandy
2005-11-07 15:04     ` Andrew STUBBS

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox