position.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* $Id$ */
  2. /* maps from address to filename-lineno pair and reverse,
  3. maps from filename-lineno pair or address to scope.
  4. */
  5. typedef unsigned int t_lineno;
  6. typedef long t_addr;
  7. #define ILL_ADDR ((t_addr) -1)
  8. #define NO_ADDR ((t_addr) 0)
  9. typedef struct pos {
  10. t_lineno lineno;
  11. char *filename;
  12. } t_position, *p_position;
  13. /* extern p_position get_position_from_addr(t_addr t);
  14. Returns a pointer to a structure containing the source position of the code
  15. at address 't'. 0 is returned if no source position could be found.
  16. */
  17. extern p_position get_position_from_addr();
  18. /* extern t_addr get_addr_from_position(p_position p);
  19. Returns the address of the code at position 'p', or ILL_ADDR if it could
  20. not be found. If there is no symbolic information for the filename in
  21. position 'p', an error message will be given.
  22. */
  23. extern t_addr get_addr_from_position();
  24. /* extern add_position_addr(char *filename, struct outname *n);
  25. Adds the ('filename','n'->on_desc),'n'->on_valu pair to the mapping information.
  26. */
  27. extern add_position_addr();
  28. /* extern p_position print_position(t_addr a, int print_function);
  29. Prints position 'a' and returns it. If 'print_function' is set,
  30. an attempt is made to print the function name as well.
  31. */
  32. extern p_position print_position();