View previous topic :: View next topic |
Author |
Message |
Shazboots
Joined: 26 Aug 2010 Posts: 2
|
Posted: Thu Aug 26, 2010 8:57 pm Post subject: Mixed mode debugging? |
|
|
Been trying out Visual D, which seems quite awesome, and stumbled across a problem or 2.
-Does Visual D have any support for mixed mode debugging? (I already have a large project in C++, I'd like to be able to load a D DLL and be able to debug it and the C++ at the same time). I got my C++ to load the D DLL but I couldn't step into the D-- though this might be because I manually placed the D DLL in the appropriate directory(because of problem 2).
-Might be a bug, or I'm just missing something: I tried to change the default output directory from $(ConfigurationName) to $(SolutionDir)$(Configuration)\ but this somehow corrupted the D project making it unable to produce any DLL at all. Even after I changed it back to $(ConfigurationName) and deleted all the temp files it still refused to create a DLL. Had to delete the project and make a new one.
Thanks |
|
Back to top |
|
|
sagitario
Joined: 03 Mar 2007 Posts: 292
|
Posted: Fri Aug 27, 2010 1:15 am Post subject: Re: Mixed mode debugging? |
|
|
Shazboots wrote: | -Does Visual D have any support for mixed mode debugging? (I already have a large project in C++, I'd like to be able to load a D DLL and be able to debug it and the C++ at the same time). I got my C++ to load the D DLL but I couldn't step into the D-- though this might be because I manually placed the D DLL in the appropriate directory(because of problem 2). |
Both D and C++ use the native debugger and there should be no problem with these. Actually I did it just recently when debugging Visual D. Visual D starts the mixed mode debugger engine, this even allows debugging of C# and D/C++ at the same time.
Do you have the cv2pdb conversion enabled in the debug settings?
Quote: | -Might be a bug, or I'm just missing something: I tried to change the default output directory from $(ConfigurationName) to $(SolutionDir)$(Configuration)\ but this somehow corrupted the D project making it unable to produce any DLL at all. Even after I changed it back to $(ConfigurationName) and deleted all the temp files it still refused to create a DLL. Had to delete the project and make a new one. |
The only situation where I encountered the executable silently not being generated, was when a library with unsupported format is found by optlink (which might simply exit without error in such case). Any library usable for the Microsoft linker qualifies as unusable for optlink. |
|
Back to top |
|
|
Shazboots
Joined: 26 Aug 2010 Posts: 2
|
Posted: Fri Aug 27, 2010 6:14 pm Post subject: |
|
|
Very happy to hear it supports mixed mode debugging
With regards to the build not producing any output(seems to happen permanently once I change the output dir). I am using VS2010 if that matters.
When I build the project it produces not output at all, and I don't see any error messages.. here is the VS output( I turned on warnings, made output more verbose in the D options, also the cv2pdb conversion is enabled).
------ Rebuild All started: Project: DDLL_TAKE2, Configuration: Debug Win32 ------
Building \DDLL_TAKE2.dll...
dllmain.d(11): Warning: switch statement has no default
dllmain.d(11): Warning: statement is not reachable
binary C:\Program Files (x86)\D\dmd2\windows\bin\dmd.exe
version v2.048
config C:\Program Files (x86)\D\dmd2\windows\bin\sc.ini
parse dllmain
importall dllmain
import object (C:\Program Files (x86)\D\dmd2\windows\bin\..\..\src\druntime\import\object.di)
import std.c.windows.windows (C:\Program Files (x86)\D\dmd2\windows\bin\..\..\src\phobos\std\c\windows\windows.d)
import core.sys.windows.windows (C:\Program Files (x86)\D\dmd2\windows\bin\..\..\src\druntime\import\core\sys\windows\windows.di)
import core.dll_helper (C:\Program Files (x86)\D\dmd2\windows\bin\..\..\src\druntime\import\core\dll_helper.di)
import core.stdc.string (C:\Program Files (x86)\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\string.di)
import core.stdc.stddef (C:\Program Files (x86)\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\stddef.di)
import core.runtime (C:\Program Files (x86)\D\dmd2\windows\bin\..\..\src\druntime\import\core\runtime.di)
import core.thread_helper (C:\Program Files (x86)\D\dmd2\windows\bin\..\..\src\druntime\import\core\thread_helper.di)
import core.stdc.stdlib (C:\Program Files (x86)\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\stdlib.di)
import core.stdc.config (C:\Program Files (x86)\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\config.di)
import core.thread (C:\Program Files (x86)\D\dmd2\windows\bin\..\..\src\druntime\import\core\thread.di)
import core.stdc.stdint (C:\Program Files (x86)\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\stdint.di)
import core.stdc.signal (C:\Program Files (x86)\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\signal.di)
import core.stdc.wchar_ (C:\Program Files (x86)\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\wchar_.di)
import core.stdc.stdarg (C:\Program Files (x86)\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\stdarg.di)
import core.stdc.stdio (C:\Program Files (x86)\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\stdio.di)
import core.stdc.time (C:\Program Files (x86)\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\time.di)
semantic dllmain
semantic2 dllmain
semantic3 dllmain
json gen dllmain
code dllmain
function DllMain
C:\Program Files (x86)\D\dmd2\windows\bin\link.exe "\DDLL_TAKE2","\DDLL_TAKE2.dll_cv",\DDLL_TAKE2.map,user32+kernel32/m/co/noi/MAP:FULL;
Converting debug information...
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
The only file produced is a "buildlog.html" which does have this line in it:
echo Building \DDLL_TAKE2.dll failed!
I just created a default D DLL project, didn't change anything about it.. so I don't think I could have added any unsupported lib? |
|
Back to top |
|
|
sagitario
Joined: 03 Mar 2007 Posts: 292
|
Posted: Sat Aug 28, 2010 12:57 am Post subject: |
|
|
Quote: | Building \DDLL_TAKE2.dll... |
It seems it is building to the root directory, but might not have access rights there.
Please double-check the environment variable names in your configuration. E.g. $(Configuration) used in your original post does not exist.
The list of available replacements is here: http://www.dsource.org/projects/visuald/wiki/Tour/ProjectConfig
Otherwise it might also be an issue with missing quotes around file names with spaces. You will probably find a DDLL_TAKE2.cmd in your root directory where you can see the actually executed batch commands. |
|
Back to top |
|
|
|