Re: can't bebug a dll
From: PanTao (bandianxing_at_hotmail.com_remove_please)
Date: 01/21/05
- Next message: David Lowndes: "Re: How to capture global mouse coordinates ?"
- Previous message: PanTao: "Re: can't bebug a dll"
- In reply to: Joseph M. Newcomer: "Re: can't bebug a dll"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 21 Jan 2005 15:34:23 +0800
Many thanks~ I have found that problem.
The problem is that the exe is a just startup program , it seems that it
execute another exe
program and quit itself. The VC debug tool icon start soon becomes enable
after begin deduging.
I notice that but don't think out why it is so. And the debugging window
shows that the program has
exit, but I failed to find out it before.
Now I use the second program as my debuging command, it is ok now. It seems
the dll debug
function is also ok in VS7.
Now I adjust the project release setting, enable generating debug
information, and disable optimazion,
it works ok now.
For debug version, I undefine the _DEBUG , but It report can't find some
definition such as
badCast::badCast(). There is something more I need to adjust, but it is not
important now.
cheers and regards,
PanTao
"Joseph M. Newcomer" <newcomer@flounder.com>
??????:tvc0v0ha0k65bn3gutu23j4hn6nkogg0lt@4ax.com...
> Perhaps someone can explain why you are not getting breakpoints. I don't
> use VS.NET except
> when it is unavoidable. In VS6 you often have to explain to the debugger
> that it must
> preload the DLLs. I could not find a similar feature in exploring VS7. So
> all I can do is
> point out what may still be a problem in VS7; if it is, it is so
> incredibly considerate of
> the VS7 designer to make the DLL preload ability so blindingly obvious
> (remember, this is
> the guy who had a "vision" that says "screw the users, we don't need a
> system that is easy
> and obvious to use, as long as it fits my idea of what I think a
> development environment
> should be, no matter how impractical and unusable it is to everyone else")
>
> You cannot mix debug and release MFC environments without expecting
> serious disasters.
> Don't do it. Don't even try. It isn't worth the effort. What will happen
> is that you will
> have two different MFC runtimes each believing it has the sole correct
> image of what is
> going on, and this is a sure formula for complete and total disaster.
>
> You will lose a bit of support, but you can create a release version
> without optimizations
> and with debug symbols, and you can debug with it. You won't get ASSERT
> and VERIFY and
> other aids for debugging, but you have to give up something here. The
> correct solution is
> to get the debug version of the application.
> joe
>
> On Thu, 20 Jan 2005 14:44:05 +0800, "PanTao"
> <bandianxing@hotmail.com_remove_please>
> wrote:
>
>>
>>"Joseph M. Newcomer" <newcomer@flounder.com>
>>??????:2pcuu05goe1cujo5njk5v3dveelblsrqui@4ax.com...
>>> Yes, but why do you care that the exe contains no debug information?
>>> Since
>>> you are
>>> debugging the DLL, this message can obviously be ignored.
>>>
>>> In VS6 you had to explicitly specify what DLLs you wanted, but I can't
>>> find a similar
>>> feature in .NET 2003.
>>>
>>> There are serious problems combining release MFC executables with debug
>>> MFC DLLs; you get
>>> conflicts since you have two different MFC runtimes conflicting for
>>> resources. However,
>>> you said the DLL is a simple windows sdk program, which is a set of
>>> terms
>>> which generally
>>> don't fit together (MFC also uses the Windows SDK, for example); what I
>>> believe you are
>>> saying is that the DLL is not an MFC-based DLL, so there should be no
>>> conflict when it is
>>> used with an MFC executable, so the issues about the DLL being linked
>>> with
>>> an MFC debug
>>> version don't make sense.
>>> joe
>>
>>I see now.
>>Currently I am trying set up the debug envirement. I use a simple example
>>to
>>try.
>>The exe is a release version and MFC based, and my example is a simple sdk
>>dll, but I can't make
>> the break point effective. It is strange and annoying. I had tried
>>debugging com dll example before
>> with VC6, and it was always OK. I don't know what I miss here. Any
>>suggestion?
>>
>>And latter , my real debug target is a MFC based dll, and the dll should
>>linked to a lot of library. Now
>>I don't have some debug version of those dll, and some of them is also
>>MFC
>>based. So since the
>>exe is MFC based release verion , and I only need to debug my own dll, I
>>think I only need to changed
>>those linked dll to release version. Is it so?
>>
>>many thanks,
>>PanTao
>>
>>> On Thu, 20 Jan 2005 11:32:07 +0800, "msnews.microsoft.com"
>>> <_bandianxing_@hotmail.com_>
>>> wrote:
>>>
>>>>hello, all
>>>> I am trying to debug a dll. The exe file is a mfc release version
>>>>file, and the dll currently is a simple windows sdk program.
>>>>My environment is windows XP, vc dotnet 2003, and I have set the exe as
>>>>the debug commmand in the project-debug-debugging-command.
>>>>While I debug the problem, the exe is executed, and report the the
>>>>exe file contain no debug information. but the breakpoint in my dll is
>>>>not
>>>>effective. What may be the problem?
>>>>
>>>>And also, if the exe is a mfc release version , may I link the dll with
>>>>mfc debug version? Is there some conflict?
>>>>
>>>>many thanks,
>>>>PanTao
>>>>
>>>
>>> Joseph M. Newcomer [MVP]
>>> email: newcomer@flounder.com
>>> Web: http://www.flounder.com
>>> MVP Tips: http://www.flounder.com/mvp_tips.htm
>>
>
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm
- Next message: David Lowndes: "Re: How to capture global mouse coordinates ?"
- Previous message: PanTao: "Re: can't bebug a dll"
- In reply to: Joseph M. Newcomer: "Re: can't bebug a dll"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|