1*a9fa9459Szrj /* Initialize "struct disassemble_info".
2*a9fa9459Szrj
3*a9fa9459Szrj Copyright (C) 2003-2016 Free Software Foundation, Inc.
4*a9fa9459Szrj
5*a9fa9459Szrj This file is part of the GNU opcodes library.
6*a9fa9459Szrj
7*a9fa9459Szrj This library is free software; you can redistribute it and/or modify
8*a9fa9459Szrj it under the terms of the GNU General Public License as published by
9*a9fa9459Szrj the Free Software Foundation; either version 3, or (at your option)
10*a9fa9459Szrj any later version.
11*a9fa9459Szrj
12*a9fa9459Szrj It is distributed in the hope that it will be useful, but WITHOUT
13*a9fa9459Szrj ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14*a9fa9459Szrj or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15*a9fa9459Szrj License for more details.
16*a9fa9459Szrj
17*a9fa9459Szrj You should have received a copy of the GNU General Public License
18*a9fa9459Szrj along with this program; if not, write to the Free Software
19*a9fa9459Szrj Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
20*a9fa9459Szrj 02110-1301, USA. */
21*a9fa9459Szrj
22*a9fa9459Szrj #include "sysdep.h"
23*a9fa9459Szrj #include "dis-asm.h"
24*a9fa9459Szrj #include "bfd.h"
25*a9fa9459Szrj
26*a9fa9459Szrj void
init_disassemble_info(struct disassemble_info * info,void * stream,fprintf_ftype fprintf_func)27*a9fa9459Szrj init_disassemble_info (struct disassemble_info *info, void *stream,
28*a9fa9459Szrj fprintf_ftype fprintf_func)
29*a9fa9459Szrj {
30*a9fa9459Szrj memset (info, 0, sizeof (*info));
31*a9fa9459Szrj
32*a9fa9459Szrj info->flavour = bfd_target_unknown_flavour;
33*a9fa9459Szrj info->arch = bfd_arch_unknown;
34*a9fa9459Szrj info->endian = BFD_ENDIAN_UNKNOWN;
35*a9fa9459Szrj info->endian_code = info->endian;
36*a9fa9459Szrj info->octets_per_byte = 1;
37*a9fa9459Szrj info->fprintf_func = fprintf_func;
38*a9fa9459Szrj info->stream = stream;
39*a9fa9459Szrj info->read_memory_func = buffer_read_memory;
40*a9fa9459Szrj info->memory_error_func = perror_memory;
41*a9fa9459Szrj info->print_address_func = generic_print_address;
42*a9fa9459Szrj info->symbol_at_address_func = generic_symbol_at_address;
43*a9fa9459Szrj info->symbol_is_valid = generic_symbol_is_valid;
44*a9fa9459Szrj info->display_endian = BFD_ENDIAN_UNKNOWN;
45*a9fa9459Szrj }
46*a9fa9459Szrj
47