<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — Watching structured-data dynamic array variables]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=321&amp;type=atom" />
	<updated>2014-02-24T00:16:45Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=321</id>
		<entry>
			<title type="html"><![CDATA[Re: Watching structured-data dynamic array variables]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1310#p1310" />
			<content type="html"><![CDATA[<p>John,</p><p>The Simply Fortran debugger certainly does allow examining the individual members of derived types and <em>statically declared</em> arrays of said derived types.&nbsp; However, there is currently a shortcoming in the underlying GNU Debugger that does not allow examining the contents of <em>ALLOCATE</em>d arrays regardless of each elements type.&nbsp; Had you declared</p><div class="codebox"><pre><code>INTEGER, ALLOCATABLE :: MEMB(:)</code></pre></div><p>you still would not be able to examine the contents regardless of the array&#039;s allocation status.&nbsp; You can examine the contents via a complicated watch expression (one element at a time), but it&#039;s unwieldy to the point of being useless.</p><p>This shortcoming is currently being resolved via a set of &quot;Variable Length Array&quot; patches to GNU Debugger.&nbsp; Once these patches are integrated into the debugger, Simply Fortran will &quot;just work,&quot; allowing you to inspect the contents of dynamically allocated arrays.</p><p>If you&#039;re feeling brave, you can read more about the changes on the <a href="https://sourceware.org/ml/gdb-patches/2014-02/msg00097.html">GNU Debugger mailing list</a>.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2014-02-24T00:16:45Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1310#p1310</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Watching structured-data dynamic array variables]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1307#p1307" />
			<content type="html"><![CDATA[<p>Is it intended that SF&#039;s debugger should be able to display the contents of the first few values of dynamic arrays in data structures?&nbsp; I ask, because when I seem to be finding it can&#039;t display these.</p><p>For example, I have the following declarations:<br /></p><div class="codebox"><pre><code>      Type :: MEMBER
           INTEGER           :: NODE1, NODE2
           INTEGER           :: MTyp
           LOGICAL           :: Released(6)
           LOGICAL           :: StiffsStored
           REAL*8            :: LStiff(21)
           REAL*8            :: GStiff(21)
           CHARACTER(24)     :: Desc
      END TYPE

      TYPE(MEMBER), ALLOCATABLE :: MEMB(:)</code></pre></div><p>During debugging, I am finding, for example, if I highlight the code string,&nbsp; <span class="bbu"><strong>MEMB(1)%LStiff(4)</strong></span>, then hover the mouse pointer over the highlighted selection, the debugger displays a garbage value for that array variable element.&nbsp; I am nearly sure that this is not because the array element in fact contains garbage (though I could be mistaken).&nbsp; Should the debugger in fact be managing to display this information?<br />--- <br />John</p>]]></content>
			<author>
				<name><![CDATA[JohnWasilewski]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=102</uri>
			</author>
			<updated>2014-02-23T19:53:57Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1307#p1307</id>
		</entry>
</feed>
