bug in debugger?
- From: "Jeff D. Hamann" <jeff.hamann@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 12 Oct 2005 19:05:50 -0700
I'm sorry to have to post this here, but I've tried finding a solution to
this problem on the MS site to no avail. I've just installed the DevStudio
..net 2003 on a new machine and I've built a simple program.I know it works
just fine as I've built this code on just about every compiler I can find
and there's no problems. I fired up the app in debug mode to get used to the
new debugger in VC++ 2003 and found that the debugger was reporting bad
values in the structures. The code allocates an array of structures:
struct TREE_SECTION
{
unsigned long height;
unsigned long dib;
double volume;
char quality;
};
struct TREE_STRUCT
{
/* this is replicated in each tree record */
/* it's read in the same line as the number of tree records */
unsigned long tree_id;
unsigned long x_coord;
unsigned long y_coord;
unsigned long ht_to_break;
unsigned long is_pruned;
unsigned long is_normal;
unsigned long n_sections;
struct TREE_SECTION *sec_ptr;
};
and I have a function that allocates the arrays. In fact I get the same
behaviour even when I allocate an array of longs, etc like,
unsigned long *lptr;
lptr = (unsigned long*)calloc( 10000, sizeof( unsigned long ) );
and when I attempt to examine one of the elements say 876, I get garbage
even immediately right after the allocation of array. Why are there garbage
values in there. The calloc function call isn't supposed to return
uninitialized data, is it?
Has anyone else seen this behaviour? Is this one of those "reinstall a
couple of times to fix the problem" problems, is it? I've tried to exmaine
variables on other installations on other machines and have gotten the
correct behavoiur and in VC6 I get the correct behavoiur... Does anyone have
an idea?
Any advice would be appreciated as I'm about to revert back to VC6.
Thanks,
Jeff.
.
- Follow-Ups:
- Re: bug in debugger?
- From: Oleg Starodumov
- Re: bug in debugger?
- Prev by Date: Re: Addtional Libraries
- Next by Date: Re: bug in debugger?
- Previous by thread: Re: Addtional Libraries
- Next by thread: Re: bug in debugger?
- Index(es):
Relevant Pages
|