Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Keith Seitz <keiths@cygnus.com>
Cc: gdb@sources.redhat.com
Subject: Re: print_insn and streams
Date: Mon, 20 Aug 2001 22:58:00 -0000	[thread overview]
Message-ID: <3B81F87E.4050203@cygnus.com> (raw)
In-Reply-To: <Pine.GSO.4.33.0108171435180.11484-100000@makita.cygnus.com>

> Hi,
> 
> printcmd.c currently defines print_insn as:
> 
> static int
> print_insn (CORE_ADDR memaddr, struct ui_file *stream)
> {
>   if (TARGET_BYTE_ORDER == BIG_ENDIAN)
>     TARGET_PRINT_INSN_INFO->endian = BFD_ENDIAN_BIG;
>   else
>     TARGET_PRINT_INSN_INFO->endian = BFD_ENDIAN_LITTLE;
> 
>   if (TARGET_ARCHITECTURE != NULL)
>     TARGET_PRINT_INSN_INFO->mach = TARGET_ARCHITECTURE->mach;
>   /* else: should set .mach=0 but some disassemblers don't grok this */
> 
>   return TARGET_PRINT_INSN (memaddr, TARGET_PRINT_INSN_INFO);
> }
> 
> Is there some reason that it is ignoring the parameter stream? Can it not
> just be set in the disasm info? (TARGET_PRINT_INSN_INFO->stream = stream;)

Keith,

have you looked at gdb/mi/mi-cmd-disas.c (yes the code is nasty) which 
calls the TARGET_PRINT_INSN() with a ui-out builder.

If the main function was split in two would the second half do what 
you're after?  You can check the output by looking at the 
mi-disassemble.exp test (or the doco which might be easier to read :-).

	Andrew




      parent reply	other threads:[~2001-08-20 22:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-17 14:37 Keith Seitz
2001-08-17 15:15 ` John R. Moore
2001-08-20 22:58 ` Andrew Cagney [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=3B81F87E.4050203@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=gdb@sources.redhat.com \
    --cc=keiths@cygnus.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