Is it possible to debug a C++builder dll from Delphi if I have the dll sourcecode?
Asked Answered
D

3

7

I have an application written in Delphi 7 which uses a c++ dll written in BCB 5.
I want to debug this dll from the Delphi IDE is this possible?

If it's possible which are the steps to debug?

As additional information I have the full source code of the dll.

Dulcle answered 30/5, 2011 at 20:42 Comment(3)
Have you tried it? I think you should try it first and post your problems, instead of asking people if it will work. It's easy to find out.Vivienne
@Warren i am asking because i don't know how do this. I think which is nothing wrong with ask that.Dulcle
I agree - it may or may not be possible and you could waste a lot of time trying to do the impossible - why not find out first.Faa
N
4

It has been a while since I have dealt with C++ / Delphi together. But if I remember correctly, you can use the BCB IDE to run the Delphi application (compiled already) that uses your DLL. Basically, in your project settings in BCB, you can set a program to run when you click the "run" button, and I believe that you will be able to set breakpoints and stuff that will be caught when functions of your DLL are being called by that application. Still, this implies that you have BCB.

Nonna answered 30/5, 2011 at 21:30 Comment(1)
So, the default project, loaded in BCB is the DLL source code?Tableau
G
3

My recollection, and it's been a while since I last tried this, is that you need the C++ Builder IDE to do this.

Gunshot answered 30/5, 2011 at 21:20 Comment(0)
N
3

It should be possible:

I have done it quite often to debug a BCB5 dll within the Delphi 6 IDE. My delphi 6 application uses the DLL and I can then step from the delphi code into the bcb code (and back). So I might work with Delphi 7 too.

Delphi isn't configured by default to do that. At that time I found an explanation on the web how to do it. Not sure, but it might have been the following page: http://www.delphifaq.com/faq/delphi/delphi_ide/f178.shtml

You will also need to compile the dll in debug mode and to indicate the path to the source code of the dll in the project options of your delphi application.

Nesto answered 31/5, 2011 at 15:5 Comment(2)
"d I can then step from the delphi code into the bcb code (and back)" - do you mean that in the Delphi IDE you can step through C++ source code?Faa
@Mikey: Exactly, in the Delphi IDE I can step through the C++ source code, put breakpoints, display the content of the variables...Nesto

© 2022 - 2024 — McMap. All rights reserved.