1*fae548d3Szrj /* Interface between the opcode library and its callers.
2*fae548d3Szrj
3*fae548d3Szrj Copyright (C) 1999-2020 Free Software Foundation, Inc.
4*fae548d3Szrj
5*fae548d3Szrj This program is free software; you can redistribute it and/or modify
6*fae548d3Szrj it under the terms of the GNU General Public License as published by
7*fae548d3Szrj the Free Software Foundation; either version 3, or (at your option)
8*fae548d3Szrj any later version.
9*fae548d3Szrj
10*fae548d3Szrj This program is distributed in the hope that it will be useful,
11*fae548d3Szrj but WITHOUT ANY WARRANTY; without even the implied warranty of
12*fae548d3Szrj MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13*fae548d3Szrj GNU General Public License for more details.
14*fae548d3Szrj
15*fae548d3Szrj You should have received a copy of the GNU General Public License
16*fae548d3Szrj along with this program; if not, write to the Free Software
17*fae548d3Szrj Foundation, Inc., 51 Franklin Street - Fifth Floor,
18*fae548d3Szrj Boston, MA 02110-1301, USA.
19*fae548d3Szrj
20*fae548d3Szrj Written by Cygnus Support, 1993.
21*fae548d3Szrj
22*fae548d3Szrj The opcode library (libopcodes.a) provides instruction decoders for
23*fae548d3Szrj a large variety of instruction sets, callable with an identical
24*fae548d3Szrj interface, for making instruction-processing programs more independent
25*fae548d3Szrj of the instruction set being processed. */
26*fae548d3Szrj
27*fae548d3Szrj #ifndef DIS_ASM_H
28*fae548d3Szrj #define DIS_ASM_H
29*fae548d3Szrj
30*fae548d3Szrj #ifdef __cplusplus
31*fae548d3Szrj extern "C" {
32*fae548d3Szrj #endif
33*fae548d3Szrj
34*fae548d3Szrj #include <stdio.h>
35*fae548d3Szrj #include <string.h>
36*fae548d3Szrj #include "bfd.h"
37*fae548d3Szrj
38*fae548d3Szrj typedef int (*fprintf_ftype) (void *, const char*, ...) ATTRIBUTE_FPTR_PRINTF_2;
39*fae548d3Szrj
40*fae548d3Szrj enum dis_insn_type
41*fae548d3Szrj {
42*fae548d3Szrj dis_noninsn, /* Not a valid instruction. */
43*fae548d3Szrj dis_nonbranch, /* Not a branch instruction. */
44*fae548d3Szrj dis_branch, /* Unconditional branch. */
45*fae548d3Szrj dis_condbranch, /* Conditional branch. */
46*fae548d3Szrj dis_jsr, /* Jump to subroutine. */
47*fae548d3Szrj dis_condjsr, /* Conditional jump to subroutine. */
48*fae548d3Szrj dis_dref, /* Data reference instruction. */
49*fae548d3Szrj dis_dref2 /* Two data references in instruction. */
50*fae548d3Szrj };
51*fae548d3Szrj
52*fae548d3Szrj /* This struct is passed into the instruction decoding routine,
53*fae548d3Szrj and is passed back out into each callback. The various fields are used
54*fae548d3Szrj for conveying information from your main routine into your callbacks,
55*fae548d3Szrj for passing information into the instruction decoders (such as the
56*fae548d3Szrj addresses of the callback functions), or for passing information
57*fae548d3Szrj back from the instruction decoders to their callers.
58*fae548d3Szrj
59*fae548d3Szrj It must be initialized before it is first passed; this can be done
60*fae548d3Szrj by hand, or using one of the initialization macros below. */
61*fae548d3Szrj
62*fae548d3Szrj typedef struct disassemble_info
63*fae548d3Szrj {
64*fae548d3Szrj fprintf_ftype fprintf_func;
65*fae548d3Szrj void *stream;
66*fae548d3Szrj void *application_data;
67*fae548d3Szrj
68*fae548d3Szrj /* Target description. We could replace this with a pointer to the bfd,
69*fae548d3Szrj but that would require one. There currently isn't any such requirement
70*fae548d3Szrj so to avoid introducing one we record these explicitly. */
71*fae548d3Szrj /* The bfd_flavour. This can be bfd_target_unknown_flavour. */
72*fae548d3Szrj enum bfd_flavour flavour;
73*fae548d3Szrj /* The bfd_arch value. */
74*fae548d3Szrj enum bfd_architecture arch;
75*fae548d3Szrj /* The bfd_mach value. */
76*fae548d3Szrj unsigned long mach;
77*fae548d3Szrj /* Endianness (for bi-endian cpus). Mono-endian cpus can ignore this. */
78*fae548d3Szrj enum bfd_endian endian;
79*fae548d3Szrj /* Endianness of code, for mixed-endian situations such as ARM BE8. */
80*fae548d3Szrj enum bfd_endian endian_code;
81*fae548d3Szrj
82*fae548d3Szrj /* Some targets need information about the current section to accurately
83*fae548d3Szrj display insns. If this is NULL, the target disassembler function
84*fae548d3Szrj will have to make its best guess. */
85*fae548d3Szrj asection *section;
86*fae548d3Szrj
87*fae548d3Szrj /* An array of pointers to symbols either at the location being disassembled
88*fae548d3Szrj or at the start of the function being disassembled. The array is sorted
89*fae548d3Szrj so that the first symbol is intended to be the one used. The others are
90*fae548d3Szrj present for any misc. purposes. This is not set reliably, but if it is
91*fae548d3Szrj not NULL, it is correct. */
92*fae548d3Szrj asymbol **symbols;
93*fae548d3Szrj /* Number of symbols in array. */
94*fae548d3Szrj int num_symbols;
95*fae548d3Szrj
96*fae548d3Szrj /* Symbol table provided for targets that want to look at it. This is
97*fae548d3Szrj used on Arm to find mapping symbols and determine Arm/Thumb code. */
98*fae548d3Szrj asymbol **symtab;
99*fae548d3Szrj int symtab_pos;
100*fae548d3Szrj int symtab_size;
101*fae548d3Szrj
102*fae548d3Szrj /* For use by the disassembler.
103*fae548d3Szrj The top 16 bits are reserved for public use (and are documented here).
104*fae548d3Szrj The bottom 16 bits are for the internal use of the disassembler. */
105*fae548d3Szrj unsigned long flags;
106*fae548d3Szrj /* Set if the disassembler has determined that there are one or more
107*fae548d3Szrj relocations associated with the instruction being disassembled. */
108*fae548d3Szrj #define INSN_HAS_RELOC (1u << 31)
109*fae548d3Szrj /* Set if the user has requested the disassembly of data as well as code. */
110*fae548d3Szrj #define DISASSEMBLE_DATA (1u << 30)
111*fae548d3Szrj /* Set if the user has specifically set the machine type encoded in the
112*fae548d3Szrj mach field of this structure. */
113*fae548d3Szrj #define USER_SPECIFIED_MACHINE_TYPE (1u << 29)
114*fae548d3Szrj /* Set if the user has requested wide output. */
115*fae548d3Szrj #define WIDE_OUTPUT (1u << 28)
116*fae548d3Szrj
117*fae548d3Szrj /* Use internally by the target specific disassembly code. */
118*fae548d3Szrj void *private_data;
119*fae548d3Szrj
120*fae548d3Szrj /* Function used to get bytes to disassemble. MEMADDR is the
121*fae548d3Szrj address of the stuff to be disassembled, MYADDR is the address to
122*fae548d3Szrj put the bytes in, and LENGTH is the number of bytes to read.
123*fae548d3Szrj INFO is a pointer to this struct.
124*fae548d3Szrj Returns an errno value or 0 for success. */
125*fae548d3Szrj int (*read_memory_func)
126*fae548d3Szrj (bfd_vma memaddr, bfd_byte *myaddr, unsigned int length,
127*fae548d3Szrj struct disassemble_info *dinfo);
128*fae548d3Szrj
129*fae548d3Szrj /* Function which should be called if we get an error that we can't
130*fae548d3Szrj recover from. STATUS is the errno value from read_memory_func and
131*fae548d3Szrj MEMADDR is the address that we were trying to read. INFO is a
132*fae548d3Szrj pointer to this struct. */
133*fae548d3Szrj void (*memory_error_func)
134*fae548d3Szrj (int status, bfd_vma memaddr, struct disassemble_info *dinfo);
135*fae548d3Szrj
136*fae548d3Szrj /* Function called to print ADDR. */
137*fae548d3Szrj void (*print_address_func)
138*fae548d3Szrj (bfd_vma addr, struct disassemble_info *dinfo);
139*fae548d3Szrj
140*fae548d3Szrj /* Function called to determine if there is a symbol at the given ADDR.
141*fae548d3Szrj If there is, the function returns 1, otherwise it returns 0.
142*fae548d3Szrj This is used by ports which support an overlay manager where
143*fae548d3Szrj the overlay number is held in the top part of an address. In
144*fae548d3Szrj some circumstances we want to include the overlay number in the
145*fae548d3Szrj address, (normally because there is a symbol associated with
146*fae548d3Szrj that address), but sometimes we want to mask out the overlay bits. */
147*fae548d3Szrj int (* symbol_at_address_func)
148*fae548d3Szrj (bfd_vma addr, struct disassemble_info *dinfo);
149*fae548d3Szrj
150*fae548d3Szrj /* Function called to check if a SYMBOL is can be displayed to the user.
151*fae548d3Szrj This is used by some ports that want to hide special symbols when
152*fae548d3Szrj displaying debugging outout. */
153*fae548d3Szrj bfd_boolean (* symbol_is_valid)
154*fae548d3Szrj (asymbol *, struct disassemble_info *dinfo);
155*fae548d3Szrj
156*fae548d3Szrj /* These are for buffer_read_memory. */
157*fae548d3Szrj bfd_byte *buffer;
158*fae548d3Szrj bfd_vma buffer_vma;
159*fae548d3Szrj size_t buffer_length;
160*fae548d3Szrj
161*fae548d3Szrj /* This variable may be set by the instruction decoder. It suggests
162*fae548d3Szrj the number of bytes objdump should display on a single line. If
163*fae548d3Szrj the instruction decoder sets this, it should always set it to
164*fae548d3Szrj the same value in order to get reasonable looking output. */
165*fae548d3Szrj int bytes_per_line;
166*fae548d3Szrj
167*fae548d3Szrj /* The next two variables control the way objdump displays the raw data. */
168*fae548d3Szrj /* For example, if bytes_per_line is 8 and bytes_per_chunk is 4, the */
169*fae548d3Szrj /* output will look like this:
170*fae548d3Szrj 00: 00000000 00000000
171*fae548d3Szrj with the chunks displayed according to "display_endian". */
172*fae548d3Szrj int bytes_per_chunk;
173*fae548d3Szrj enum bfd_endian display_endian;
174*fae548d3Szrj
175*fae548d3Szrj /* Number of octets per incremented target address
176*fae548d3Szrj Normally one, but some DSPs have byte sizes of 16 or 32 bits. */
177*fae548d3Szrj unsigned int octets_per_byte;
178*fae548d3Szrj
179*fae548d3Szrj /* The number of zeroes we want to see at the end of a section before we
180*fae548d3Szrj start skipping them. */
181*fae548d3Szrj unsigned int skip_zeroes;
182*fae548d3Szrj
183*fae548d3Szrj /* The number of zeroes to skip at the end of a section. If the number
184*fae548d3Szrj of zeroes at the end is between SKIP_ZEROES_AT_END and SKIP_ZEROES,
185*fae548d3Szrj they will be disassembled. If there are fewer than
186*fae548d3Szrj SKIP_ZEROES_AT_END, they will be skipped. This is a heuristic
187*fae548d3Szrj attempt to avoid disassembling zeroes inserted by section
188*fae548d3Szrj alignment. */
189*fae548d3Szrj unsigned int skip_zeroes_at_end;
190*fae548d3Szrj
191*fae548d3Szrj /* Whether the disassembler always needs the relocations. */
192*fae548d3Szrj bfd_boolean disassembler_needs_relocs;
193*fae548d3Szrj
194*fae548d3Szrj /* Results from instruction decoders. Not all decoders yet support
195*fae548d3Szrj this information. This info is set each time an instruction is
196*fae548d3Szrj decoded, and is only valid for the last such instruction.
197*fae548d3Szrj
198*fae548d3Szrj To determine whether this decoder supports this information, set
199*fae548d3Szrj insn_info_valid to 0, decode an instruction, then check it. */
200*fae548d3Szrj
201*fae548d3Szrj char insn_info_valid; /* Branch info has been set. */
202*fae548d3Szrj char branch_delay_insns; /* How many sequential insn's will run before
203*fae548d3Szrj a branch takes effect. (0 = normal) */
204*fae548d3Szrj char data_size; /* Size of data reference in insn, in bytes */
205*fae548d3Szrj enum dis_insn_type insn_type; /* Type of instruction */
206*fae548d3Szrj bfd_vma target; /* Target address of branch or dref, if known;
207*fae548d3Szrj zero if unknown. */
208*fae548d3Szrj bfd_vma target2; /* Second target address for dref2 */
209*fae548d3Szrj
210*fae548d3Szrj /* Command line options specific to the target disassembler. */
211*fae548d3Szrj const char *disassembler_options;
212*fae548d3Szrj
213*fae548d3Szrj /* If non-zero then try not disassemble beyond this address, even if
214*fae548d3Szrj there are values left in the buffer. This address is the address
215*fae548d3Szrj of the nearest symbol forwards from the start of the disassembly,
216*fae548d3Szrj and it is assumed that it lies on the boundary between instructions.
217*fae548d3Szrj If an instruction spans this address then this is an error in the
218*fae548d3Szrj file being disassembled. */
219*fae548d3Szrj bfd_vma stop_vma;
220*fae548d3Szrj
221*fae548d3Szrj /* The end range of the current range being disassembled. This is required
222*fae548d3Szrj in order to notify the disassembler when it's currently handling a
223*fae548d3Szrj different range than it was before. This prevent unsafe optimizations when
224*fae548d3Szrj disassembling such as the way mapping symbols are found on AArch64. */
225*fae548d3Szrj bfd_vma stop_offset;
226*fae548d3Szrj
227*fae548d3Szrj } disassemble_info;
228*fae548d3Szrj
229*fae548d3Szrj /* This struct is used to pass information about valid disassembler
230*fae548d3Szrj option arguments from the target to the generic GDB functions
231*fae548d3Szrj that set and display them. */
232*fae548d3Szrj
233*fae548d3Szrj typedef struct
234*fae548d3Szrj {
235*fae548d3Szrj /* Option argument name to use in descriptions. */
236*fae548d3Szrj const char *name;
237*fae548d3Szrj
238*fae548d3Szrj /* Vector of acceptable option argument values, NULL-terminated. */
239*fae548d3Szrj const char **values;
240*fae548d3Szrj } disasm_option_arg_t;
241*fae548d3Szrj
242*fae548d3Szrj /* This struct is used to pass information about valid disassembler
243*fae548d3Szrj options, their descriptions and arguments from the target to the
244*fae548d3Szrj generic GDB functions that set and display them. Options are
245*fae548d3Szrj defined by tuples of vector entries at each index. */
246*fae548d3Szrj
247*fae548d3Szrj typedef struct
248*fae548d3Szrj {
249*fae548d3Szrj /* Vector of option names, NULL-terminated. */
250*fae548d3Szrj const char **name;
251*fae548d3Szrj
252*fae548d3Szrj /* Vector of option descriptions or NULL if none to be shown. */
253*fae548d3Szrj const char **description;
254*fae548d3Szrj
255*fae548d3Szrj /* Vector of option argument information pointers or NULL if no
256*fae548d3Szrj option accepts an argument. NULL entries denote individual
257*fae548d3Szrj options that accept no argument. */
258*fae548d3Szrj const disasm_option_arg_t **arg;
259*fae548d3Szrj } disasm_options_t;
260*fae548d3Szrj
261*fae548d3Szrj /* This struct is used to pass information about valid disassembler
262*fae548d3Szrj options and arguments from the target to the generic GDB functions
263*fae548d3Szrj that set and display them. */
264*fae548d3Szrj
265*fae548d3Szrj typedef struct
266*fae548d3Szrj {
267*fae548d3Szrj /* Valid disassembler options. Individual options that support
268*fae548d3Szrj an argument will refer to entries in the ARGS vector. */
269*fae548d3Szrj disasm_options_t options;
270*fae548d3Szrj
271*fae548d3Szrj /* Vector of acceptable option arguments, NULL-terminated. This
272*fae548d3Szrj collects all possible option argument choices, some of which
273*fae548d3Szrj may be shared by different options from the OPTIONS member. */
274*fae548d3Szrj disasm_option_arg_t *args;
275*fae548d3Szrj } disasm_options_and_args_t;
276*fae548d3Szrj
277*fae548d3Szrj /* Standard disassemblers. Disassemble one instruction at the given
278*fae548d3Szrj target address. Return number of octets processed. */
279*fae548d3Szrj typedef int (*disassembler_ftype) (bfd_vma, disassemble_info *);
280*fae548d3Szrj
281*fae548d3Szrj /* Disassemblers used out side of opcodes library. */
282*fae548d3Szrj extern int print_insn_m32c (bfd_vma, disassemble_info *);
283*fae548d3Szrj extern int print_insn_mep (bfd_vma, disassemble_info *);
284*fae548d3Szrj extern int print_insn_s12z (bfd_vma, disassemble_info *);
285*fae548d3Szrj extern int print_insn_sh (bfd_vma, disassemble_info *);
286*fae548d3Szrj extern int print_insn_sparc (bfd_vma, disassemble_info *);
287*fae548d3Szrj extern int print_insn_rx (bfd_vma, disassemble_info *);
288*fae548d3Szrj extern int print_insn_rl78 (bfd_vma, disassemble_info *);
289*fae548d3Szrj extern int print_insn_rl78_g10 (bfd_vma, disassemble_info *);
290*fae548d3Szrj extern int print_insn_rl78_g13 (bfd_vma, disassemble_info *);
291*fae548d3Szrj extern int print_insn_rl78_g14 (bfd_vma, disassemble_info *);
292*fae548d3Szrj
293*fae548d3Szrj extern disassembler_ftype arc_get_disassembler (bfd *);
294*fae548d3Szrj extern disassembler_ftype cris_get_disassembler (bfd *);
295*fae548d3Szrj
296*fae548d3Szrj extern void print_aarch64_disassembler_options (FILE *);
297*fae548d3Szrj extern void print_i386_disassembler_options (FILE *);
298*fae548d3Szrj extern void print_mips_disassembler_options (FILE *);
299*fae548d3Szrj extern void print_nfp_disassembler_options (FILE *);
300*fae548d3Szrj extern void print_ppc_disassembler_options (FILE *);
301*fae548d3Szrj extern void print_riscv_disassembler_options (FILE *);
302*fae548d3Szrj extern void print_arm_disassembler_options (FILE *);
303*fae548d3Szrj extern void print_arc_disassembler_options (FILE *);
304*fae548d3Szrj extern void print_s390_disassembler_options (FILE *);
305*fae548d3Szrj extern void print_wasm32_disassembler_options (FILE *);
306*fae548d3Szrj extern bfd_boolean aarch64_symbol_is_valid (asymbol *, struct disassemble_info *);
307*fae548d3Szrj extern bfd_boolean arm_symbol_is_valid (asymbol *, struct disassemble_info *);
308*fae548d3Szrj extern bfd_boolean csky_symbol_is_valid (asymbol *, struct disassemble_info *);
309*fae548d3Szrj extern bfd_boolean riscv_symbol_is_valid (asymbol *, struct disassemble_info *);
310*fae548d3Szrj extern void disassemble_init_powerpc (struct disassemble_info *);
311*fae548d3Szrj extern void disassemble_init_s390 (struct disassemble_info *);
312*fae548d3Szrj extern void disassemble_init_wasm32 (struct disassemble_info *);
313*fae548d3Szrj extern void disassemble_init_nds32 (struct disassemble_info *);
314*fae548d3Szrj extern const disasm_options_and_args_t *disassembler_options_arm (void);
315*fae548d3Szrj extern const disasm_options_and_args_t *disassembler_options_mips (void);
316*fae548d3Szrj extern const disasm_options_and_args_t *disassembler_options_powerpc (void);
317*fae548d3Szrj extern const disasm_options_and_args_t *disassembler_options_s390 (void);
318*fae548d3Szrj
319*fae548d3Szrj /* Fetch the disassembler for a given architecture ARC, endianess (big
320*fae548d3Szrj endian if BIG is true), bfd_mach value MACH, and ABFD, if that support
321*fae548d3Szrj is available. ABFD may be NULL. */
322*fae548d3Szrj extern disassembler_ftype disassembler (enum bfd_architecture arc,
323*fae548d3Szrj bfd_boolean big, unsigned long mach,
324*fae548d3Szrj bfd *abfd);
325*fae548d3Szrj
326*fae548d3Szrj /* Amend the disassemble_info structure as necessary for the target architecture.
327*fae548d3Szrj Should only be called after initialising the info->arch field. */
328*fae548d3Szrj extern void disassemble_init_for_target (struct disassemble_info *);
329*fae548d3Szrj
330*fae548d3Szrj /* Tidy any memory allocated by targets, such as info->private_data. */
331*fae548d3Szrj extern void disassemble_free_target (struct disassemble_info *);
332*fae548d3Szrj
333*fae548d3Szrj /* Document any target specific options available from the disassembler. */
334*fae548d3Szrj extern void disassembler_usage (FILE *);
335*fae548d3Szrj
336*fae548d3Szrj /* Remove whitespace and consecutive commas. */
337*fae548d3Szrj extern char *remove_whitespace_and_extra_commas (char *);
338*fae548d3Szrj
339*fae548d3Szrj /* Like STRCMP, but treat ',' the same as '\0' so that we match
340*fae548d3Szrj strings like "foobar" against "foobar,xxyyzz,...". */
341*fae548d3Szrj extern int disassembler_options_cmp (const char *, const char *);
342*fae548d3Szrj
343*fae548d3Szrj /* A helper function for FOR_EACH_DISASSEMBLER_OPTION. */
344*fae548d3Szrj static inline const char *
next_disassembler_option(const char * options)345*fae548d3Szrj next_disassembler_option (const char *options)
346*fae548d3Szrj {
347*fae548d3Szrj const char *opt = strchr (options, ',');
348*fae548d3Szrj if (opt != NULL)
349*fae548d3Szrj opt++;
350*fae548d3Szrj return opt;
351*fae548d3Szrj }
352*fae548d3Szrj
353*fae548d3Szrj /* A macro for iterating over each comma separated option in OPTIONS. */
354*fae548d3Szrj #define FOR_EACH_DISASSEMBLER_OPTION(OPT, OPTIONS) \
355*fae548d3Szrj for ((OPT) = (OPTIONS); \
356*fae548d3Szrj (OPT) != NULL; \
357*fae548d3Szrj (OPT) = next_disassembler_option (OPT))
358*fae548d3Szrj
359*fae548d3Szrj
360*fae548d3Szrj /* This block of definitions is for particular callers who read instructions
361*fae548d3Szrj into a buffer before calling the instruction decoder. */
362*fae548d3Szrj
363*fae548d3Szrj /* Here is a function which callers may wish to use for read_memory_func.
364*fae548d3Szrj It gets bytes from a buffer. */
365*fae548d3Szrj extern int buffer_read_memory
366*fae548d3Szrj (bfd_vma, bfd_byte *, unsigned int, struct disassemble_info *);
367*fae548d3Szrj
368*fae548d3Szrj /* This function goes with buffer_read_memory.
369*fae548d3Szrj It prints a message using info->fprintf_func and info->stream. */
370*fae548d3Szrj extern void perror_memory (int, bfd_vma, struct disassemble_info *);
371*fae548d3Szrj
372*fae548d3Szrj
373*fae548d3Szrj /* Just print the address in hex. This is included for completeness even
374*fae548d3Szrj though both GDB and objdump provide their own (to print symbolic
375*fae548d3Szrj addresses). */
376*fae548d3Szrj extern void generic_print_address
377*fae548d3Szrj (bfd_vma, struct disassemble_info *);
378*fae548d3Szrj
379*fae548d3Szrj /* Always true. */
380*fae548d3Szrj extern int generic_symbol_at_address
381*fae548d3Szrj (bfd_vma, struct disassemble_info *);
382*fae548d3Szrj
383*fae548d3Szrj /* Also always true. */
384*fae548d3Szrj extern bfd_boolean generic_symbol_is_valid
385*fae548d3Szrj (asymbol *, struct disassemble_info *);
386*fae548d3Szrj
387*fae548d3Szrj /* Method to initialize a disassemble_info struct. This should be
388*fae548d3Szrj called by all applications creating such a struct. */
389*fae548d3Szrj extern void init_disassemble_info (struct disassemble_info *dinfo, void *stream,
390*fae548d3Szrj fprintf_ftype fprintf_func);
391*fae548d3Szrj
392*fae548d3Szrj /* For compatibility with existing code. */
393*fae548d3Szrj #define INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC) \
394*fae548d3Szrj init_disassemble_info (&(INFO), (STREAM), (fprintf_ftype) (FPRINTF_FUNC))
395*fae548d3Szrj
396*fae548d3Szrj #ifdef __cplusplus
397*fae548d3Szrj }
398*fae548d3Szrj #endif
399*fae548d3Szrj
400*fae548d3Szrj #endif /* ! defined (DIS_ASM_H) */
401