[fpc-pascal] fpc in symlinked directory

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Mar 26 20:48:36 CET 2014


On 26/03/14 19:07, Michael Van Canneyt wrote:

>
> On Wed, 26 Mar 2014, Jonas Maebe wrote:
>
>> Specifying the directories in a
>> relative way means that you can easily copy over a debug binary and
>> all related source code from one system to another (or move things
>> around) without breaking anything. For that reason, we explicitly add
>> relative directory names to the DWARF debug info rather than absolute
>> ones.
>
> As I wrote to Tomas:
> This assumes that the directory structure on the other system is identical.
>
> An assumption that doesn't hold between e.g. 64-bit debian and fedora.

The global directory structure of a system is irrelevant. Surely the 
directory structure of the lazarus or fpc source tree itself is 
identical on both systems. Those lazarus and fpc source directories 
themselves can be located anywhere, exactly because all paths to source 
files are relative to base directories rather than absolute.

> But I am not asking to change the way things are done unconditionally,
> I understand your reasoning.

I don't understand yours :)

> During debugging, Lazarus consistently opens a file twice (or doesn't
> find it at all) when symlinks are used in the path to the project file,
> because there is a mismatch
> between the relative path as lazarus sees it (logical), and the relative
> path as FPC sees it (physical), and lazarus uses the debug info to open
> the file.

Well, it's the first I've heard about this problem and I don't remember 
seeing any bug reports about it either. I never use Lazarus to debug though.

> I'm advocating to make this behaviour configurable:

File a bug report/feature request :) I also don't know by heart the 
ramifications for Stabs and/or Stabx. And e.g. for the JVM target, 
adding any kind of directory information is forbidden by the specifications.


Jonas



More information about the fpc-pascal mailing list