ecoff.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /* ecoff.h -- header file for ECOFF debugging support
  2. Copyright (C) 1993-2022 Free Software Foundation, Inc.
  3. Contributed by Cygnus Support.
  4. Put together by Ian Lance Taylor <ian@cygnus.com>.
  5. This file is part of GAS, the GNU Assembler.
  6. GAS 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, or (at your option)
  9. any later version.
  10. GAS is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with GAS; see the file COPYING. If not, write to the Free
  16. Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
  17. 02110-1301, USA. */
  18. #ifndef GAS_ECOFF_H
  19. #define GAS_ECOFF_H
  20. #ifdef ECOFF_DEBUGGING
  21. #include "coff/sym.h"
  22. #include "coff/ecoff.h"
  23. /* Whether we have seen any ECOFF debugging information. */
  24. extern int ecoff_debugging_seen;
  25. /* This function should be called at the start of assembly, by
  26. obj_read_begin_hook. */
  27. extern void ecoff_read_begin_hook (void);
  28. /* This function should be called when the assembler switches to a new
  29. file. */
  30. extern void ecoff_new_file (const char *, int);
  31. /* This function should be called when a new symbol is created, by
  32. obj_symbol_new_hook. */
  33. extern void ecoff_symbol_new_hook (symbolS *);
  34. extern void ecoff_symbol_clone_hook (symbolS *, symbolS *);
  35. /* This function should be called by the obj_frob_symbol hook. */
  36. extern void ecoff_frob_symbol (symbolS *);
  37. /* Build the ECOFF debugging information. This should be called by
  38. obj_frob_file. This fills in the counts in *HDR; the offsets are
  39. filled in relative to the start of the *BUFP. It sets *BUFP to a
  40. block of memory holding the debugging information. It returns the
  41. length of *BUFP. */
  42. extern unsigned long ecoff_build_debug
  43. (HDRR *hdr, char **bufp, const struct ecoff_debug_swap *);
  44. /* Functions to handle the ECOFF debugging directives. */
  45. extern void ecoff_directive_begin (int);
  46. extern void ecoff_directive_bend (int);
  47. extern void ecoff_directive_end (int);
  48. extern void ecoff_directive_ent (int);
  49. extern void ecoff_directive_fmask (int);
  50. extern void ecoff_directive_frame (int);
  51. extern void ecoff_directive_loc (int);
  52. extern void ecoff_directive_mask (int);
  53. /* Other ECOFF directives. */
  54. extern void ecoff_directive_extern (int);
  55. extern void ecoff_directive_weakext (int);
  56. /* Functions to handle the COFF debugging directives. */
  57. extern void ecoff_directive_def (int);
  58. extern void ecoff_directive_dim (int);
  59. extern void ecoff_directive_endef (int);
  60. extern void ecoff_directive_file (int);
  61. extern void ecoff_directive_scl (int);
  62. extern void ecoff_directive_size (int);
  63. extern void ecoff_directive_tag (int);
  64. extern void ecoff_directive_type (int);
  65. extern void ecoff_directive_val (int);
  66. /* Handle stabs. */
  67. extern void ecoff_stab (segT sec, int what, const char *string,
  68. int type, int other, int desc);
  69. /* Set the GP prologue size. */
  70. extern void ecoff_set_gp_prolog_size (int sz);
  71. /* This routine is called from the ECOFF code to set the external
  72. information for a symbol. */
  73. #ifndef obj_ecoff_set_ext
  74. extern void obj_ecoff_set_ext (symbolS *, EXTR *);
  75. #endif
  76. /* This routine is used to patch up a line number directive when
  77. instructions are moved around. */
  78. extern void ecoff_fix_loc (fragS *, unsigned long);
  79. /* This function is called from read.c to peek at cur_file_ptr. */
  80. extern int ecoff_no_current_file (void);
  81. /* This function returns the symbol associated with the current proc. */
  82. extern symbolS *ecoff_get_cur_proc_sym (void);
  83. #endif /* ECOFF_DEBUGGING */
  84. /* This routine is called from read.c to generate line number for .s file. */
  85. extern void ecoff_generate_asm_lineno (void);
  86. #endif /* ! GAS_ECOFF_H */