|
|
It's not enough. Although you should debug in the debug build most times there are classes of bugs that only manifest in release builds.
Steve
|
|
|
|
|
Thanks Steve,
Any comments to my original question?
regards,
George
|
|
|
|
|
I think, in release mode, the code may be optimized, so the binary codes may not map to the source code, so it doesn't support break point in source code.
system
|
|
|
|
|
Thanks followait!
Do you have any ideas to check whether a function is optimized out or not?
regards,
George
|
|
|
|
|
just do some settings -
Settings->Link - Check - Generate Debug Info
Settings->C/C++ - Select Disable/Debug in Optimazations Combo
- Check Generate Browse Info
- Select "Program Database" in Debug Info Combo
Complile the application
You can debug the release mode.
-@SuDhIrKuMaR@-
|
|
|
|
|
Thanks sudhir_Kumar,
What are the so-called debug information contains? I think symbols are in PDB file and what are else debug info for release binary code?
regards,
George
|
|
|
|
|
The debug information is what's contained in PDB files. It contains a myriad of information including:
- Mappings from addresses to source files and line numbers.
- The layout of structures and classes.
- Type information.
- Stack layout so local variables can be examined.
Basically all the information the debugger needs.
Steve
|
|
|
|
|
Thanks Steve,
Even if I do not turn on the debug information, there is still the PDB file. You mean if I do not turn on the option, PDB will not be generated? Or?
regards,
George
|
|
|
|
|
The PDB file is only generated if the options I pointed out are turned on. A PDB file is nothing but a container for the debug information. When you ship an application you should keep the PDB files, generally in a Symbol Server[^].
Steve
|
|
|
|
|
Thanks Steve,
1.
A little lost in context before. I want to confirm with you that you mean debug information the same as PDB file?
2.
You mentioned the following before,
--------------------
Selected “Debug” in the “Category” combo.
Ticked “Debug info” and selected the “Microsoft format” radio button.
Made sure “Separate types” was *****NOT***** selected.
--------------------
I am using Visual Studio 2008, and not all terms are the same. Just want to confirm with you whether I am making the same settings.
- In Visual Studio 2008, under Linker, it is "Debugging" other than "Debug";
- In Visual Studio 2008, there is choices like Yes and No for "Gerenate Debug Info" option, no things like "Microsoft format";
- "Made sure “Separate types” was *****NOT***** selected." -- what are the separate types (only yes or no for "Generate Debug Info" option, no other separate types?)? Confused. What IDE are you using?
regards,
George
|
|
|
|
|
I use MSVC6 at work; at home I don't even want to look at a computer. It sounds like you're doing everything right though. The important thing is to make sure you enable the debugging options for both the compiler and the linker (at least in MSVC6).
Steve
|
|
|
|
|
Thanks Steve,
Wheter or not I enable the two options we discussed, it has no impact to generated binary code?
regards,
George
|
|
|
|
|
It will not impact the generated code.
Steve
|
|
|
|
|
Thanks Steve!
regards,
George
|
|
|
|
|
I just succeeded in doing it just fine in MSVC6. Here’s what I done:
- Created a console application and pasted in your code.
- Switched to the release configuration.
- Selected “Project”->“Setting…” from the menu.
- Selected the “C/C++” tab (“General” should be selected in the “Category” combo).
- In the “Debug info” combo I selected “Program Database”.
- Switched to the “Link” tab.
- Selected “Debug” in the “Category” combo.
- Ticked “Debug info” and selected the “Microsoft format” radio button.
- Made sure “Separate types” was *****NOT***** selected.
- Build it and loaded it up in WinDBG and issued the following command: bp George!foo
- Let it run.
Steve
|
|
|
|
|
|
i hav made 3 dialog based application and i want to execute other application from one application on a button click in 1st application
can any1 help
|
|
|
|
|
|
|
Hi
Does anyone know What this function actually does. I've created a Setup Program which adds various entries for file types which are Seldomly used, but, which are crucial files to unravel a screwup.
All the client has to do, is, under guidance of our support team, double click the file with the requisite extension, and the recovery program should run. The Only thing that may never have happened is the Prior running of 'EnableShellOpen' from within the particular App. How would this affect things. I do not use anything like DDE, COM, OLE, or whatever other incantations. All Apps communicate by directly reading from, or writing to Files on the Server.
Regards,
Bram van Kampen
|
|
|
|
|
Bram van Kampen wrote: Does anyone know What this function actually does.
Are you using it in conjunction with RegisterShellFileTypes() ? You could also supply a .reg file with your application for manual registration of document types.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
No, I culled items from MFC, and am generally 'Rolling my Own'
I am not using the 'MFC Document type architecture'
I've written the code to emulate 'RegisterShellFileTypes()'
All I require is that the shell launches the App, with the File name on the Command line. See also my conversation with Mark Salsburry on this.
Regards,
Bram van Kampen
|
|
|
|
|
According to the source code, it sets things up so DDE can
be used by the shell to pass an open command to your app if it's
already running.
See CWinApp::OnDDECommand()
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hey y'all,
How would I make a DialogBox a child window of the main View window in an SDI project?, or am I going about this wrong?
By the way I'm using C++ 6.0
Mike
|
|
|
|