| View previous topic :: View next topic |
| Author |
Message |
KennyT
Joined: 02 Aug 2005 Posts: 320
|
Posted: Tue Oct 23, 2012 4:37 pm Post subject: Re: |
|
|
| PaulLaidler wrote: |
| You will usually need to have debugging code built into the exe as well as the dll. However, if everything is set up right, you should be able to open a dll source file and then set a break point within it. |
Apparently, I need to generate a .PDB file but I can't see what option to set to create one?
K |
|
| Back to top |
|
 |
KennyT
Joined: 02 Aug 2005 Posts: 320
|
Posted: Wed Oct 24, 2012 11:00 am Post subject: Re: |
|
|
| KennyT wrote: |
| PaulLaidler wrote: |
| You will usually need to have debugging code built into the exe as well as the dll. However, if everything is set up right, you should be able to open a dll source file and then set a break point within it. |
Apparently, I need to generate a .PDB file but I can't see what option to set to create one?
K |
this is the listing I get:
| Code: |
Command line for link:
slink.exe -EXPORTALL -debug -DLL -OUT:"Debug\Win32\Senergy.dll" @"C:\Users\kenny\Documents\Silverfrost FTN95 Express\Senergy\Senergy\link.lst" "C:\duk6\app_main.dll" "C:\duk6\dukpet.dll" "C:\duk6\llib.dll" "C:\Program Files\IntPetro41\PGL.IP.API.NativeExports.dll" "C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll" "C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll" "C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.XML.dll"
Linker output:
WARNING - Default LibMain being provided
Creating dynamic link library: Debug\Win32\Senergy.dll
Senergy build succeeded.
|
Given that it's using "SLINK", is there an option to produce a PDB file (I can't see one in the help for SLINK) or can I specify another linker using the same OBJ files?
K |
|
| Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8283 Location: Salford, UK
|
Posted: Wed Oct 24, 2012 12:08 pm Post subject: |
|
|
If you are not using .NET then you can use SDBG directly to run the debugger. This provides an alternative to debugging within Visual Studio.
From SDBG you could try stepping into the main program and then open a source file for your DLL(from SDBG) and set a break point in the file. I think this might work but, if I have tried this, it was a long time ago.
If this works from SDBG then you might find that you can do the same thing from Visual Studio. |
|
| Back to top |
|
 |
KennyT
Joined: 02 Aug 2005 Posts: 320
|
Posted: Wed Oct 24, 2012 12:32 pm Post subject: Re: |
|
|
| PaulLaidler wrote: |
If you are not using .NET then you can use SDBG directly to run the debugger. This provides an alternative to debugging within Visual Studio.
From SDBG you could try stepping into the main program and then open a source file for your DLL(from SDBG) and set a break point in the file. I think this might work but, if I have tried this, it was a long time ago.
If this works from SDBG then you might find that you can do the same thing from Visual Studio. |
Hmmm,
The EXE I'm linking my DLL to is .NET. I've got past some "exceptions" by setting the "ignoreException" values in my SDBG.INI file but after initialising the app, it exits with a code 99936666.
K |
|
| Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8283 Location: Salford, UK
|
Posted: Wed Oct 24, 2012 6:04 pm Post subject: |
|
|
| Your exe and dll must be both .NET or both Win32. |
|
| Back to top |
|
 |
KennyT
Joined: 02 Aug 2005 Posts: 320
|
Posted: Wed Oct 24, 2012 6:14 pm Post subject: Re: |
|
|
| PaulLaidler wrote: |
| Your exe and dll must be both .NET or both Win32. |
is that just from the POV of debugging, cos it runs OK!
K |
|
| Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8283 Location: Salford, UK
|
Posted: Thu Oct 25, 2012 7:57 am Post subject: |
|
|
You can access an unmanaged DLL from a .NET assembly. In fact that is what happens with Windows Forms that access the Windows API. Also that is what happens when an FTN95 .NET application accesses salflibc.dll. I do not know if you can do it the other way round and I have not tried to step into a Win32 DLL accessed from a .NET assembly.
With things like this I usually find that I end up just inserting my own print statements into the code. Tedious but effective. |
|
| Back to top |
|
 |
KennyT
Joined: 02 Aug 2005 Posts: 320
|
Posted: Thu Oct 25, 2012 8:02 am Post subject: Re: |
|
|
| PaulLaidler wrote: |
...
With things like this I usually find that I end up just inserting my own print statements into the code. Tedious but effective. |
it was the tedium I was hoping to avoid!
K |
|
| Back to top |
|
 |
|