ppheap.pas 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. {
  2. $Id$
  3. Copyright (c) 1993-98 by FPC development team
  4. Simple unit to add source line and column to each
  5. memory allocation made with heaptrc unit
  6. This program 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 2 of the License, or
  9. (at your option) any later version.
  10. This program 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 this program; if not, write to the Free Software
  16. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. ****************************************************************************}
  18. unit ppheap;
  19. interface
  20. uses heaptrc;
  21. implementation
  22. uses
  23. globals,files;
  24. procedure ppextra_info(p : pointer);
  25. begin
  26. longint(p^):=aktfilepos.line;
  27. plongint(cardinal(p)+4)^:=aktfilepos.column;
  28. plongint(cardinal(p)+8)^:=current_module^.unit_index*100000+aktfilepos.fileindex;
  29. end;
  30. begin
  31. set_extra_info(12,ppextra_info);
  32. end.