* gas/m68k/mcf-emac.d: Allow for 64-bit addresses.
[deliverable/binutils-gdb.git] / include / dis-asm.h
index 1d67ae414a10e972fa65e18fb5403a7702249b9c..be54263a756e590f58285a37985da34b83cab3d3 100644 (file)
@@ -1,6 +1,6 @@
 /* Interface between the opcode library and its callers.
 
-   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -130,6 +130,12 @@ typedef struct disassemble_info {
   int (* symbol_at_address_func)
     (bfd_vma addr, struct disassemble_info * info);
 
+  /* Function called to check if a SYMBOL is can be displayed to the user.
+     This is used by some ports that want to hide special symbols when
+     displaying debugging outout.  */
+  bfd_boolean (* symbol_is_valid)
+    (asymbol *, struct disassemble_info * info);
+    
   /* These are for buffer_read_memory.  */
   bfd_byte *buffer;
   bfd_vma buffer_vma;
@@ -141,7 +147,7 @@ typedef struct disassemble_info {
       the same value in order to get reasonable looking output.  */
   int bytes_per_line;
 
-  /* the next two variables control the way objdump displays the raw data */
+  /* The next two variables control the way objdump displays the raw data.  */
   /* For example, if bytes_per_line is 8 and bytes_per_chunk is 4, the */
   /* output will look like this:
      00:   00000000 00000000
@@ -153,6 +159,18 @@ typedef struct disassemble_info {
      Normally one, but some DSPs have byte sizes of 16 or 32 bits.  */
   unsigned int octets_per_byte;
 
+  /* The number of zeroes we want to see at the end of a section before we
+     start skipping them.  */
+  unsigned int skip_zeroes;
+
+  /* The number of zeroes to skip at the end of a section.  If the number
+     of zeroes at the end is between SKIP_ZEROES_AT_END and SKIP_ZEROES,
+     they will be disassembled.  If there are fewer than
+     SKIP_ZEROES_AT_END, they will be skipped.  This is a heuristic
+     attempt to avoid disassembling zeroes inserted by section
+     alignment.  */
+  unsigned int skip_zeroes_at_end;
+
   /* Results from instruction decoders.  Not all decoders yet support
      this information.  This info is set each time an instruction is
      decoded, and is only valid for the last such instruction.
@@ -212,12 +230,15 @@ extern int print_insn_i960                (bfd_vma, disassemble_info *);
 extern int print_insn_ip2k             (bfd_vma, disassemble_info *);
 extern int print_insn_m32r             (bfd_vma, disassemble_info *);
 extern int print_insn_m88k             (bfd_vma, disassemble_info *);
+extern int print_insn_maxq_little      (bfd_vma, disassemble_info *);
+extern int print_insn_maxq_big         (bfd_vma, disassemble_info *);
 extern int print_insn_mcore            (bfd_vma, disassemble_info *);
 extern int print_insn_mmix             (bfd_vma, disassemble_info *);
 extern int print_insn_mn10200          (bfd_vma, disassemble_info *);
 extern int print_insn_mn10300          (bfd_vma, disassemble_info *);
 extern int print_insn_msp430           (bfd_vma, disassemble_info *);
 extern int print_insn_ns32k            (bfd_vma, disassemble_info *);
+extern int print_insn_crx               (bfd_vma, disassemble_info *);
 extern int print_insn_openrisc         (bfd_vma, disassemble_info *);
 extern int print_insn_big_or32         (bfd_vma, disassemble_info *);
 extern int print_insn_little_or32      (bfd_vma, disassemble_info *);
@@ -251,12 +272,16 @@ extern void print_arm_disassembler_options (FILE *);
 extern void parse_arm_disassembler_option (char *);
 extern int get_arm_regname_num_options (void);
 extern int set_arm_regname_option (int);
-extern int get_arm_regnames
-  (int, const char **, const char **, const char ***);
+extern int get_arm_regnames (int, const char **, const char **, const char ***);
+extern bfd_boolean arm_symbol_is_valid (asymbol *, struct disassemble_info *);
 
 /* Fetch the disassembler for a given BFD, if that support is available.  */
 extern disassembler_ftype disassembler (bfd *);
 
+/* Amend the disassemble_info structure as necessary for the target architecture.
+   Should only be called after initialising the info->arch field.  */
+extern void disassemble_init_for_target (struct disassemble_info * info);
+
 /* Document any target specific options available from the disassembler.  */
 extern void disassembler_usage (FILE *);
 
@@ -284,42 +309,21 @@ 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.  */
+/* Also always true.  */  
+extern bfd_boolean generic_symbol_is_valid
+  (asymbol *, struct disassemble_info *);
+  
+/* 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
 }
This page took 0.024805 seconds and 4 git commands to generate.