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