diff options
author | Andrew Cagney <cagney@gnu.org> | 2003-09-03 23:43:17 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@gnu.org> | 2003-09-03 23:43:17 +0000 |
commit | e550f4d98057ed1f0a4d9685c29c81dc9370065e (patch) | |
tree | 08b0bdf5e9eb8e80a6dab8ad900a5834d9039f38 /include | |
parent | 75119e9980e160d8766111f40353df61abc8159b (diff) | |
download | newlib-e550f4d98057ed1f0a4d9685c29c81dc9370065e.zip newlib-e550f4d98057ed1f0a4d9685c29c81dc9370065e.tar.gz newlib-e550f4d98057ed1f0a4d9685c29c81dc9370065e.tar.bz2 |
Index: opcodes/ChangeLog
2003-09-03 Andrew Cagney <cagney@redhat.com>
* dis-init.c (init_disassemble_info): New file and function.
* Makefile.am (CFILES): Add "dis-init.c".
(libopcodes_la_SOURCES): Add "dis-init.c".
(dis-init.lo): Specify dependencies.
* Makefile.in: Regenerate.
Index: include/ChangeLog
2003-08-27 Andrew Cagney <cagney@redhat.com>
* dis-asm.h (init_disassemble_info): Declare.
(INIT_DISASSEMBLE_INFO): Redefine as a call to
init_disassemble_info.
(INIT_DISASSEMBLE_INFO_NO_ARCH): Ditto.
Index: binutils/ChangeLog
2003-09-03 Andrew Cagney <cagney@redhat.com>
* objdump.c: Refer to init_disassemble_info in comments.
(disassemble_data): Replace INIT_DISASSEMBLE_INFO with
init_disassemble_info.
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 7 | ||||
-rw-r--r-- | include/dis-asm.h | 43 |
2 files changed, 16 insertions, 34 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 971de50..3852e7d 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,10 @@ +2003-08-27 Andrew Cagney <cagney@redhat.com> + + * dis-asm.h (init_disassemble_info): Declare. + (INIT_DISASSEMBLE_INFO): Redefine as a call to + init_disassemble_info. + (INIT_DISASSEMBLE_INFO_NO_ARCH): Ditto. + 2003-08-20 Nick Clifton <nickc@redhat.com> * bfdlink.h (enum report_method): New enum. Describes how to diff --git a/include/dis-asm.h b/include/dis-asm.h index 1d67ae4..6bdd751 100644 --- a/include/dis-asm.h +++ b/include/dis-asm.h @@ -284,42 +284,17 @@ extern void generic_print_address extern int generic_symbol_at_address (bfd_vma, struct disassemble_info *); -/* Macro to initialize a disassemble_info struct. This should be called - by all applications creating such a struct. */ -#define INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC) \ - (INFO).flavour = bfd_target_unknown_flavour, \ - (INFO).arch = bfd_arch_unknown, \ - (INFO).mach = 0, \ - (INFO).insn_sets = 0, \ - (INFO).endian = BFD_ENDIAN_UNKNOWN, \ - (INFO).octets_per_byte = 1, \ - INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC) - -/* Call this macro to initialize only the internal variables for the - disassembler. Architecture dependent things such as byte order, or machine - variant are not touched by this macro. This makes things much easier for - GDB which must initialize these things separately. */ +/* Method to initialize a disassemble_info struct. This should be + called by all applications creating such a struct. */ +extern void init_disassemble_info (struct disassemble_info *info, void *stream, + fprintf_ftype fprintf_func); +/* For compatibility with existing code. */ +#define INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC) \ + init_disassemble_info (&(INFO), (STREAM), (fprintf_ftype) (FPRINTF_FUNC)) #define INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC) \ - (INFO).fprintf_func = (fprintf_ftype)(FPRINTF_FUNC), \ - (INFO).stream = (STREAM), \ - (INFO).section = NULL, \ - (INFO).symbols = NULL, \ - (INFO).num_symbols = 0, \ - (INFO).private_data = NULL, \ - (INFO).buffer = NULL, \ - (INFO).buffer_vma = 0, \ - (INFO).buffer_length = 0, \ - (INFO).read_memory_func = buffer_read_memory, \ - (INFO).memory_error_func = perror_memory, \ - (INFO).print_address_func = generic_print_address, \ - (INFO).symbol_at_address_func = generic_symbol_at_address, \ - (INFO).flags = 0, \ - (INFO).bytes_per_line = 0, \ - (INFO).bytes_per_chunk = 0, \ - (INFO).display_endian = BFD_ENDIAN_UNKNOWN, \ - (INFO).disassembler_options = NULL, \ - (INFO).insn_info_valid = 0 + init_disassemble_info (&(INFO), (STREAM), (fprintf_ftype) (FPRINTF_FUNC)) + #ifdef __cplusplus } |