Skip to content

Commit d6c3fa3

Browse files
authored
Merge pull request #69 from rainers/master
Changes for v0.44rc1
2 parents 50a3145 + b3e7518 commit d6c3fa3

21 files changed

+520
-264
lines changed

CHANGES

Lines changed: 45 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -806,32 +806,48 @@ Version history
806806
- search pane did not save its last state, only when switching between file and symbol search
807807
- dustmite: pattern passed to "find" must always use quotes
808808

809-
unreleased Version 0.3.44
810-
811-
* mago: bring back support to run on Windows XP
812-
* cv2pdb: fix crashes with very long symbols
813-
* can now read and write Mono-D project files (but likely to be incomplete because this was
814-
a failed attempt to integrate with msbuild and the VC projects)
815-
* now builds with dmd 2.071
816-
* when linking with MS linker, options for the map file broke the command line
817-
* bugzilla 16063: missing option -L/DLL when linking a DLL with MS linker
818-
* added integration with msbuild and VC++ projects
819-
* added installation of mago expression evaluator to Concord debug engine
820-
* added $(Platform) as a settings macro replacement in addition to $(PlatformName)
821-
* changed default output directory to $(PlatformName)/$(ConfigurationName)
822-
* added x64 configurations to project templates
823-
* added AppVeyor integration builds
824-
* cv2pdb can now be enabled independent of debug engine
825-
* dustmite: error messages written to stderr not grepped
826-
* added project template to build with DMD, LDC and GDC for x86 and x64
827-
* VS SDK 2013 now needed to build Visual D
828-
* added automatic brace completion
829-
* added preliminary support for VS 2017 RC
830-
* dparser: semantic analysis no longer times out after 500ms, but cancels previous requests
831-
* dparser: improved performance by adding name lookup cache
832-
* completion box no longer pops up if caret has been moved elsewhere
833-
* menu entries now disabled if they require the focus on a D file, but it is elsewhere
834-
* building a library with LDC now always adds "-oq -od=$(IntDir)" to the command line
835-
* reduced idle processing by only updating the active view
836-
* mago: display const modifier on type, recover string types
837-
* mago concord plugin: enable conditional breakpoints
809+
unreleased Version 0.44
810+
811+
* installation
812+
- added preliminary support for VS 2017 RC
813+
- new version scheme removing the gratuitious .3 from the Visual D version
814+
* project management
815+
- added integration with msbuild and VC++ projects
816+
- can now read and write Mono-D project files (but likely to be incomplete because this was
817+
a failed attempt to integrate with msbuild and the VC projects)
818+
- when linking with MS linker, options for the map file broke the command line
819+
- bugzilla 16063: missing option -L/DLL when linking a DLL with MS linker
820+
- added $(Platform) as a settings macro replacement in addition to $(PlatformName)
821+
- changed default output directory to $(PlatformName)/$(ConfigurationName)
822+
- added x64 configurations to project templates
823+
- added project template to build with DMD, LDC and GDC for x86 and x64
824+
- building a library with LDC now always adds "-oq -od=$(IntDir)" to the command line
825+
* mago:
826+
- bring back support to run on Windows XP
827+
- display const modifier on type, recover string types
828+
- add and install concord debug engine plugin for VS 2012-2015
829+
* cv2pdb:
830+
- fix crashes with very long symbols
831+
- can now be enabled independent of debug engine
832+
* build
833+
- now builds with dmd 2.073
834+
- added AppVeyor integration builds
835+
- VS SDK 2013 now needed to build Visual D
836+
* miscellaneous
837+
- dustmite: error messages written to stderr not grepped
838+
- menu entries now disabled if they require the focus on a D file, but it is elsewhere
839+
- reduced idle processing by only updating the active view
840+
* editor
841+
- added automatic brace completion
842+
* language service
843+
- dparser: semantic analysis no longer times out after 500ms, but cancels previous requests
844+
- dparser: improved performance by adding name lookup cache
845+
- Improvements to completion lists:
846+
- completion box no longer pops up if caret has been moved elsewhere
847+
- new option to disable exact start match (searches case insensitive sub string)
848+
- free functions show different icon than member functions
849+
- aliases show other icon than variables
850+
- new sorting modes "by type" using classification by the semantic engine,
851+
"by declaration", effectively using scopes as discovered by the semantic engine
852+
- without any match, still keep the completion box open with recent items
853+
- less flashing when updating the results

VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#define VERSION_MAJOR 0
22
#define VERSION_MINOR 44
33
#define VERSION_REVISION 0
4-
#define VERSION_BETA -beta
5-
#define VERSION_BUILD 2
4+
#define VERSION_BETA -rc
5+
#define VERSION_BUILD 1

build_doc.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ set SRC=%SRC% doc/VersionHistory.dd
2424
set SRC=%SRC% doc/News36.dd
2525
set SRC=%SRC% doc/CompileCommands.dd
2626
set SRC=%SRC% doc/DustMite.dd
27+
set SRC=%SRC% doc/vcxproject.dd
2728

2829
set DDOC=doc/macros.ddoc doc/html.ddoc ..\..\rainers\d-programming-language.org\dlang.org.ddoc doc/visuald.ddoc
2930

doc/Debugging.dd

Lines changed: 100 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,123 @@
11
Ddoc
22

3-
$(H2 Visual Studio Debugger)
3+
$(P Here's a little bit of history required to understand the available options for debugging
4+
D programs with Visual Studio.)
45

5-
$(P Thanks to $(LINK2 https://github.com/rainers/cv2pdb, cv2pdb), debugging in Visual Studio integrates well.
6-
Here is an example debugging session)
6+
$(P If you are only interested in the latest state with VS 2015, you can skip all this and go
7+
directly to the $(ALOCAL recommendation, recommendation).)
8+
9+
$(H2 VS 2008-2010 cv2pdb)
10+
11+
$(P Development of Visual D started around 2009, with VS 2008 being the latest Visual Studio version.
12+
DMD only supported Windows 32-bit programs, with debug information written in an ancient version
13+
of CodeView. This was not well understood by the Visual Studio debugger, basic
14+
operations like setting breakpoints and investigating struct members didn't work.
15+
That's why cv2pdb was created to convert the old CodeView debug information embedded into the executable
16+
to a newer version of CodeView written into a PDB file.)
17+
18+
$(P VS 2008 and VS 2010 have two engines for debugging native code, one mainly targeted at C/C++
19+
and one for mixed native and managed code. Both understood visualizer descriptions
20+
in a file named autoexp.dat, that cv2pdb took advantage of to display some D constructs
21+
in watch windows: slices, strings and associatives arrays. That made debugging
22+
D programs quite possible, though debug info from the compiler was very basic. Some
23+
quirks had to be accepted, e.g. type names must not contain '.' to avoid confusing the
24+
debugger, so it is replaced with '@'. Expressions need to be specified in C/C++ syntax.)
25+
26+
$(P Here is an example debugging session that used cv2pdb)
727

828
<div align="center"><img src="images/debug.png" width="90%"/></div>
929

10-
$(P Using cv2pdb has a few quirks, like displaying '@' instead of '.'. This is happening because the C++ debugger
11-
that comes with Visual Studio is used and it is confused if there is a '.' in a symbol name.)
30+
$(H2 mago)
1231

13-
$(H3 Exceptions)
32+
$(P In 2010, Aldo Nunez surprised the D community with a new debug engine dedicated to the
33+
D language, that plugs in to Visual Studio as an extension. This engine can read the old
34+
CodeView debug information emitted by DMD. Having full support for D types and expressions,
35+
the above quirks are avoided.
36+
In addition, there is no need to supply slow visualizer macros as mago can display
37+
slices, strings and more nicely. You can select the mago debug engine in the project
38+
debugging settings of a Visual D project.)
1439

15-
$(P As of version 0.3.21, the installer adds an entry "D Exception" to the list of Win32 exceptions that
16-
can be found in the Debug->Exceptions dialog. This allows the debugger to stop execution when an exception
17-
is thrown by the debuggee. With earlier versions, you'll have to add an entry with code 0xE0440001 yourself.)
40+
$(IMG_CENTER images/prop_debug.png)
1841

42+
$(P One downside of the mago debug engine is that it does not support all the features
43+
of the native Visual Studio debugger, e.g. conditional breakpoints, hardware assisted
44+
breakpoints or attaching to a process.)
1945

20-
$(H2 Mago Debugger)
46+
$(H2 64-bit)
2147

22-
$(P As of version 0.3.16 Visual D comes with the option to install the
23-
$(LINK2 http://www.dsource.org/projects/mago_debugger, Mago debugger). This debug engine is dedicated to the
24-
D programming language and avoids the work-arounds needed when using the native debug engine. It also
25-
features D specific expressions like dynamic array slicing.)
48+
$(P DMD added 64-bit Windows support in 2012, writing COFF object files supporting the
49+
newer version of the CodeView debug information from the start. So there is no need to
50+
use a conversion tool for its output. In 2014, DMD got the option to also emit COFF
51+
files for 32-bit code using the same debug format.)
2652

27-
$(P To enable debugging with the Mago debugger select it on the project configuration page "Debugging".
28-
This will also disable cv2pdb conversion as Mago directly operates on the debug info emitted by DMD.)
53+
$(P The visual studio debuggers obviously had 64-bit support, and mago followed suite in
54+
2014 including support for the PDB debug info format.)
2955

30-
$(IMG_CENTER images/prop_debug.png)
56+
$(H2 VS 2012-2013 New debug engine)
57+
58+
$(P Starting with Visual Studio 2012, Microsoft introduced a new debugger that replaced
59+
the native debug engine. Unfortunately, it lost some of the capabilities of the
60+
preceding debug engine. This includes displaying variables in the Watch Window and
61+
interpretation of the visualizer macros in autoexp.dat. The new engine has
62+
extended visualizer capabilities, but these are targeted to C/C++ and don't work with
63+
D syntax.)
64+
65+
$(P You can switch back to the old debug engine by going to Tools->Options and then under the debugger
66+
settings, turn on native edit and continue. This is a global setting and will also affect your
67+
C++ projects, though.)
68+
69+
$(P Mago is uneffected by this change.
70+
The VS 2013 debugger engine fixed some of the problems with displaying local variables.)
71+
72+
$(H2 VS 2015 Concord extensions)
3173

32-
$(P Please note that Mago is under development and might lack a few features that you find in the native debugger.)
74+
$(P With the next version of the debug engine supporting "native edit and continue", the fallback to
75+
the old debug engine no longer works in VS 2015. Instead Microsoft
76+
released information about the extensibility of this debug engine (introduced with VS2012) called
77+
$(LINK2 https://github.com/Microsoft/ConcordExtensibilitySamples/wiki/Overview, Concord),
78+
late in 2015. It consists of more modular components than older engines. This allows taking
79+
advantage of most features of the debug engine, but just replace language specific
80+
parts, i.e. the expression evaluator. In addition, debugging mixed languages is no problem
81+
anymore.)
82+
83+
$(P Taking the expression evaluator out of Mago allowed to implement this for D pretty easily:)
84+
85+
<div align="center"><img src="images/concord_mark.png" width="90%"/></div>
86+
87+
$(P The debugger engine needs to detect the source language of the code location. This information
88+
is added to the debug information starting with dmd 2.072 when compiled for COFF object
89+
files (-m64 or -m32mscoff) with -g, but not with
90+
-gc, i.e. you should select debug info for Mago even when using the VS debug engine.)
91+
92+
<a id="recommendation"></a>
93+
$(H3 Recommendation for VS 2015)
94+
95+
$(UL
96+
$(LI use DMD 2.072 or later)
97+
$(LI for Visual D projects, compile to COFF even for Win32 by enabling "Use MS-COFF object file format" on the
98+
project configuration page Compiler->Output)
99+
$(LI select symbolic debug information "suitable for Mago" on the
100+
project configuration page Compiler->Debug)
101+
$(LI choose the Visual Studio debugger on the project configuration page Debugging)
102+
)
103+
104+
$(P If you are using the new Visual C/C++ project integration, all you have to do is select debug information
105+
"for D debug engines" on the project configuration page "D Compiler->Code generation".)
106+
107+
$(H2 Exceptions)
108+
109+
$(P As of version 0.3.21, the installer adds an entry "D Exception" to the list of Win32 exceptions that
110+
can be found in the Debug->Exceptions dialog. This allows the debugger to stop execution when an exception
111+
is thrown by the debuggee. With earlier versions, you'll have to add an entry with code 0xE0440001 yourself.)
33112

34113
$(H3 Exceptions with Mago)
35114

36-
$(P Mago displays exceptions thrown by the debuggee in the output window. You can also stop execution
37-
by enabling the respective box in the Debug->Exception dialog. Due to a bug, you currently cannot
38-
simply enable the "D Exceptions" entry, but must select the specific exceptions while keeping the
115+
$(P Mago displays exceptions thrown by the debuggee in the output window. You can also stop execution
116+
by enabling the respective box in the Debug->Exception dialog. Due to a bug, you currently cannot
117+
simply enable the "D Exceptions" entry, but must select the specific exceptions while keeping the
39118
"D Exceptions" entry unchecked. So, the dialog should look something like this:)
40119

41120
$(IMG_CENTER images/d_exceptions.png)
42121

43-
$(H2 Visual Studio 2012)
44-
45-
Visual Studio 2012 introduced a new debug engine that loses some of the capabilities of the
46-
preceding debug engine. This includes displaying variables in the Watch Window. You
47-
can switch back to the old debug engine by going to Tools->Options and then under the debugger
48-
settings, turn on native edit and continue. This will also reenable the visualizer macros in autoexp.dat.
49-
50122
Macros:
51123
TITLE=Debugging

doc/images/concord_mark.png

84.3 KB
Loading

doc/images/vcxproject.png

47.5 KB
Loading

doc/images/vcxproject_general.png

52.7 KB
Loading

doc/vcxproject.dd

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Ddoc
2+
3+
$(P With Visual D 0.44 integration with Visual C/C++ projects has been added. This means that
4+
you can just add your D files into any C/C++ project and it will be compiled and linked
5+
with everything else in the project.)
6+
7+
$(P The project properties will be extended by a "D Compiler" section:)
8+
9+
<div align="center"><img src="images/vcxproject.png" width="90%"/></div>
10+
11+
$(P The General Page allows to select between DMD and LDC as the D compiler to be used by the current configuration.)
12+
13+
$(IMG_CENTER images/vcxproject_general.png)
14+
15+
$(P A couple of things to note:)
16+
$(UL
17+
$(LI Only COFF files are generated, there is no support for OMF files that DMD geberates for Win32 by default.)
18+
$(LI Selecting the C runtime library is supported starting with DMD 2.073)
19+
$(LI The D project templates include a console application template based on a VC project, but just containing a D file.)
20+
)
21+
22+
Macros:
23+
TITLE=Visual C/C++ Project Integration

doc/visuald.ddoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = 0.3.43
1+
VERSION = 0.44
22
ROOT_DIR = http://www.dlang.org/
33
ROOT = http://www.dlang.org
44
BODYCLASS = visuald
@@ -30,6 +30,7 @@ SUBNAV=$(SUBNAV_TEMPLATE
3030
Search.html, Search Window,
3131
TokenReplace.html, Token Replace,
3232
ProjectConfig.html, Project Config,
33+
vcxproject.html, VC Project Integration,
3334
CppConversion.html, C++ to D,
3435
Debugging.html, Debugging,
3536
CompileCommands.html, Compile Commands,
File renamed without changes.

0 commit comments

Comments
 (0)