LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Debuggable Dynamic Link Library

  1. No break points works in Debuggable Dynamic Link Library.
  2. When no-fatal runtime-error occurs in Debuggable Dynamic Link Library, the program stops on the correct position, but in the source file of Debuggable Executable program, which uses Debuggable Dynamic Link Library.

This functions worked in previous version without any problem.

 

Thanks in advance

Petr

0 Kudos
Message 1 of 9
(4,311 Views)

Dear Kopejtko,

 

Sorry for the late reply.

 

Could You provide detailed information related to Your problem?

(for example CVI version, OS, etc.)

 

What do You mean with this:

"When no-fatal runtime-error occurs in Debuggable Dynamic Link Library, the program stops on the correct position, but in the source file of Debuggable Executable program, which uses Debuggable Dynamic Link Library."

 

Could You attach the problamatic poject? Or some pats of the porject?

 

Are You using proper calling convenion, when callin the DLL?

 

Thanks for Your cooperation. 

 

Best Regdars,

CLA, CLED
0 Kudos
Message 2 of 9
(4,240 Views)

The problem occured with the latest version 2013. After this problem had occured I returned bact to previous version and everything regarding this issue is OK now. The OS is windows 7. I am making 32-bit dinamic link library with cdecl calling conversion. 

 

Problem description:

1. I made a  Debuggable Dynamic Link Library with non-fatal runtime error (printf("",1);). Name of this library was delta.dll, source file was delta.c. I was running this library from main program with source file main.c. I was expecting, that the program will stop on the position of the error in file delta.c. But it stopped on the correct position but showed the position in file main.c.

2. I made a breakpoint in delta.c. But the program did not stop at this breakpoint.

 

I expect something is wrong with the maping file. 

 

Thanks in advance

Petr

0 Kudos
Message 3 of 9
(4,235 Views)

Dear Kopejtko,

 

I tried to reproduce the error You were menioning.

So I installed CVI 2013, and opened the simple.cws example.

In this example the dll implements a UI, and the simple project calls this DLL.

 

First I run both pojects in the workspace. (Mydll creates the DLL, Simple calls it.)

In this execuion, everything was OK.

 

Than I included the non-fatal runtime error printf("",1); non-fatal runtime error in the DLL.

After this, I run both projects, so I rebuil the DLL and called it from the other project.

 

The result was the following:

The application stopped in the line, where the error occured and in CVI workspace this line was highlighted. 

So I saw the expected behaivor. (See attached file).

 

Could You please try this example, so we can eliminate the fact, that the bug is in CVI?

 

Best Regards,

 

 

CLA, CLED
0 Kudos
Message 4 of 9
(4,211 Views)

You get the point. Now use 32-bit debud library compiled with cdecl standard, whether it will work the same way. I could not try it, because I am driving the previous version of Labwindows. And because it works OK with this version, I will upgrade after I will be sure everything will work on the newest version.

 

Thank You very much

 

Petr

0 Kudos
Message 5 of 9
(4,205 Views)

Dear Kopejtko,

 

Thank You for the quick response.

 

Please let me know, if there is anything else I can help with.

 

BR,

CLA, CLED
0 Kudos
Message 6 of 9
(4,200 Views)

There is still problem. Your example is compiled with stdcall conversion, I am using cdecl conversion. Furthermore I am using 32-bit debud mode, I do not know, whethet You are using the same.

 

Thanks

Petr

0 Kudos
Message 7 of 9
(4,196 Views)

Dear Kopejtko,

 

The DLL generated in th MyDll part of he project uses also cdecl calling convention, and a 32 bit debuggable DLL is generated during build prcess.

See atached pictures for further info.

 

I would recommend to use this example projec in CVI 2013 (if You have it still installed) and try out, if it behaves as expected or not.

 

BR,

CLA, CLED
Download All
0 Kudos
Message 8 of 9
(4,193 Views)

Now I realize, that in the example You are using static linked dll. In my case I am using functions:

LoadExternalModuleEx(Dir1, 0);

pole_modul[i].modul_i = GetExternalModuleAddr (Modul, Nazev_funkce, &err);

That could by the reason.

 

Thanks in advance

Petr

 

0 Kudos
Message 9 of 9
(4,184 Views)