<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Ah, the screenshots were very in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937961#M89305</link>
    <description>&lt;P&gt;Ah, the screenshots were very helpful. You're not getting the Fortran debug support there - the debugger thinks you're in C (or maybe C#) code. Let me try your ZIP.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Dec 2013 18:25:30 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2013-12-16T18:25:30Z</dc:date>
    <item>
      <title>Debugging from managed code</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937956#M89300</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am trying to debug a fortran code&amp;nbsp;from managed code. I have found 2 situations at which I am not able to watch some variables:&lt;/P&gt;

&lt;P&gt;[fortran]&lt;/P&gt;

&lt;P&gt;module LibToDebug_m&lt;BR /&gt;
	&amp;nbsp; use iso_c_binding&lt;BR /&gt;
	&amp;nbsp; implicit none&lt;/P&gt;

&lt;P&gt;&amp;nbsp; integer, private, parameter :: SIZE = 2&lt;/P&gt;

&lt;P&gt;contains&lt;BR /&gt;
	&amp;nbsp; subroutine DebugMe0(a, array1, array2)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; integer, intent(in) &amp;nbsp; &amp;nbsp; &amp;nbsp; :: a&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; real*8, dimension(:) &amp;nbsp; &amp;nbsp; &amp;nbsp;:: array1&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; real*8, dimension(SIZE) &amp;nbsp; :: array2&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; write(*,'(A)') 'native::DebugMe0'&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; write(*,'(A)') 'breakpoint 0'&lt;/P&gt;

&lt;P&gt;&amp;nbsp; end subroutine DebugMe0&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&amp;nbsp; subroutine DebugMe1(a, array1, array2)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; integer, intent(in) &amp;nbsp; &amp;nbsp; &amp;nbsp; :: a&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; real*8, dimension(:) &amp;nbsp; &amp;nbsp; &amp;nbsp;:: array1&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; real*8, dimension(SIZE) &amp;nbsp; :: array2&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; integer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :: b&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; integer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :: c&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; integer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :: index&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; write(*,'(A)') 'native::DebugMe1'&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; b = 0&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; c = a + b&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; index = 0&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; do&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; index = index + 1&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; if (index &amp;gt; SIZE) exit&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; write(*,'(A)') 'breakpoint 1'&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; end do&lt;/P&gt;

&lt;P&gt;&amp;nbsp; end subroutine DebugMe1&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; subroutine DebugMe2(a, array1, array2)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; integer, intent(in) &amp;nbsp; &amp;nbsp; &amp;nbsp; :: a&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; real*8, dimension(:) &amp;nbsp; &amp;nbsp; &amp;nbsp;:: array1&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; real*8, dimension(SIZE) &amp;nbsp; :: array2&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; integer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :: b&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; integer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :: c&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; integer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :: index&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; write(*,'(A)') 'native::DebugMe2'&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; b = 0&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; c = a + b&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; index = 0&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; do index = 1, SIZE&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; write(*,'(A)') 'breakpoint 2'&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; end do&lt;/P&gt;

&lt;P&gt;&amp;nbsp; end subroutine DebugMe2&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&amp;nbsp; subroutine DebugMeExternal(a) bind(c, name="DebugMeExternal")&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; !DEC$ ATTRIBUTES DLLEXPORT :: DebugMeExternal&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; integer(kind=c_int), value, intent(in) &amp;nbsp; &amp;nbsp; &amp;nbsp;:: a&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; real*8, dimension(SIZE) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :: array1, array2&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; write(*,'(A)') 'native::DebugMeExternal'&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; array1(1) = 1&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; array1(2) = 2&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; array2(1) = 3&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; array2(2) = 4&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; call DebugMe0(a, array1, array2)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; call DebugMe1(a, array1, array2)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; call DebugMe2(a, array1, array2)&lt;/P&gt;

&lt;P&gt;&amp;nbsp; end subroutine DebugMeExternal&lt;/P&gt;

&lt;P&gt;end module LibToDebug_m&lt;/P&gt;

&lt;P&gt;[/fortran]&lt;/P&gt;

&lt;P&gt;At a breakpoint 0 I cannot watch values in the&amp;nbsp;array1. Also additional .tmp.0.ARRAY1 variable is available in the stack, probably it contains size of the array1;&lt;/P&gt;

&lt;P&gt;At a breakpoint 1&amp;nbsp;I cannot watch array1, b and c.&lt;/P&gt;

&lt;P&gt;At a breakpoint 2 I cannot watch only array1. b and c are available. I guess they style of a do-loop matters for debugging.&lt;/P&gt;

&lt;P&gt;Are these&amp;nbsp;Intel compiler's or VS's issues?&amp;nbsp;Is there a way to fix them&amp;nbsp;by simply changing the settings? If not are you planning to fix it in the next release? :)&lt;/P&gt;

