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