This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 217186 - NetBeans doesn't display elements of dynamically allocated arrays (Fortran)
Summary: NetBeans doesn't display elements of dynamically allocated arrays (Fortran)
Status: RESOLVED WORKSFORME
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 7.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Maria Tishkova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-21 22:56 UTC by bubin
Modified: 2017-04-10 12:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
A simple fortran source file and a Makefile to compile it (391 bytes, application/x-gzip)
2012-08-21 22:56 UTC, bubin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bubin 2012-08-21 22:56:59 UTC
Created attachment 123364 [details]
A simple fortran source file and a Makefile to compile it

When I try to run a debug session with a Fortran code I can see the names of all local variables and arrays in the "Variables" window. However, only static arrays can be expanded and watched. Dynamically allocated arrays are not watchable (the names appear to be there but they cannot be expanded).

I assume this bug should be easily reproducible. The attached simple hello.f90 source file and Makefile can be used for that. What I did I created a new C/C++ project with existing sources and used custom configuration (with the default choice for everything else). Just put a breakpoint at one of the write statements, start a debug session and look at the list of variables in the "Variables" window. The values of array a can be seen, while the values of array b (which is dynamically allocated) cannot be.
Comment 1 biglimp 2014-03-31 06:16:20 UTC
I have the same issues in windows 7, netbeans 8
Comment 2 Vladimir Voskresensky 2014-03-31 13:45:32 UTC
Nikolay, please, have a look
Comment 3 henk89 2015-03-21 16:27:43 UTC
Is there a way to evaluate arrays of such a kind in the command line mode? It looks like GDB is unable to do it.
Comment 4 darklord1419 2016-09-27 13:01:15 UTC
Any idea how to fix this issue?. I have been having this problem and I think it is related to gdb debugger and not netbeans. I'm facing this problem for dynamic allocated array variables and also for types defined in different modules.
Comment 5 soldatov 2016-09-27 14:16:08 UTC
(In reply to darklord1419 from comment #4)
> Any idea how to fix this issue?. I have been having this problem and I think
> it is related to gdb debugger and not netbeans. I'm facing this problem for
> dynamic allocated array variables and also for types defined in different
> modules.
In GDB console user can use (b@10) name in order to display first 10 items of b. But In NetBeans 8.2 I can use (array@length) syntax in C or C++ applications only. I will create separated bug.
Comment 6 Maria Tishkova 2017-04-10 12:43:34 UTC
works for me on my ubuntu 16.04
I can see values for both arrays from example attached: "a" and "b"


C Compiler: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
C++ Compiler: g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
Fortran Compiler: GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
Assembler: GNU assembler (GNU Binutils for Ubuntu) 2.26.1
Make Tool: GNU Make 4.1
Debugger: GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
QMake Tool: qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
CMake Tool: Tool not found