&lt;P&gt;Versions: &lt;SPAN style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;"&gt;XE 13.1,&amp;nbsp;&lt;/SPAN&gt;Visual studio 2012 Update 4, .NET 4.5&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2013 18:21:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937956#M89300</guid>
      <dc:creator>Marat_S_1</dc:creator>
      <dc:date>2013-12-13T18:21:08Z</dc:date>
    </item>
    <item>
      <title>What build options are you</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937957#M89301</link>
      <description>&lt;P&gt;What build options are you using to build this DLL? I assume you're able to stop at breakpoints in the DLL (which implies that you have enabled unmanaged code debugging in the managed code project.)&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2013 18:55:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937957#M89301</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2013-12-13T18:55:23Z</dc:date>
    </item>
    <item>
      <title>compiler's options: /nologo</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937958#M89302</link>
      <description>&lt;P&gt;compiler's options:&amp;nbsp;/nologo /debug:full /Od /warn:interfaces /module:"Debug\\" /object:"Debug\\" /Fd"Debug\vc110.pdb" /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c&lt;BR /&gt;
	&lt;BR /&gt;
	linker's options:&amp;nbsp;/OUT:"LibToDebug.dll" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"LibToDebug.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:LibToDebug.pdb" /SUBSYSTEM:WINDOWS /IMPLIB:LibToDebug.lib" /DLL&lt;BR /&gt;
	&lt;BR /&gt;
	Yes,&amp;nbsp;&lt;SPAN style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;"&gt;unmanaged code debugging is enabled.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 13:21:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937958#M89302</guid>
      <dc:creator>Marat_S_1</dc:creator>
      <dc:date>2013-12-16T13:21:22Z</dc:date>
    </item>
    <item>
      <title>Which managed language are</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937959#M89303</link>
      <description>&lt;P&gt;Which managed language are you calling this from? So far I can't reproduce the problem. Please attach a ZIP of a small but complete managed code project that calls this routine and shows the issue. I'll note that most of the managed languages want a STDCALL interface when calling into a DLL, and you aren't providing that. In this environment, you don't get the protection of name decoration, so a mismatch like this isn't obvious, but it can lead to stack corruption. (Note that in our implementation, you can't mix STDCALL with BIND(C).)&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 15:02:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937959#M89303</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2013-12-16T15:02:36Z</dc:date>
    </item>
    <item>
      <title>It is C#.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937960#M89304</link>
      <description>&lt;P&gt;It is C#.&lt;BR /&gt;
	&lt;BR /&gt;
	I have attached a small project for Visual Studio 2012 and a few screenshots.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 16:30:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937960#M89304</guid>
      <dc:creator>Marat_S_1</dc:creator>
      <dc:date>2013-12-16T16:30:22Z</dc:date>
    </item>
    <item>
      <title>Ah, the screenshots were very</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937961#M89305</link>
      <description>&lt;P&gt;Ah, the screenshots were very helpful. You're not getting the Fortran debug support there - the debugger thinks you're in C (or maybe C#) code. Let me try your ZIP.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 18:25:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937961#M89305</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2013-12-16T18:25:30Z</dc:date>
    </item>
    <item>
      <title>Very interesting. I can</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937962#M89306</link>
      <description>&lt;P&gt;Very interesting. I can reproduce this with your C# example as well as another one I have. But a VB.NET example doesn't behave the same way. Visual Studio is preventing the Fortran debugger support from being used here - why it should do that for C# and not VB, I don't know. It's not a compiler issue and I don't know if it's anything we can control. I will ask our VS debugging experts for their thoughts.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 19:12:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937962#M89306</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2013-12-16T19:12:44Z</dc:date>
    </item>
    <item>
      <title>To enable the Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937963#M89307</link>
      <description>&lt;P&gt;To enable the Fortran debugger features for mixed language program debugging under VS2012/2013: &amp;nbsp;open the Tools -&amp;gt;Options and under the Debugging -&amp;gt;General&amp;nbsp; properties clear the Managed C++ Compatibility Mode (it's "Use Managed Compatibility Mode" in VS2013) check box.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2014 15:29:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937963#M89307</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2014-01-20T15:29:37Z</dc:date>
    </item>
    <item>
      <title>Quote:Steve Lionel (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937964#M89308</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Steve Lionel (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;To enable the Fortran debugger features for mixed language program debugging under VS2012/2013: &amp;nbsp;open the Tools -&amp;gt;Options and under the Debugging -&amp;gt;General&amp;nbsp; properties clear the Managed C++ Compatibility Mode (it's "Use Managed Compatibility Mode" in VS2013) check box.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;It works. Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2014 15:53:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Debugging-from-managed-code/m-p/937964#M89308</guid>
      <dc:creator>Marat_S_1</dc:creator>
      <dc:date>2014-01-20T15:53:15Z</dc:date>
    </item>
  </channel>
</rss>

