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