filename | src/x86dasm/dis-init.c |
changeset | 362:dc40e2064dc4 |
next | 755:ab873907b00e |
author | nkeynes |
date | Sat Sep 08 04:05:35 2007 +0000 (16 years ago) |
permissions | -rw-r--r-- |
last change | Handle video driver init failure cleanly (fallback to headless) Hookup shutdown for the GTK driver |
file | annotate | diff | log | raw |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00001.2 +++ b/src/x86dasm/dis-init.c Sat Sep 08 04:05:35 2007 +00001.3 @@ -0,0 +1,43 @@1.4 +/* Initialize "struct disassemble_info".1.5 +1.6 + Copyright 2003 Free Software Foundation, Inc.1.7 +1.8 + This program is free software; you can redistribute it and/or1.9 + modify it under the terms of the GNU General Public License as1.10 + published by the Free Software Foundation; either version 2 of the1.11 + License, or (at your option) any later version.1.12 +1.13 + This program is distributed in the hope that it will be useful, but1.14 + WITHOUT ANY WARRANTY; without even the implied warranty of1.15 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU1.16 + General Public License for more details.1.17 +1.18 + You should have received a copy of the GNU General Public License1.19 + along with this program; if not, write to the Free Software1.20 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA1.21 + 02111-1307, USA. */1.22 +1.23 +#include "sysdep.h"1.24 +#include "dis-asm.h"1.25 +#include "bfd.h"1.26 +1.27 +void1.28 +init_disassemble_info (struct disassemble_info *info, void *stream,1.29 + fprintf_ftype fprintf_func)1.30 +{1.31 + memset (info, 0, sizeof (*info));1.32 +1.33 + info->flavour = bfd_target_unknown_flavour;1.34 + info->arch = bfd_arch_unknown;1.35 + info->endian = BFD_ENDIAN_UNKNOWN;1.36 + info->octets_per_byte = 1;1.37 + info->fprintf_func = fprintf_func;1.38 + info->stream = stream;1.39 + info->read_memory_func = buffer_read_memory;1.40 + info->memory_error_func = perror_memory;1.41 + info->print_address_func = generic_print_address;1.42 + info->symbol_at_address_func = generic_symbol_at_address;1.43 + info->symbol_is_valid = generic_symbol_is_valid;1.44 + info->display_endian = BFD_ENDIAN_UNKNOWN;1.45 +}1.46 +
.