| 1 |
(* m2linemap.def provides access to GCC location_t functions. |
| 2 |
|
| 3 |
Copyright (C) 2011-2025 Free Software Foundation, Inc. |
| 4 |
Contributed by Gaius Mulley <[email protected]>. |
| 5 |
|
| 6 |
This file is part of GNU Modula-2. |
| 7 |
|
| 8 |
GNU Modula-2 is free software; you can redistribute it and/or modify |
| 9 |
it under the terms of the GNU General Public License as published by |
| 10 |
the Free Software Foundation; either version 3, or (at your option) |
| 11 |
any later version. |
| 12 |
|
| 13 |
GNU Modula-2 is distributed in the hope that it will be useful, but |
| 14 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 |
General Public License for more details. |
| 17 |
|
| 18 |
You should have received a copy of the GNU General Public License |
| 19 |
along with GNU Modula-2; see the file COPYING3. If not see |
| 20 |
<http://www.gnu.org/licenses/>. *) |
| 21 |
|
| 22 |
DEFINITION MODULE FOR "C" m2linemap ; |
| 23 |
|
| 24 |
FROM SYSTEM IMPORT ADDRESS ; |
| 25 |
FROM gcctypes IMPORT location_t ; |
| 26 |
|
| 27 |
EXPORT QUALIFIED StartFile, EndFile, StartLine, GetLocationColumn, GetLocationRange, |
| 28 |
GetLocationBinary, UnknownLocation, BuiltinsLocation, |
| 29 |
GetLineNoFromLocation, GetColumnNoFromLocation, |
| 30 |
GetFilenameFromLocation, ErrorAt, ErrorAtf, |
| 31 |
WarningAtf, NoteAtf, internal_error ; |
| 32 |
|
| 33 |
|
| 34 |
PROCEDURE StartFile (filename: ADDRESS; linebegin: CARDINAL) ; |
| 35 |
PROCEDURE EndFile ; |
| 36 |
PROCEDURE StartLine (linenumber: CARDINAL; linesize: CARDINAL) ; |
| 37 |
PROCEDURE GetLocationColumn (column: CARDINAL) : location_t ; |
| 38 |
PROCEDURE GetLocationRange (start, end: CARDINAL) : location_t ; |
| 39 |
PROCEDURE GetLocationBinary (caret, left, right: location_t) : location_t ; |
| 40 |
|
| 41 |
PROCEDURE UnknownLocation () : location_t ; |
| 42 |
PROCEDURE BuiltinsLocation () : location_t ; |
| 43 |
|
| 44 |
PROCEDURE GetLineNoFromLocation (location: location_t) : INTEGER ; |
| 45 |
PROCEDURE GetColumnNoFromLocation (location: location_t) : INTEGER ; |
| 46 |
PROCEDURE GetFilenameFromLocation (location: location_t) : ADDRESS ; |
| 47 |
PROCEDURE ErrorAt (location: location_t; message: ADDRESS) ; |
| 48 |
PROCEDURE ErrorAtf (location: location_t; message: ADDRESS) ; |
| 49 |
PROCEDURE WarningAtf (location: location_t; message: ADDRESS) ; |
| 50 |
PROCEDURE NoteAtf (location: location_t; message: ADDRESS) ; |
| 51 |
PROCEDURE internal_error (message: ADDRESS) ; |
| 52 |
|
| 53 |
|
| 54 |
END m2linemap. |