473,473 Members | 2,032 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Dll debug question

Hello!

When I am debugging, I call the app, which loads the dll and then I can
trace the dll. In this scenario everything is ok. But when my dll calls an
app which loads another dll, that then lods mine, - I am not able to trace
my dll.

In short, the scheme looks like this: App -> SomeDLL -> MyDll.

How can I trace my dll?
--
Vadym Stetsyak
PDS

Nov 16 '05 #1
6 2110
Vadym Stetsyak wrote:
In short, the scheme looks like this: App -> SomeDLL -> MyDll.

How can I trace my dll?


It should be possible if you debug "App" (or start with App)
--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/useritems/leakfinder.asp
Nov 16 '05 #2
"Vadym Stetsyak" <va*****@ukr.net> wrote in message
news:Op**************@TK2MSFTNGP10.phx.gbl...
When I am debugging, I call the app, which loads the dll and then I can
trace the dll. In this scenario everything is ok. But when my dll calls an
app which loads another dll, that then lods mine, - I am not able to trace
my dll.


Debuggers like the one VC++ uses can debug a single process at a time. If
another process loads your DLL you need another instance of the debugger.

I see that Nishant has already pointed out that you can instrument your code
with an

_asm int 3

to force a JIT debugger to attach at runtime. DebugBreak() does the same
thing.

Regards.
Will

Nov 16 '05 #3
William DePalo [MVP VC++ ] wrote:
"Vadym Stetsyak" <va*****@ukr.net> wrote in message
news:Op**************@TK2MSFTNGP10.phx.gbl...
When I am debugging, I call the app, which loads the dll and then I
can trace the dll. In this scenario everything is ok. But when my
dll calls an app which loads another dll, that then lods mine, - I
am not able to trace my dll.


Debuggers like the one VC++ uses can debug a single process at a
time. If another process loads your DLL you need another instance of
the debugger.


VC7 and above, as well as the system debuggers (WinDbg, ntsd, cdb) can
attach to multiple processes at once, just in case you do need to debug two
processes both using your DLL at the same time.

-cd
Nov 16 '05 #4
"Carl Daniel [VC++ MVP]" <cp******@nospam.mvps.org> wrote in message
news:ex**************@tk2msftngp13.phx.gbl...
VC7 and above, as well as the system debuggers (WinDbg, ntsd, cdb) can
attach to multiple processes at once, just in case you do need to debug two processes both using your DLL at the same time.


Thanks for that.

I thought such shenanigans were the province of windbag and co. and
SoftIce. Guess I should spend more time with VC7. :-)

Regards,
Will

Nov 16 '05 #5
I already have 1 process. Maybe the trouble is that the real picture looks
like this:

Managed App -> ManagedDll(Some P/Invoke method) -> C-style Dll

When the scheme is ManagedApp -> C-style Dll everything is ok - I can trace
C_Dll.

"William DePalo [MVP VC++ ]" <wi***********@mvps.org> wrote in message
news:uB**************@TK2MSFTNGP09.phx.gbl...
"Vadym Stetsyak" <va*****@ukr.net> wrote in message
news:Op**************@TK2MSFTNGP10.phx.gbl...
When I am debugging, I call the app, which loads the dll and then I can
trace the dll. In this scenario everything is ok. But when my dll calls an app which loads another dll, that then lods mine, - I am not able to trace my dll.
Debuggers like the one VC++ uses can debug a single process at a time. If
another process loads your DLL you need another instance of the debugger.

I see that Nishant has already pointed out that you can instrument your

code with an

_asm int 3

to force a JIT debugger to attach at runtime. DebugBreak() does the same
thing.

Regards.
Will

Nov 16 '05 #6
Vadym Stetsyak wrote:
I already have 1 process. Maybe the trouble is that the real picture
looks like this:

Managed App -> ManagedDll(Some P/Invoke method) -> C-style Dll

When the scheme is ManagedApp -> C-style Dll everything is ok - I can
trace C_Dll.


Maybe you can start the app and then attach to the app with the debugger
and then you HAVE TO select "nativ" and "managed" (optional) to debug your
DLL.

You also could try to start the app from the debugger, but you have to
choose somehow to debug also nativ code.

--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/useritems/leakfinder.asp
Nov 16 '05 #7

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

Similar topics

1
by: glaserp | last post by:
Hi, I am developing a Windows application with C# in Visual Stuio .NET. My application references three assemblies that are developed in another project. I have added these assemblies as...
8
by: Davy | last post by:
Hi all, I use VC and gcc/gdb to compile and debug C/C++ files. But I found some of the debug version of the compiled files are too large to be run in a small RAM. Can I compile C/C++ Debug...
4
by: emma middlebrook | last post by:
I have a question regarding asserting ... here's some code: string GetAssertMessage() { ... prepare a message string and return it... } void SomeMethod() { ...
4
by: Stephen Miller | last post by:
Hi, I am running v1.1.4322 on Win2K server and unable to debug a ASP.Net application running locally, using a full URL (ie www.mysite.com). When I hit F5, I get the following error message: ...
2
by: Jeremy S. | last post by:
By default, Web.config has the following section: <compilation defaultLanguage="c#" debug="true" /> note that debug="true" There is a comment - also in the default Web.config - that states...
7
by: AC [MVP MCMS] | last post by:
Wierd situation here. Running ASP.NET 1.1 on Win2003. I have to manually attach the debugger to a process in order to debug. So I set a breakpoint in an obvious place (like within the Page.Load...
9
by: dee | last post by:
Hi I'm about to upload my site and I have switched to release version. Is that enough or do I still need to disable <compilation defaultLanguage="vb" debug="true" /> the debug="true" in the .pdb...
8
by: Fred Flintstone | last post by:
I have an odd problem. I'm beating myself bloody trying to get debugging to work. I have VS.Net 2005 installed on a Windows XP SP2 workstation and on a W2003 Server. The asp.net application is...
6
by: Andrew Rowley | last post by:
I am having trouble getting debug and release builds to work properly with project references using C++ .NET and Visual Studio 2003. I created a test solution, with a basic Windows form C++...
1
by: gfergo | last post by:
Good Morning, I seem to be having a problem. I thought I could display detailed debugging information (including file name and line number) on a page using two different methods: 1.)...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
1
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
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.