Debugger one line off after #embody


I hit a difficulty with the debugger – it will get confused in regards to the line the supply is in:

 

uha_0-1715339543851.png

 

 

I do know this occurs  when your construct/pdb is old-fashioned, this  will not be the case right here. As a substitute it’s associated to a considerably bizarre mixture of #embody (preprocessor) and embody (Fortran).

To breed I’ve 4 information: 2 embody information, one module and a primary:

SomeFile.fi:

 

 

integer, parameter :: someval = 88

 

 

OtherFile.fi:

 

 

!#DEFINE BLA_BLA
#IF .NOT. DEFINED (BLA_BLA)
#DEFINE MyFun(a, b, c) .true.
#ELSE
      USE, INTRINSIC :: ISO_C_BINDING, ONLY: C_LOC
#ENDIF

 

 

TestInclude.f90 (don’t take away the empty line 14 for readability):

 

 

module MTestInclude
#embody "OtherFile.fi"
#IF DEFINED (SIGNAL_MEM_ARRS)
  use NonExistantModule
#ENDIF
  implicit none
  save

  incorporates

subroutine check()
  embody "SomeFile.fi"
  write(*,*) someval

finish subroutine check

finish module MTestInclude

 

 

Console1.f90:

 

 

program primary
  use MTestInclude
  name check()
finish program primary

 

 

It doesn’t solely offset the debugger within the operate with the embody, but in addition for different features outlined after that one in the identical file. Curiously it appears you want the mixture of #embody and embody to interrupt it.

So for me the straightforward workaround is to incorporate “OtherFile.fi” as an alternative of #embody “OtherFile.fi”, simply thought it may be of curiosity. Or possibly there’s something truly fallacious with the #embody model?

Leave a Reply

Your email address will not be published. Required fields are marked *