Updated Malay translation for the bfd sub-directory
[binutils-gdb.git] / opcodes / disassemble.c
blobb6ab3fbf6a81cf13108836ddfb57eaf397773a78
1 /* Select disassembly routine for specified architecture.
2 Copyright (C) 1994-2025 Free Software Foundation, Inc.
4 This file is part of the GNU opcodes library.
6 This library is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
21 #include "sysdep.h"
22 #include "disassemble.h"
23 #include "safe-ctype.h"
24 #include "opintl.h"
26 #ifdef ARCH_all
27 #ifdef BFD64
28 #define ARCH_aarch64
29 #define ARCH_alpha
30 #define ARCH_bpf
31 #define ARCH_ia64
32 #define ARCH_loongarch
33 #define ARCH_mips
34 #define ARCH_mmix
35 #define ARCH_nfp
36 #define ARCH_riscv
37 #define ARCH_score
38 #define ARCH_tilegx
39 #endif
40 #define ARCH_arc
41 #define ARCH_arm
42 #define ARCH_avr
43 #define ARCH_bfin
44 #define ARCH_cr16
45 #define ARCH_cris
46 #define ARCH_crx
47 #define ARCH_csky
48 #define ARCH_d10v
49 #define ARCH_d30v
50 #define ARCH_dlx
51 #define ARCH_epiphany
52 #define ARCH_fr30
53 #define ARCH_frv
54 #define ARCH_ft32
55 #define ARCH_h8300
56 #define ARCH_hppa
57 #define ARCH_i386
58 #define ARCH_ip2k
59 #define ARCH_iq2000
60 #define ARCH_kvx
61 #define ARCH_lm32
62 #define ARCH_m32c
63 #define ARCH_m32r
64 #define ARCH_m68hc11
65 #define ARCH_m68hc12
66 #define ARCH_m68k
67 #define ARCH_mcore
68 #define ARCH_mep
69 #define ARCH_metag
70 #define ARCH_microblaze
71 #define ARCH_mn10200
72 #define ARCH_mn10300
73 #define ARCH_moxie
74 #define ARCH_mt
75 #define ARCH_msp430
76 #define ARCH_nds32
77 #define ARCH_ns32k
78 #define ARCH_or1k
79 #define ARCH_pdp11
80 #define ARCH_pj
81 #define ARCH_powerpc
82 #define ARCH_pru
83 #define ARCH_rs6000
84 #define ARCH_rl78
85 #define ARCH_rx
86 #define ARCH_s12z
87 #define ARCH_s390
88 #define ARCH_sh
89 #define ARCH_sparc
90 #define ARCH_spu
91 #define ARCH_tic30
92 #define ARCH_tic4x
93 #define ARCH_tic54x
94 #define ARCH_tic6x
95 #define ARCH_tilepro
96 #define ARCH_v850
97 #define ARCH_vax
98 #define ARCH_visium
99 #define ARCH_wasm32
100 #define ARCH_xstormy16
101 #define ARCH_xgate
102 #define ARCH_xtensa
103 #define ARCH_z80
104 #define ARCH_z8k
105 #endif
107 #ifdef ARCH_m32c
108 #include "m32c-desc.h"
109 #endif
111 disassembler_ftype
112 disassembler (enum bfd_architecture a,
113 bool big ATTRIBUTE_UNUSED,
114 unsigned long mach ATTRIBUTE_UNUSED,
115 bfd *abfd ATTRIBUTE_UNUSED)
117 disassembler_ftype disassemble;
119 switch (a)
121 /* If you add a case to this table, also add it to the
122 ARCH_all definition right above this function. */
123 #ifdef ARCH_aarch64
124 case bfd_arch_aarch64:
125 disassemble = print_insn_aarch64;
126 break;
127 #endif
128 #ifdef ARCH_alpha
129 case bfd_arch_alpha:
130 disassemble = print_insn_alpha;
131 break;
132 #endif
133 #ifdef ARCH_arc
134 case bfd_arch_arc:
135 disassemble = arc_get_disassembler (abfd);
136 break;
137 #endif
138 #ifdef ARCH_arm
139 case bfd_arch_arm:
140 if (big)
141 disassemble = print_insn_big_arm;
142 else
143 disassemble = print_insn_little_arm;
144 break;
145 #endif
146 #ifdef ARCH_avr
147 case bfd_arch_avr:
148 disassemble = print_insn_avr;
149 break;
150 #endif
151 #ifdef ARCH_bfin
152 case bfd_arch_bfin:
153 disassemble = print_insn_bfin;
154 break;
155 #endif
156 #ifdef ARCH_cr16
157 case bfd_arch_cr16:
158 disassemble = print_insn_cr16;
159 break;
160 #endif
161 #ifdef ARCH_cris
162 case bfd_arch_cris:
163 disassemble = cris_get_disassembler (abfd);
164 break;
165 #endif
166 #ifdef ARCH_crx
167 case bfd_arch_crx:
168 disassemble = print_insn_crx;
169 break;
170 #endif
171 #ifdef ARCH_csky
172 case bfd_arch_csky:
173 disassemble = csky_get_disassembler (abfd);
174 break;
175 #endif
177 #ifdef ARCH_d10v
178 case bfd_arch_d10v:
179 disassemble = print_insn_d10v;
180 break;
181 #endif
182 #ifdef ARCH_d30v
183 case bfd_arch_d30v:
184 disassemble = print_insn_d30v;
185 break;
186 #endif
187 #ifdef ARCH_dlx
188 case bfd_arch_dlx:
189 /* As far as I know we only handle big-endian DLX objects. */
190 disassemble = print_insn_dlx;
191 break;
192 #endif
193 #ifdef ARCH_h8300
194 case bfd_arch_h8300:
195 if (mach == bfd_mach_h8300h || mach == bfd_mach_h8300hn)
196 disassemble = print_insn_h8300h;
197 else if (mach == bfd_mach_h8300s
198 || mach == bfd_mach_h8300sn
199 || mach == bfd_mach_h8300sx
200 || mach == bfd_mach_h8300sxn)
201 disassemble = print_insn_h8300s;
202 else
203 disassemble = print_insn_h8300;
204 break;
205 #endif
206 #ifdef ARCH_hppa
207 case bfd_arch_hppa:
208 disassemble = print_insn_hppa;
209 break;
210 #endif
211 #ifdef ARCH_i386
212 case bfd_arch_i386:
213 case bfd_arch_iamcu:
214 disassemble = print_insn_i386;
215 break;
216 #endif
217 #ifdef ARCH_ia64
218 case bfd_arch_ia64:
219 disassemble = print_insn_ia64;
220 break;
221 #endif
222 #ifdef ARCH_ip2k
223 case bfd_arch_ip2k:
224 disassemble = print_insn_ip2k;
225 break;
226 #endif
227 #ifdef ARCH_bpf
228 case bfd_arch_bpf:
229 disassemble = print_insn_bpf;
230 break;
231 #endif
232 #ifdef ARCH_epiphany
233 case bfd_arch_epiphany:
234 disassemble = print_insn_epiphany;
235 break;
236 #endif
237 #ifdef ARCH_fr30
238 case bfd_arch_fr30:
239 disassemble = print_insn_fr30;
240 break;
241 #endif
242 #ifdef ARCH_kvx
243 case bfd_arch_kvx:
244 disassemble = print_insn_kvx;
245 break;
246 #endif
247 #ifdef ARCH_lm32
248 case bfd_arch_lm32:
249 disassemble = print_insn_lm32;
250 break;
251 #endif
252 #ifdef ARCH_m32r
253 case bfd_arch_m32r:
254 disassemble = print_insn_m32r;
255 break;
256 #endif
257 #if defined(ARCH_m68hc11) || defined(ARCH_m68hc12) \
258 || defined(ARCH_9s12x) || defined(ARCH_m9s12xg)
259 case bfd_arch_m68hc11:
260 disassemble = print_insn_m68hc11;
261 break;
262 case bfd_arch_m68hc12:
263 disassemble = print_insn_m68hc12;
264 break;
265 case bfd_arch_m9s12x:
266 disassemble = print_insn_m9s12x;
267 break;
268 case bfd_arch_m9s12xg:
269 disassemble = print_insn_m9s12xg;
270 break;
271 #endif
272 #if defined(ARCH_s12z)
273 case bfd_arch_s12z:
274 disassemble = print_insn_s12z;
275 break;
276 #endif
277 #ifdef ARCH_m68k
278 case bfd_arch_m68k:
279 disassemble = print_insn_m68k;
280 break;
281 #endif
282 #ifdef ARCH_mt
283 case bfd_arch_mt:
284 disassemble = print_insn_mt;
285 break;
286 #endif
287 #ifdef ARCH_microblaze
288 case bfd_arch_microblaze:
289 disassemble = print_insn_microblaze;
290 break;
291 #endif
292 #ifdef ARCH_msp430
293 case bfd_arch_msp430:
294 disassemble = print_insn_msp430;
295 break;
296 #endif
297 #ifdef ARCH_nds32
298 case bfd_arch_nds32:
299 disassemble = print_insn_nds32;
300 break;
301 #endif
302 #ifdef ARCH_nfp
303 case bfd_arch_nfp:
304 disassemble = print_insn_nfp;
305 break;
306 #endif
307 #ifdef ARCH_ns32k
308 case bfd_arch_ns32k:
309 disassemble = print_insn_ns32k;
310 break;
311 #endif
312 #ifdef ARCH_mcore
313 case bfd_arch_mcore:
314 disassemble = print_insn_mcore;
315 break;
316 #endif
317 #ifdef ARCH_mep
318 case bfd_arch_mep:
319 disassemble = print_insn_mep;
320 break;
321 #endif
322 #ifdef ARCH_metag
323 case bfd_arch_metag:
324 disassemble = print_insn_metag;
325 break;
326 #endif
327 #ifdef ARCH_mips
328 case bfd_arch_mips:
329 if (big)
330 disassemble = print_insn_big_mips;
331 else
332 disassemble = print_insn_little_mips;
333 break;
334 #endif
335 #ifdef ARCH_mmix
336 case bfd_arch_mmix:
337 disassemble = print_insn_mmix;
338 break;
339 #endif
340 #ifdef ARCH_mn10200
341 case bfd_arch_mn10200:
342 disassemble = print_insn_mn10200;
343 break;
344 #endif
345 #ifdef ARCH_mn10300
346 case bfd_arch_mn10300:
347 disassemble = print_insn_mn10300;
348 break;
349 #endif
350 #ifdef ARCH_or1k
351 case bfd_arch_or1k:
352 disassemble = print_insn_or1k;
353 break;
354 #endif
355 #ifdef ARCH_pdp11
356 case bfd_arch_pdp11:
357 disassemble = print_insn_pdp11;
358 break;
359 #endif
360 #ifdef ARCH_pj
361 case bfd_arch_pj:
362 disassemble = print_insn_pj;
363 break;
364 #endif
365 #ifdef ARCH_powerpc
366 case bfd_arch_powerpc:
367 #endif
368 #ifdef ARCH_rs6000
369 case bfd_arch_rs6000:
370 #endif
371 #if defined ARCH_powerpc || defined ARCH_rs6000
372 if (big)
373 disassemble = print_insn_big_powerpc;
374 else
375 disassemble = print_insn_little_powerpc;
376 break;
377 #endif
378 #ifdef ARCH_pru
379 case bfd_arch_pru:
380 disassemble = print_insn_pru;
381 break;
382 #endif
383 #ifdef ARCH_riscv
384 case bfd_arch_riscv:
385 disassemble = riscv_get_disassembler (abfd);
386 break;
387 #endif
388 #ifdef ARCH_rl78
389 case bfd_arch_rl78:
390 disassemble = rl78_get_disassembler (abfd);
391 break;
392 #endif
393 #ifdef ARCH_rx
394 case bfd_arch_rx:
395 disassemble = print_insn_rx;
396 break;
397 #endif
398 #ifdef ARCH_s390
399 case bfd_arch_s390:
400 disassemble = print_insn_s390;
401 break;
402 #endif
403 #ifdef ARCH_score
404 case bfd_arch_score:
405 if (big)
406 disassemble = print_insn_big_score;
407 else
408 disassemble = print_insn_little_score;
409 break;
410 #endif
411 #ifdef ARCH_sh
412 case bfd_arch_sh:
413 disassemble = print_insn_sh;
414 break;
415 #endif
416 #ifdef ARCH_sparc
417 case bfd_arch_sparc:
418 disassemble = print_insn_sparc;
419 break;
420 #endif
421 #ifdef ARCH_spu
422 case bfd_arch_spu:
423 disassemble = print_insn_spu;
424 break;
425 #endif
426 #ifdef ARCH_tic30
427 case bfd_arch_tic30:
428 disassemble = print_insn_tic30;
429 break;
430 #endif
431 #ifdef ARCH_tic4x
432 case bfd_arch_tic4x:
433 disassemble = print_insn_tic4x;
434 break;
435 #endif
436 #ifdef ARCH_tic54x
437 case bfd_arch_tic54x:
438 disassemble = print_insn_tic54x;
439 break;
440 #endif
441 #ifdef ARCH_tic6x
442 case bfd_arch_tic6x:
443 disassemble = print_insn_tic6x;
444 break;
445 #endif
446 #ifdef ARCH_ft32
447 case bfd_arch_ft32:
448 disassemble = print_insn_ft32;
449 break;
450 #endif
451 #ifdef ARCH_v850
452 case bfd_arch_v850:
453 case bfd_arch_v850_rh850:
454 disassemble = print_insn_v850;
455 break;
456 #endif
457 #ifdef ARCH_wasm32
458 case bfd_arch_wasm32:
459 disassemble = print_insn_wasm32;
460 break;
461 #endif
462 #ifdef ARCH_xgate
463 case bfd_arch_xgate:
464 disassemble = print_insn_xgate;
465 break;
466 #endif
467 #ifdef ARCH_xstormy16
468 case bfd_arch_xstormy16:
469 disassemble = print_insn_xstormy16;
470 break;
471 #endif
472 #ifdef ARCH_xtensa
473 case bfd_arch_xtensa:
474 disassemble = print_insn_xtensa;
475 break;
476 #endif
477 #ifdef ARCH_z80
478 case bfd_arch_z80:
479 disassemble = print_insn_z80;
480 break;
481 #endif
482 #ifdef ARCH_z8k
483 case bfd_arch_z8k:
484 if (mach == bfd_mach_z8001)
485 disassemble = print_insn_z8001;
486 else
487 disassemble = print_insn_z8002;
488 break;
489 #endif
490 #ifdef ARCH_vax
491 case bfd_arch_vax:
492 disassemble = print_insn_vax;
493 break;
494 #endif
495 #ifdef ARCH_visium
496 case bfd_arch_visium:
497 disassemble = print_insn_visium;
498 break;
499 #endif
500 #ifdef ARCH_frv
501 case bfd_arch_frv:
502 disassemble = print_insn_frv;
503 break;
504 #endif
505 #ifdef ARCH_moxie
506 case bfd_arch_moxie:
507 disassemble = print_insn_moxie;
508 break;
509 #endif
510 #ifdef ARCH_iq2000
511 case bfd_arch_iq2000:
512 disassemble = print_insn_iq2000;
513 break;
514 #endif
515 #ifdef ARCH_m32c
516 case bfd_arch_m32c:
517 disassemble = print_insn_m32c;
518 break;
519 #endif
520 #ifdef ARCH_tilegx
521 case bfd_arch_tilegx:
522 disassemble = print_insn_tilegx;
523 break;
524 #endif
525 #ifdef ARCH_tilepro
526 case bfd_arch_tilepro:
527 disassemble = print_insn_tilepro;
528 break;
529 #endif
530 #ifdef ARCH_loongarch
531 case bfd_arch_loongarch:
532 disassemble = print_insn_loongarch;
533 break;
534 #endif
535 default:
536 return 0;
538 return disassemble;
541 void
542 disassembler_usage (FILE *stream ATTRIBUTE_UNUSED)
544 #ifdef ARCH_aarch64
545 print_aarch64_disassembler_options (stream);
546 #endif
547 #ifdef ARCH_arc
548 print_arc_disassembler_options (stream);
549 #endif
550 #ifdef ARCH_arm
551 print_arm_disassembler_options (stream);
552 #endif
553 #ifdef ARCH_mips
554 print_mips_disassembler_options (stream);
555 #endif
556 #ifdef ARCH_nfp
557 print_nfp_disassembler_options (stream);
558 #endif
559 #ifdef ARCH_powerpc
560 print_ppc_disassembler_options (stream);
561 #endif
562 #ifdef ARCH_riscv
563 print_riscv_disassembler_options (stream);
564 #endif
565 #ifdef ARCH_i386
566 print_i386_disassembler_options (stream);
567 #endif
568 #ifdef ARCH_kvx
569 print_kvx_disassembler_options (stream);
570 #endif
571 #ifdef ARCH_s390
572 print_s390_disassembler_options (stream);
573 #endif
574 #ifdef ARCH_wasm32
575 print_wasm32_disassembler_options (stream);
576 #endif
577 #ifdef ARCH_loongarch
578 print_loongarch_disassembler_options (stream);
579 #endif
580 #ifdef ARCH_bpf
581 print_bpf_disassembler_options (stream);
582 #endif
583 return;
586 void
587 disassemble_init_for_target (struct disassemble_info * info)
589 if (info == NULL)
590 return;
592 switch (info->arch)
594 #ifdef ARCH_aarch64
595 case bfd_arch_aarch64:
596 info->symbol_is_valid = aarch64_symbol_is_valid;
597 info->disassembler_needs_relocs = true;
598 info->created_styled_output = true;
599 break;
600 #endif
601 #ifdef ARCH_arc
602 case bfd_arch_arc:
603 info->created_styled_output = true;
604 break;
605 #endif
606 #ifdef ARCH_arm
607 case bfd_arch_arm:
608 info->symbol_is_valid = arm_symbol_is_valid;
609 info->disassembler_needs_relocs = true;
610 info->created_styled_output = true;
611 break;
612 #endif
613 #ifdef ARCH_avr
614 case bfd_arch_avr:
615 info->created_styled_output = true;
616 break;
617 #endif
618 #ifdef ARCH_csky
619 case bfd_arch_csky:
620 info->symbol_is_valid = csky_symbol_is_valid;
621 info->disassembler_needs_relocs = true;
622 break;
623 #endif
624 #ifdef ARCH_i386
625 case bfd_arch_i386:
626 case bfd_arch_iamcu:
627 info->created_styled_output = true;
628 break;
629 #endif
630 #ifdef ARCH_ia64
631 case bfd_arch_ia64:
632 info->skip_zeroes = 16;
633 break;
634 #endif
635 #ifdef ARCH_loongarch
636 case bfd_arch_loongarch:
637 info->created_styled_output = true;
638 break;
639 #endif
640 #ifdef ARCH_tic4x
641 case bfd_arch_tic4x:
642 info->skip_zeroes = 32;
643 break;
644 #endif
645 #ifdef ARCH_m68k
646 case bfd_arch_m68k:
647 info->created_styled_output = true;
648 break;
649 #endif
650 #ifdef ARCH_mep
651 case bfd_arch_mep:
652 info->skip_zeroes = 256;
653 info->skip_zeroes_at_end = 0;
654 break;
655 #endif
656 #ifdef ARCH_metag
657 case bfd_arch_metag:
658 info->disassembler_needs_relocs = true;
659 break;
660 #endif
661 #ifdef ARCH_mips
662 case bfd_arch_mips:
663 info->created_styled_output = true;
664 break;
665 #endif
666 #ifdef ARCH_m32c
667 case bfd_arch_m32c:
668 /* This processor in fact is little endian. The value set here
669 reflects the way opcodes are written in the cgen description. */
670 info->endian = BFD_ENDIAN_BIG;
671 if (!info->private_data)
673 info->private_data = cgen_bitset_create (ISA_MAX);
674 if (info->mach == bfd_mach_m16c)
675 cgen_bitset_set (info->private_data, ISA_M16C);
676 else
677 cgen_bitset_set (info->private_data, ISA_M32C);
679 break;
680 #endif
681 #ifdef ARCH_bpf
682 case bfd_arch_bpf:
683 info->created_styled_output = true;
684 break;
685 #endif
686 #ifdef ARCH_pru
687 case bfd_arch_pru:
688 info->disassembler_needs_relocs = true;
689 break;
690 #endif
691 #ifdef ARCH_powerpc
692 case bfd_arch_powerpc:
693 #endif
694 #ifdef ARCH_rs6000
695 case bfd_arch_rs6000:
696 #endif
697 #if defined (ARCH_powerpc) || defined (ARCH_rs6000)
698 disassemble_init_powerpc (info);
699 info->created_styled_output = true;
700 break;
701 #endif
702 #ifdef ARCH_riscv
703 case bfd_arch_riscv:
704 info->symbol_is_valid = riscv_symbol_is_valid;
705 info->created_styled_output = true;
706 break;
707 #endif
708 #ifdef ARCH_wasm32
709 case bfd_arch_wasm32:
710 disassemble_init_wasm32 (info);
711 break;
712 #endif
713 #ifdef ARCH_s390
714 case bfd_arch_s390:
715 disassemble_init_s390 (info);
716 info->created_styled_output = true;
717 break;
718 #endif
719 #ifdef ARCH_nds32
720 case bfd_arch_nds32:
721 disassemble_init_nds32 (info);
722 break;
723 #endif
724 default:
725 break;
729 void
730 disassemble_free_target (struct disassemble_info *info)
732 if (info == NULL)
733 return;
735 switch (info->arch)
737 default:
738 return;
740 #ifdef ARCH_m32c
741 case bfd_arch_m32c:
742 #endif
743 #if defined ARCH_m32c
744 if (info->private_data)
746 CGEN_BITSET *mask = info->private_data;
747 free (mask->bits);
749 break;
750 #endif
752 #ifdef ARCH_arc
753 case bfd_arch_arc:
754 break;
755 #endif
756 #ifdef ARCH_cris
757 case bfd_arch_cris:
758 break;
759 #endif
760 #ifdef ARCH_mmix
761 case bfd_arch_mmix:
762 break;
763 #endif
764 #ifdef ARCH_nfp
765 case bfd_arch_nfp:
766 break;
767 #endif
768 #ifdef ARCH_powerpc
769 case bfd_arch_powerpc:
770 break;
771 #endif
772 #ifdef ARCH_riscv
773 case bfd_arch_riscv:
774 disassemble_free_riscv (info);
775 break;
776 #endif
777 #ifdef ARCH_rs6000
778 case bfd_arch_rs6000:
779 break;
780 #endif
783 free (info->private_data);
786 /* Remove whitespace and consecutive commas from OPTIONS. */
788 char *
789 remove_whitespace_and_extra_commas (char *options)
791 char *str;
792 size_t i, len;
794 if (options == NULL)
795 return NULL;
797 /* Strip off all trailing whitespace and commas. */
798 for (len = strlen (options); len > 0; len--)
800 if (!ISSPACE (options[len - 1]) && options[len - 1] != ',')
801 break;
802 options[len - 1] = '\0';
805 /* Convert all remaining whitespace to commas. */
806 for (i = 0; options[i] != '\0'; i++)
807 if (ISSPACE (options[i]))
808 options[i] = ',';
810 /* Remove consecutive commas. */
811 for (str = options; *str != '\0'; str++)
812 if (*str == ',' && (*(str + 1) == ',' || str == options))
814 char *next = str + 1;
815 while (*next == ',')
816 next++;
817 len = strlen (next);
818 if (str != options)
819 str++;
820 memmove (str, next, len);
821 next[len - (size_t)(next - str)] = '\0';
823 return (strlen (options) != 0) ? options : NULL;
826 /* Like STRCMP, but treat ',' the same as '\0' so that we match
827 strings like "foobar" against "foobar,xxyyzz,...". */
830 disassembler_options_cmp (const char *s1, const char *s2)
832 unsigned char c1, c2;
836 c1 = (unsigned char) *s1++;
837 if (c1 == ',')
838 c1 = '\0';
839 c2 = (unsigned char) *s2++;
840 if (c2 == ',')
841 c2 = '\0';
842 if (c1 == '\0')
843 return c1 - c2;
845 while (c1 == c2);
847 return c1 - c2;
850 void
851 opcodes_assert (const char *file, int line)
853 opcodes_error_handler (_("assertion fail %s:%d"), file, line);
854 opcodes_error_handler (_("Please report this bug"));
855 abort ();
858 /* Set the stream, and the styled and unstyled printf functions within
859 INFO. */
861 void
862 disassemble_set_printf (struct disassemble_info *info, void *stream,
863 fprintf_ftype unstyled_printf,
864 fprintf_styled_ftype styled_printf)
866 info->stream = stream;
867 info->fprintf_func = unstyled_printf;
868 info->fprintf_styled_func = styled_printf;