473,657 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Debugger issue - VC++ v6

A C
Hi
Can someone explain why the following is happening.

ProjectA <-- depends on B, C, ....
ProjectB
ProjectC... etc

Project B contains b.cpp and b.h. Also has conditional compiler directive
which is NOT present in ProjectA
ProjectA includes b.h

b.h defines a struct which uses the conditional compile directive to
determine whether to include a new item.
eg typedef struct {
double b1,
#ifdef MY_B_DIRECTIVE
bnew,
#endif MY_B_DIRECTIVE
b2;} b_struct_t;

If we run the project and stop at the near the beginning of b.cpp and look
at an object that contains members of type b_struct_t (or has children
objects which contain members....) the debugger does not display correctly.
The code itself is working fine, correct values in the right place, but the
debugger does not display them correctly. I think it is getting the member
vars before the b_struct_t variables (well the child object thata contains
it anyway) correct, but not after.

If we include MY_B_DIRECTIVE in ProjectA it works fine.

Is ProjectA setting the object sizes etc for the debugger? Or something
else? Is there are way around this? as we are not meant to be setting
ProjectA
directives.

regards
A

Jul 22 '05 #1
1 1305

"A C" <no@sp.am> wrote in message
news:yL******** *********@news. xtra.co.nz...
Hi
Can someone explain why the following is happening.

ProjectA <-- depends on B, C, ....
ProjectB
ProjectC... etc

Project B contains b.cpp and b.h. Also has conditional compiler directive
which is NOT present in ProjectA
ProjectA includes b.h

b.h defines a struct which uses the conditional compile directive to
determine whether to include a new item.
eg typedef struct {
double b1,
#ifdef MY_B_DIRECTIVE
bnew,
#endif MY_B_DIRECTIVE
b2;} b_struct_t;

If we run the project and stop at the near the beginning of b.cpp and look
at an object that contains members of type b_struct_t (or has children
objects which contain members....) the debugger does not display

correctly.

Debuggers are not topical here. Only the standard C++ language.
See: http://www.slack.net/~shiva/welcome.txt

Ask about the VC++ debugger at newsgroup:
microsoft.publi c.vc.debugger

If your news server doesn't have this group, connect your news client
to Microsoft's public news server: msnews.microsof t.com

Information about Microsoft developer products also available
at www.msdn.microsoft.com

-Mike
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1368
by: dbrans | last post by:
Hi There, Somehow the visual studio debugger is getting confused about which source files belong to which object files. For example, I'll set a breakpoint on line 92 in once source file, but the debugger will break execution on line 92 in another source file. I've tried doing a clean build and I've tried remaking my project files. Does anyone have information on how the debugger links source files to object files?
6
7582
by: Ken Varn | last post by:
I am trying to remote debug a C# application but the debugger is reporting the following exception: An unhandled exception of type 'System.IO.FileLoadException' occurred in Unknown Module. Additional information: Unverifiable assembly 'FrameGrabber' failed policy check. The FrameGrabber assembly is a C++ managed DLL.
1
1532
by: Boris Dynin | last post by:
Hi, I have some projects (native - not managed code) in VC++ 2003. I'm trying to debug that stuff on Win98 system that has VC6.0 installed. Is it possible to use VC6.0 for debugging code built with VC++ 2003? I know that remote debugging with VS 2003 can be used in this scenario. However, it would be easier for me to use VC6.0. Thanks for any hints, Boris
9
2311
by: RalphTheExpert | last post by:
I'm getting different behavior if my code is running under the debugger or not. I have modified Winmain to look like this: // Copyright (C) 2002 Microsoft Corporation // All rights reserved. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER // EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
5
2459
by: thomas1107 | last post by:
I am running Visual Studio .NET 2002 Professional on Windows 2000 SP4. When I try to launch the debugger from inside the IDE for VC++ applications I get the following error “Application failed to initialize properly (08x0000003). Click on OK to terminate the application”. I get the same results when I right-click on application and choose Debug->Start New Instance. However, the same application runs without any errors if I use the...
2
2884
by: Chris Stiefeling | last post by:
Hi, I am experiencing a strange problem. I am reading and writing xml files via XmlDocument and XmlTextWriter. In the debugger everything works fine but outside the debugger (debug or release) I receive the following error: "The type initializer for "System.Xml.Schema.Validator" threw an exception." I wrote a small console app that contains the problem -- I've just attached the default class which gets run. Output outside the...
8
1587
by: Jared.Holsopple | last post by:
Hi all, I have a dynamically allocated array of doubles in VC++ .NET. When I view the array in the watch window with "arrayName, 10", it displays the correct value for arrayName, but arrayName through arrayName are all zeros. Note that arrayName is actually double*, and not double. When I print out the array to the screen using printf, the correct (non-zero) values are displayed. I'd rather not dump a bunch of
5
2491
by: Zytan | last post by:
I cannot stand being unable to change the code while the debugger is running. Is there a way to do this? thanks, Zytan
20
2631
by: =?Utf-8?B?V0o=?= | last post by:
I have a VC++ application that just crashes on one tester/client's machine. It runs fine everywhere else. What are the other options to debug (on the client's machine) without installing VC++ (on the clinet's machine)? Is this possible at all? Thanks. WJ
0
8425
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8326
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8845
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8743
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8522
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7355
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4333
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1973
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.