Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » debugger showing structure arrays greater 100
debugger showing structure arrays greater 100 [message #150450] Mon, 01 August 2005 06:16 Go to next message
Eclipse UserFriend
Originally posted by: frank.morauf.salzbrenner.com

When using arrays of structures greater then 100, then in debugger view
variables these are grouped in 100. All groups are showing the same, this
is the first group from 0 to 99.
This happens not if using not a structur but a simple type.

struct MyStuct
{

};
Re: debugger showing structure arrays greater 100 [message #150513 is a reply to message #150450] Tue, 02 August 2005 14:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mikhailk.qnx.com

Seems to work for me. Can you provide a test case?

"Frank Morauf" <frank.morauf@salzbrenner.com> wrote in message
news:ee8a0340db91b559d979bfd411ab1eb4$1@www.eclipse.org...
> When using arrays of structures greater then 100, then in debugger view
> variables these are grouped in 100. All groups are showing the same, this
> is the first group from 0 to 99.
> This happens not if using not a structur but a simple type.
>
> struct MyStuct
> {
>
> };
>
Re: debugger showing structure arrays greater 100 [message #150969 is a reply to message #150513] Tue, 09 August 2005 05:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: frank.morauf.salzbrenner.com

Please try this piece of code:

#include "memory.h"

struct test_struct
{
int a;
char b;
};

int main(void)
{
struct test_struct s[200];
memset(s, 0, sizeof(s));
s[1].a = 1;
s[99].a = 99;
s[100].a = 100;
s[101].a = 101;
s[199].a = 199;
return 0; /* stop debugger here */
}

Now look in debug view variables at s[101]: it shows the contents of s[1],
similar is s[199]. It seems that the block form 100 to 199 is a copy of
the block from 0 to 99. If making the array greater (e.g. s[500]), then
every block above 100 is a copy of the first block.
This happens NOT if using only ONE standard c-type (like int) in the
struct or if using an array of standard c-types.
Re: debugger showing structure arrays greater 100 [message #150978 is a reply to message #150969] Tue, 09 August 2005 14:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mikhailk.qnx.com

What is your environment? This example works fine on Windows.

"Frank Morauf" <frank.morauf@salzbrenner.com> wrote in message
news:3032302a216200833ab24b922a0d0980$1@www.eclipse.org...
> Please try this piece of code:
>
> #include "memory.h"
>
> struct test_struct
> {
> int a;
> char b;
> };
>
> int main(void)
> {
> struct test_struct s[200];
> memset(s, 0, sizeof(s));
> s[1].a = 1;
> s[99].a = 99;
> s[100].a = 100;
> s[101].a = 101;
> s[199].a = 199;
> return 0; /* stop debugger here */
> }
>
> Now look in debug view variables at s[101]: it shows the contents of s[1],
> similar is s[199]. It seems that the block form 100 to 199 is a copy of
> the block from 0 to 99. If making the array greater (e.g. s[500]), then
> every block above 100 is a copy of the first block.
> This happens NOT if using only ONE standard c-type (like int) in the
> struct or if using an array of standard c-types.
>
>
Re: debugger showing structure arrays greater 100 [message #150992 is a reply to message #150978] Wed, 10 August 2005 06:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: frank.morauf.salzbrenner.com

I'm using the latest Eclipse 3.1.0 und the latest CDT 3.0.0 on Windows XP
but this problem is present since Eclipse 3.0.0 and CDT 2.1.
I've tried it with native cygwin gdb and a cross gdb.

I try to explain:
Let the simple program run to "return 0;"
Window->Open Perspective->Debug
Window->Show View->Variables
In this window:
enable in the local menu "Vertical View Orientation".
In this window you can see the local variable s, which is grouped from 0
to 99 and 100 to 199.
Now unfold the group 100 to 199 and make a single left click on s[101].
Now look at the contents in the detail pane view: this is wrong!
Re: debugger showing structure arrays greater 100 [message #150998 is a reply to message #150992] Wed, 10 August 2005 08:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stefanm.uniblue.net

Hi Frank,

I have tried the example aswell. Difference is that I am using MinGW.
Example works fine for me.

Stefan

Frank Morauf wrote:

> I'm using the latest Eclipse 3.1.0 und the latest CDT 3.0.0 on Windows XP
> but this problem is present since Eclipse 3.0.0 and CDT 2.1.
> I've tried it with native cygwin gdb and a cross gdb.

> I try to explain:
> Let the simple program run to "return 0;"
> Window->Open Perspective->Debug
> Window->Show View->Variables
> In this window:
> enable in the local menu "Vertical View Orientation".
> In this window you can see the local variable s, which is grouped from 0
> to 99 and 100 to 199.
> Now unfold the group 100 to 199 and make a single left click on s[101].
> Now look at the contents in the detail pane view: this is wrong!
Re: debugger showing structure arrays greater 100 [message #151007 is a reply to message #150992] Wed, 10 August 2005 10:52 Go to previous message
Eclipse UserFriend
Originally posted by: mikhailk.qnx.com

Now I got it. I was looking at the variable value not the value in the
Detail pane.
Created Bugzilla entry -
https://bugs.eclipse.org/bugs/show_bug.cgi?id=106632.

Thanks you.

"Frank Morauf" <frank.morauf@salzbrenner.com> wrote in message
news:cb7ec78570e7e47d9d5e5db16b75837b$1@www.eclipse.org...
> I'm using the latest Eclipse 3.1.0 und the latest CDT 3.0.0 on Windows XP
> but this problem is present since Eclipse 3.0.0 and CDT 2.1.
> I've tried it with native cygwin gdb and a cross gdb.
>
> I try to explain:
> Let the simple program run to "return 0;"
> Window->Open Perspective->Debug
> Window->Show View->Variables
> In this window:
> enable in the local menu "Vertical View Orientation".
> In this window you can see the local variable s, which is grouped from 0
> to 99 and 100 to 199.
> Now unfold the group 100 to 199 and make a single left click on s[101].
> Now look at the contents in the detail pane view: this is wrong!
>
>
>
Previous Topic:Profiling C/C++ application
Next Topic:crash while linking my project
Goto Forum:
  


Current Time: Fri Jul 18 15:51:13 EDT 2025

Powered by FUDForum. Page generated in 0.03849 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top