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