Search
lxdream.org :: lxdream/src/x86dasm/dis-init.c
lxdream 0.9.1
released Jun 29
Download Now
filename src/x86dasm/dis-init.c
changeset 755:ab873907b00e
prev362:dc40e2064dc4
author nkeynes
date Mon Jul 21 00:08:34 2008 +0000 (15 years ago)
permissions -rw-r--r--
last change Add gettext.h and build sanely without libintl if it's not available
Remove x86dasm's config.h & opintl.h (no longer needed and actually wrong)
file annotate diff log raw
nkeynes@362
     1
/* Initialize "struct disassemble_info".
nkeynes@362
     2
nkeynes@362
     3
   Copyright 2003 Free Software Foundation, Inc.
nkeynes@362
     4
nkeynes@362
     5
   This program is free software; you can redistribute it and/or
nkeynes@362
     6
   modify it under the terms of the GNU General Public License as
nkeynes@362
     7
   published by the Free Software Foundation; either version 2 of the
nkeynes@362
     8
   License, or (at your option) any later version.
nkeynes@362
     9
nkeynes@362
    10
   This program is distributed in the hope that it will be useful, but
nkeynes@362
    11
   WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@362
    12
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
nkeynes@362
    13
   General Public License for more details.
nkeynes@362
    14
nkeynes@362
    15
   You should have received a copy of the GNU General Public License
nkeynes@362
    16
   along with this program; if not, write to the Free Software
nkeynes@362
    17
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@362
    18
   02111-1307, USA.  */
nkeynes@362
    19
nkeynes@755
    20
#include "x86dasm/sysdep.h"
nkeynes@755
    21
#include "x86dasm/dis-asm.h"
nkeynes@755
    22
#include "x86dasm/bfd.h"
nkeynes@362
    23
nkeynes@362
    24
void
nkeynes@362
    25
init_disassemble_info (struct disassemble_info *info, void *stream,
nkeynes@362
    26
		       fprintf_ftype fprintf_func)
nkeynes@362
    27
{
nkeynes@362
    28
  memset (info, 0, sizeof (*info));
nkeynes@362
    29
nkeynes@362
    30
  info->flavour = bfd_target_unknown_flavour;
nkeynes@362
    31
  info->arch = bfd_arch_unknown;
nkeynes@362
    32
  info->endian = BFD_ENDIAN_UNKNOWN;
nkeynes@362
    33
  info->octets_per_byte = 1;
nkeynes@362
    34
  info->fprintf_func = fprintf_func;
nkeynes@362
    35
  info->stream = stream;
nkeynes@362
    36
  info->read_memory_func = buffer_read_memory;
nkeynes@362
    37
  info->memory_error_func = perror_memory;
nkeynes@362
    38
  info->print_address_func = generic_print_address;
nkeynes@362
    39
  info->symbol_at_address_func = generic_symbol_at_address;
nkeynes@362
    40
  info->symbol_is_valid = generic_symbol_is_valid;
nkeynes@362
    41
  info->display_endian = BFD_ENDIAN_UNKNOWN;
nkeynes@362
    42
}
nkeynes@362
    43
.