Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Stephane Carrez <stcarrez@nerim.fr>
To: gdb-patches@sources.redhat.com, drow@mvista.com
Subject: [5.3 PATCH]: Fix TUI breaking gdb interpreters (mi)
Date: Thu, 21 Nov 2002 13:26:00 -0000	[thread overview]
Message-ID: <3DDD5D91.3010500@nerim.fr> (raw)

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

Hi!

Daniel Jacobowitz wrote:
 > Two problems:
 >  TUI broke the MI interface if TUI is enabled at compile time.  The change
 > which did this does was on Sept. 10th, 2002.  There's a typo in the
 > ChangeLog which made it hard to find...
 >
 >        * tui-hooks.c (tui_event_loop): New function.
 >        (tui_command_loop): New function to override gdb loop and make sure
 >        uiout is set according to TUI mode.
 >        (tui_command_loop): Install the specific TUI command hook.
 >
 > (the second tui_command_loop should have been tui_init_hook).
 >
 > You can't just override the command loop that way!  MI does this
 > conditionally on -i=mi being specified.
 >
 > This also breaks the bit at the end of gdb/top.c to handle unknown -i=
 > switches.

Too bad...

I've committed this patch to avoid the TUI initialization when some interpreter
was specified (It does not make sense to enable TUI when there such interpreter).
I also fixed the ChangeLog typo.

gdb -i=mi seems to work after that (at least better than without it).

	Stephane

2002-11-21  Stephane Carrez  <stcarrez@nerim.fr>

	* tui-hooks.c (tui_init_hook): Don't enable the TUI if a specific
	interpreter is installed.

[-- Attachment #2: tui-fixes.diffs --]
[-- Type: text/plain, Size: 575 bytes --]

Index: tui-hooks.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-hooks.c,v
retrieving revision 1.7.2.1
diff -u -p -r1.7.2.1 tui-hooks.c
--- tui-hooks.c	10 Sep 2002 20:00:55 -0000	1.7.2.1
+++ tui-hooks.c	21 Nov 2002 21:13:02 -0000
@@ -420,6 +420,10 @@ tui_event_loop (void)
 static void
 tui_init_hook (char *argv0)
 {
+  /* Don't enable the TUI if a specific interpreter is installed.  */
+  if (interpreter_p)
+    return;
+
   /* Install exit handler to leave the screen in a good shape.  */
   atexit (tui_exit);
 

             reply	other threads:[~2002-11-21 21:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-21 13:26 Stephane Carrez [this message]
2002-11-21 14:54 ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3DDD5D91.3010500@nerim.fr \
    --to=stcarrez@nerim.fr \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox