News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

CodeView and DLLs

Started by Merrick, March 08, 2005, 07:43:02 PM

Previous topic - Next topic

Merrick

This may be trivial, and it may be nearly impossible... but I can't figure out where to start!

I am developing DLLs with assembler that are called from higher level languages (in this particular case, VB). The DLLs are reaching a level of sophistication that debugging with CodeView or some similar tool would be a nice aid, but how can I call the DLL from VB and have it load into CodeView when it's called in order to step through execution and see what's going on?

Sorry if this is a trivial question, but I can't figure out where to start on this. Any feedback would be appreciated.

Thanks,
Merrick

sluggy

You should be able to load the IDE, and attach the debugger to the correct process. As long as you have compiled in debug mode (ie you have generated pdb files for the dlls), then you should be able to load the source file into the IDE (once you have attached to the process), set a breakpoint on it, and call the dll from your VB code.

Having said all that, i have never used CodeView (:green), but the method above works for VS, and should work for most integrated IDE/debuggers. 

GregL

#2
I thought CodeView was only for 16-bit DOS. I may be wrong, but I don't remember a CodeView that works with 32-bit Windows.


Will

I just put an int3 in the code that I'm having problems with.  I'm not sure if codeview can be used as a jit debugger, but if you load the dll calling app in codeview and run it, it's got to break on the int3.

Merrick

sluggy, thanks. That helps a lot. Can you point me at some resources? VS? Documentation of any kind would be relly helpful.

Robert Collins

Maybe this will help and maybe it wont and maybe its not the best or right way to do it but its how I do it. When I want to test my DLL I will first make it and .exe module. Add a special function that calls all the exported functions giving them the same arguments that I would send to them via the VB program. If they work, OK, if they dont work I single step through the functions until I can 'see' where I am going wrong. Once all the exported functions work I simply add a DLLMain to it it and re-compile it as a DLL. I only do it this way because I don't know any other way to do it. I have CodeView but it is for 16-Bit applications and I don't like it anyway.