[llvm-dev] RFC: Adding debug information to LLVM to support Fortran

Adrian Prantl via llvm-dev llvm-dev at lists.llvm.org
Thu Nov 1 16:39:36 PDT 2018



> On Nov 1, 2018, at 4:26 PM, Eric Schweitz (PGI) <eric.schweitz at pgroup.com> wrote:
> 
> Hi Adrian,
>  
> Thank you for the quick reply.
>  
> (1) I agree. We’re running out of bits there. Furthermore, I have encoded these flags in a recycle-minded way to skirt the issue.
>  
> (2) I will take a look.  Note that Fortran debuggers expect DW_TAG_string_type for CHARACTER; and, they are distinct from arrays of INTEGER*1.  (Yes, the conflation of string and CHARACTER terms is unfortunate.)
>  
> (3) The Fortran DI name choice was to deliberately keep things separated.  That may not be necessary as we move forward, but it was good at the time for sanity’s sake.
>  
> (4) My understanding is the @llvm.dbg.declare !DIExpression is to track the location of a local variable. The !DIExpression in the lower (or upper) bound is intended as a way to describe how to find or compute the bound’s value from the array descriptor “variable” (computed from a member of a hidden argument to the function). The distinction isn’t entirely clear in the example.

There probably should be one artificial variable per computed property of the array, the respective bounds refer to their own variable and if an expression is necessary it should be tied to the DIVariable using dbg.value/dbg.declare (which I think you'll need anyway).

-- adrian

>  
> I’ll work on getting the patches put up. Thanks again.
>  
> --


More information about the llvm-dev mailing list