public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@cygnus.com>
To: Insight Maling List <insight@sources.redhat.com>
Subject: Re: [PATCH] "disassemble" crashes in console window
Date: Tue, 21 Aug 2001 12:30:00 -0000	[thread overview]
Message-ID: <Pine.GSO.4.33.0108211229110.14879-100000@makita.cygnus.com> (raw)
In-Reply-To: <Pine.GSO.4.33.0108210952130.21831-100000@makita.cygnus.com>

Gdb just fixed this properly. I'm reverting this change.

(Got approval in gdb a lot quicker than I anticipated!)
Keith

On Tue, 21 Aug 2001, Keith Seitz wrote:

> Hi,
>
> When disassembling in the console window, Insight would often crash. This
> happens because _initialize_gdbarch calls INIT_DISASSEMBLE_INFO_NO_ARCH
> with gdb_stdout, which is the vanilla gdb_stdout from top.c.
>
> Later when gdbtk_init is called, we delete gdb_stdout and reset it to a
> new stream which calls our fprintf routine. As a result,
> tm_print_insn_info contains a bogus stream for output.
>
> The following patch re-registers our new gdb_stdout as the default output
> stream. (And no, you cannot just call INIT_DISASSEMBLE_INFO again!)
>
> Keith
>
> ChangeLog
> 2001-08-21  Keith Seitz  <keiths@redhat.com>
>
> 	* generic/gdbtk.c (gdbtk_init): Reinitialize disassemle info's
> 	stream parameter: we just deleted the one it saved when we
> 	re-routed gdb_stdout to our own gdb_stdout.
>
> Patch
> Index: generic/gdbtk.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.c,v
> retrieving revision 1.18
> diff -u -p -r1.18 gdbtk.c
> --- gdbtk.c	2001/08/16 23:04:46	1.18
> +++ gdbtk.c	2001/08/21 16:51:59
> @@ -586,6 +586,10 @@ gdbtk_init (argv0)
>    gdb_stdtarg = gdbtk_fileopen ();
>    uiout = cli_out_new (gdb_stdout);
>
> +  /* We need to re-register the standard disassembler's
> +     output, since we just changed gdb_stdout. */
> +  tm_print_insn_info.stream = gdb_stdout;
> +
>  #ifdef __CYGWIN32__
>        (void) FreeConsole ();
>  #endif
>
>
>

      reply	other threads:[~2001-08-21 12:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-21  9:55 Keith Seitz
2001-08-21 12:30 ` Keith Seitz [this message]

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=Pine.GSO.4.33.0108211229110.14879-100000@makita.cygnus.com \
    --to=keiths@cygnus.com \
    --cc=insight@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).