This is the mail archive of the gdb@sources.redhat.com 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]

print_insn and streams


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;)

Curious.
Keith



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