|
|
stepping inside a DLL
Hi, I am trying to debug a C++ program using Microsoft VC++ IDE. The
program loads a dynamic link library (dll) and later makes calls to
functions inside this dll. I want to step inside the code of this dll.
Is that possible to do? Because currently what is happening is, even if
I try to step inside the function in the dll (by F11 key), it is
stepping over the whole function (like F10 does).
How can I step inside the dll code? Am I doing something incorrectly
now? Please help.
Thank you.
|
|
0
|
|
|
|
Reply
|
pinaki_m77 (96)
|
7/30/2005 6:49:12 AM |
|
pinaki_m77@yahoo.com wrote:
> Hi, I am trying to debug a C++ program using Microsoft VC++ IDE.
So why are you posting on a C group? C++ is a different language.
> The
> program loads a dynamic link library (dll) and later makes calls to
> functions inside this dll. I want to step inside the code of this dll.
<snip>
All this is implementation specific so would not be topical in
comp.lang.c++ (as I understand it) either. So either RTFM or go find a
group with microsoft or vc in the name.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
|
|
0
|
|
|
|
Reply
|
spam331 (4024)
|
7/30/2005 8:33:05 AM
|
|
pinaki_m77@yahoo.com wrote:
>
> Hi, I am trying to debug a C++ program using Microsoft VC++ IDE.
> The program loads a dynamic link library (dll) and later makes
> calls to functions inside this dll. I want to step inside the
> code of this dll. Is that possible to do? Because currently what
> is happening is, even if I try to step inside the function in
> the dll (by F11 key), it is stepping over the whole function
> (like F10 does).
>
> How can I step inside the dll code? Am I doing something
> incorrectly now? Please help.
This has nothing to do with the C language, and is thus off-topic.
You want a newsgroup with "microsoft" in its name.
However a little elementary thought will show you why you can't do
this. dlls are shared dynamically linked libraries. More than one
process may be using it at once. Stepping through its code usually
requires altering that code to a trapping opcode. Any such
alteration will affect other users of the library. So it is not
allowed.
--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
|
|
0
|
|
|
|
Reply
|
cbfalconer (19183)
|
7/30/2005 9:23:17 AM
|
|
On Sat, 30 Jul 2005 09:23:17 +0000, CBFalconer wrote:
> pinaki_m77@yahoo.com wrote:
>>
>> Hi, I am trying to debug a C++ program using Microsoft VC++ IDE.
>> The program loads a dynamic link library (dll) and later makes
>> calls to functions inside this dll. I want to step inside the
>> code of this dll. Is that possible to do? Because currently what
>> is happening is, even if I try to step inside the function in
>> the dll (by F11 key), it is stepping over the whole function
>> (like F10 does).
>>
>> How can I step inside the dll code? Am I doing something
>> incorrectly now? Please help.
>
> This has nothing to do with the C language, and is thus off-topic.
> You want a newsgroup with "microsoft" in its name.
>
> However a little elementary thought will show you why you can't do
> this. dlls are shared dynamically linked libraries. More than one
> process may be using it at once.
That is also true for non-DLL code.
> Stepping through its code usually
> requires altering that code to a trapping opcode. Any such
> alteration will affect other users of the library. So it is not
> allowed.
This could be implemented the same way for DLLs as for non-DLL code.
Copy-on-write is a common technique for this sort of thing.
There probably are characteristics of DLLs which would make this harder to
do, perhaps a lack of debugging information. I doubt whether code sharing
is a problem though.
Lawrence
|
|
0
|
|
|
|
Reply
|
lknews (877)
|
8/1/2005 1:08:41 PM
|
|
In article <42EB3A21.F3F9668A@yahoo.com>, CBFalconer <cbfalconer@yahoo.com> writes:
> pinaki_m77@yahoo.com wrote:
> >
> > Hi, I am trying to debug a C++ program using Microsoft VC++ IDE.
> > The program loads a dynamic link library (dll) and later makes
> > calls to functions inside this dll. I want to step inside the
> > code of this dll.
>
> This has nothing to do with the C language, and is thus off-topic.
> You want a newsgroup with "microsoft" in its name.
Indeed.
> However a little elementary thought will show you why you can't do
> this.
And a little research would show you that you can.
> dlls are shared dynamically linked libraries. More than one
> process may be using it at once. Stepping through its code usually
> requires altering that code to a trapping opcode. Any such
> alteration will affect other users of the library. So it is not
> allowed.
This is a splendid example of why answering off-topic questions is
a bad idea. It is entirely possible to set breakpoints in shared
code in many modern OSes, including Windows. I don't know offhand
how this is implemented (though copy-on-write is a plausible
candidate), but code sharing is rarely an issue for debugging these
days. The only recent OS I've used where code sharing prevented
setting breakpoints was HP-UX, and that was only for some objects
and only under some circumstances, and there were work-arounds.
--
Michael Wojcik michael.wojcik@microfocus.com
We are subdued to what we work in. (E M Forster)
|
|
0
|
|
|
|
Reply
|
mwojcik (1874)
|
8/1/2005 4:09:02 PM
|
|
In article <dclheu02g0p@news1.newsguy.com>,
Michael Wojcik <mwojcik@newsguy.com> wrote:
....
>a bad idea. It is entirely possible to set breakpoints in shared
>code in many modern OSes, including Windows.
ITYM, "many modern OSes and also Windows".
|
|
0
|
|
|
|
Reply
|
gazelle (565)
|
8/1/2005 6:21:23 PM
|
|
|
5 Replies
27 Views
(page loaded in 0.088 seconds)
|
|
|
|
|
|
|
|
|