View Issue Details

IDProjectCategoryView StatusLast Update
0037658FPCCompilerpublic2020-08-28 22:40
ReporterMartin Friebe Assigned To 
Status newResolutionopen 
Platform64bit IntelOSwin 10 
Product Version3.2.0 
Summary0037658: Dwarf: Generics cause wrong unit-path in line-info-map
DescriptionWhen specializing generics, such as
unit MyUnit;
  TMyFoo = spcecialize generics.collecitons.TFoo<xxx>;

TMyFoo resides in MyUnit.

The line info for that code (any method of TMyFoo that results from specialization) will be in the line-info for (the compilation unit) TMyUnit. (which is correct).
I.e. the line info map for TMyUnit (there is just one compilation unit) will have entries for several files (just as it would for include files).

- For include files (if in other directories) fpc correctly create entries in the line-infos "include_directories".

- But for "generic.collections" no entry in include_directories is created.
From objdump:
 The Directory Table is empty.
 The File Name Table (offset 0xb857):
  Entry Dir Time Size Name
  1 0 0 0 unit1.pas
  2 0 0 0 generics.collections.pas
  3 0 0 0 generics.defaults.pas

generics.collections point to the implicit dir "0", which the dwarf specs state: "The
current directory of the compilation is understood to be the first entry and is not explicitly

Therefore a debugger should read this, as "generics.collections.pas" is in the same directory as "unit1.pas"
Steps To ReproduceThe include_directories should contain both:
- user specified path
- none explicit mentioned path that were searched

10. include_directories (sequence of path names)
The sequence contains an entry for each path that was searched for included source files in
this compilation. (The paths include those directories specified explicitly by the user for the
compiler to search and those the compiler searches without explicit direction). Each path
entry is either a full path name or is relative to the current directory of the compilation. The
current directory of the compilation is understood to be the first entry and is not explicitly
represented. Each entry is a null-terminated string containing a full path name. The last entry
is followed by a single null byte.
TagsNo tags attached.
Fixed in Revision
Attached Files


related to 0037657 resolvedMartin Friebe Lazarus FpDebug: Stack window: can't locate dotted units like generics.collections 


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-08-28 22:40 Martin Friebe New Issue
2020-08-28 22:40 Martin Friebe Relationship added related to 0037657