forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

wanting to try F95 with VS 2010...
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
KennyT



Joined: 02 Aug 2005
Posts: 320

PostPosted: Tue Oct 23, 2012 4:37 pm    Post subject: Re: Reply with quote

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
View user's profile Send private message Visit poster's website
KennyT



Joined: 02 Aug 2005
Posts: 320

PostPosted: Wed Oct 24, 2012 11:00 am    Post subject: Re: Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8283
Location: Salford, UK

PostPosted: Wed Oct 24, 2012 12:08 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
KennyT



Joined: 02 Aug 2005
Posts: 320

PostPosted: Wed Oct 24, 2012 12:32 pm    Post subject: Re: Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8283
Location: Salford, UK

PostPosted: Wed Oct 24, 2012 6:04 pm    Post subject: Reply with quote

Your exe and dll must be both .NET or both Win32.
Back to top
View user's profile Send private message AIM Address
KennyT



Joined: 02 Aug 2005
Posts: 320

PostPosted: Wed Oct 24, 2012 6:14 pm    Post subject: Re: Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8283
Location: Salford, UK

PostPosted: Thu Oct 25, 2012 7:57 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
KennyT



Joined: 02 Aug 2005
Posts: 320

PostPosted: Thu Oct 25, 2012 8:02 am    Post subject: Re: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group