Bug 13350 - Units to Sources Mapping Files
Summary: Units to Sources Mapping Files
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 3.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-08 06:45 UTC by Alexis Wilke
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target: i386-redhat-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Wilke 2003-12-08 06:45:37 UTC
Trying to have sources in ADA is seperate folders. I ran in the rather
common problem of telling the compiler where it will find the units.

Reading the doc, I found the "Units to Sources Mapping Files" where
you speak of "PATH" instead of "PATH and FILENAME" (also, in your
example you show a fully qualified path when relative paths are
acceptable).

Anyway, the following is the output if the destination "PATH" is
a "PATH" per my definition (i.e. not a path + filename). My map
was only including ".." for the path (Actually, you have the filename
on the 2nd line of the map file!!!)

Finally, reading the doc. I thought you needed one file map, not
one per specifiction and body (i.e. a map file can include only
three line, the following three lines are ignored).

Thought the compiler shouldn't crash but instead say nicely
that it expected a filename, I think the doc. could be slightly
improved.

Hope this help.

Alexis Wilke



gcc -c -gnatemgnat.map tst_prgfile.adb
+===========================GNAT BUG DETECTED==============================+
| 3.2 20020903 (3.2-7) (i386-redhat-linux-gnu) Program_Error sinput.adb:400|
| No source file position information available                            |
| Please submit a bug report, see http://gcc.gnu.org/bugs.html.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact gcc or gnatmake command that you entered.              |
| Also include sources listed below in gnatchop format                     |
| (concatenated together with no headers between files).                   |
+==========================================================================+

Please include these source files with error report

tst_prgfile.adb
list may be incomplete
compilation abandoned
gnatmake: "tst_prgfile.adb" compilation error


gnat.map:
	ada_program_file%s
	ada_program_file.ads
	..
	ada_program_file%b
	ada_program_file.adb
	..
Comment 1 Andrew Pinski 2003-12-08 07:13:31 UTC
3.2 is getting old and it was based on an old release of Ada, could you try a mainline snapshot?
Also You attach the files the bug.
Comment 2 Arnaud Charlet 2003-12-08 07:57:30 UTC
-gnatem is a very low level mechanism, intended to be used mainly
by gnatmake.

There are many proper ways to specify source path at the user level,
e.g. -I, ADA_INCLUDE_PATH. I'd suggest you take another look
at the documentation.

Also please send a self contained set of files in the future, thanks.

Arno
Comment 3 Alexis Wilke 2003-12-08 08:22:47 UTC
Thanks guys,

I still think the doc could mention something like: you may want to
use some -I or a project file instead of this -gnatem option. 8-)

I found the project file spec. and I'm now using that.

I don't think the crash has anything to do with my .adb file.

Alexis