@@ -194,6 +194,12 @@
The total size of a static array cannot exceed 16Mb.
A dynamic array should be used instead for such large arrays.
+
+
+ A static array with a dimension of 0 is allowed, but no
+ space is allocated for it. It's useful as the last member
+ of a variable length struct, or as the degenerate case of
+ a template expansion.
Fixed a bug in pauseHandler whereby the stackTop was being overwritten by
+ subsequently resumed threads causing a crash in gcx.mark(). (The fix was
+ to just move sem_post(&flagSuspend); to right before the sigsuspend loop).
+
+
Moved linux semaphore declarations to std/c/linux/linux.d
+
+
Changed void wait(uint milliseconds){} to be a timed wait function instead
+ of just a stub for void wait() {} on linux (it is comparable to the Win32
+ Thread method now). This is implemented with pthread mutexes and
+ conditions and the extra overhead to initialize phobos Threads does not
+ result in slower executables (Threads, GC and startup time are not effected).
+
+
Changed the allThreads static array size to the same as Windows. This in
+ conjunction w/ the stack size change will allow the creation of more than
+ 100 threads on linux for better compatibility w/ the Win32 version.
+
+
Added optional stack size parameter to constructors. Since the stackBottom
+ is static when the threads are created and the stackTop is dynamic based
+ on the stack pointer (or context for Win32), allowing the threads to be
+ created with a non-default stack size shouldn't interfere with the GC. This
+ adds little overhead to either the Win32 or Linux Thread implementations.
+
- The D Style is a set of style conventions for writing
+
The D Style is a set of style conventions for writing
D programs. The D Style is not enforced by the compiler, it is
purely cosmetic and a matter of choice. Adhering to the D Style,
however, will make it easier for others to work with your D
code and easier for you to work with others' D code.
The D Style can form the starting point for a D project
style guide customized for your project team.
+
+
+
Submissions to Phobos and other official D source code will
+ follow these guidelines.
+
White Space
-
-
One statement per line.
+
One statement per line.
-
Two or more spaces per indentation level.
+
Hardware tabs are at 8 column increments.
-
Operators are separated by single spaces from their operands.
+
Each indentation level will be four columns.
-
Two blank lines separating function bodies.
+
Operators are separated by single spaces from their operands.
+
+
Two blank lines separating function bodies.
One blank line separating variable declarations from statements
- in function bodies.
-
+ in function bodies.
+
Comments
-
-
Use // comments to document a single line:
+
Use // comments to document a single line:
statement; // comment
statement; // comment
@@ -239,20 +247,22 @@
+++++/
-
+
Naming Conventions
General
-
Names formed by joining multiple works should have each word
+
Names formed by joining multiple words should have each word
other than the first capitalized.
+ Names shall not begin with an underscore '_'.
int myFunc();
Module
-
Module names are all lower case. This avoids problems dealing
+
Module and package names are all lower case, and only contain
+ the characters [a..z][0..9][_]. This avoids problems dealing
with case insensitive file systems.
@@ -325,6 +335,21 @@
Just say no.
+
Documentation
+
+
All public declarations will be documented in
+ Ddoc format.
+
+
+
Unit Tests
+
+
As much as practical, all functions will be exercised
+ by unit tests using unittest blocks immediately following
+ the function to be tested.
+ Every path of code should be executed at least once,
+ verified by the code coverage analyzer.
+
-
- This module is a set of types and functions for converting any object
- (value or heap) into a generic box type, allowing the user to pass that
- object around without knowing what's in the box, and then allowing him
- to recover the value afterwards.
-
-
- Example
-
-
-
-
- // Convert the integer 45 into a box.
- Box b = box(45);
-
- // Recover the integer and cast it to real.
- real r = unbox!(real)(b);
-
-
-
- That is the basic interface and will usually be all that you need to
- understand. If it cannot unbox the object to the given type, it throws
- UnboxException. As demonstrated, it uses implicit casts to behave in the
- exact same way that static types behave. So for example, you can unbox
- from int to real, but you cannot unbox from real to int: that would
- require an explicit cast.
-
-
- This therefore means that attempting to unbox an int as a string will
- throw an error instead of formatting it. In general, you can call the
- toString method on the box and receive a good result, depending upon
- whether std.string.format accepts it.
-
-
- Boxes can be compared to one another and they can be used as keys for
- associative arrays.
-
-
- There are also functions for converting to and from arrays of boxes.
-
-
- Example
-
-
-
- // Convert arguments into an array of boxes.
- Box[] a = boxArray(1, 45.4, "foobar");
-
- // Convert an array of boxes back into arguments.
- TypeInfo[] arg_types;
- void* arg_data;
-
- boxArrayToArguments(a, arg_types, arg_data);
-
- // Convert the arguments back into boxes using a
- // different form of the function.
- a = boxArray(arg_types, arg_data);
-
-
- One use of this is to support a variadic function more easily and
- robustly; simply call "boxArray(_arguments, _argptr)", then
- do whatever you need to do with the array.
-
-
-
-
struct Box
-
Box is a generic container for objects (both value and
- heap), allowing the user to box them in a generic form and recover
- them later.
-
-
-
TypeInfo type
-
Property for the type contained by the box. This is
- initially null and cannot be assigned directly.
-
-
-
void* data
-
Property for the data pointer to the value of the box. This is
- initially null and cannot be assigned directly.
-
-
-
bit unboxable(TypeInfo type)
-
Return whether the value could be unboxed as the given type without
- throwing an error.
-
-
-
char[] toString()
-
Attempt to convert the boxed value into a string using
- std.string.format; this will throw if that function cannot handle
- it. If the box is uninitialized then this returns "".
-
-
-
bit opEquals(Box other)
-
Compare this box's value with another box. This implicitly casts
- if the types are different, identical to the regular type system.
-
-
-
float opCmp(Box other)
-
Compare this box's value with another box. This implicitly casts
- if the types are different, identical to the regular type system.
-
-
-
uint toHash()
-
Return the value's hash.
-
-
-
-
Box box(...)
-
Box the single argument passed to the function. If more or
- fewer than one argument is passed, this will assert.
-
-
-
Box box(TypeInfo type, void* data)
-
Box the explicitly-defined object. type must not be null; data
- must not be null if the type's size is greater than zero.
-
Convert a list of arguments into a list of boxes.
-
-
-
void boxArrayToArguments(Box[] arguments, out TypeInfo[] types, out void* data)
-
Convert a list of boxes into a list of arguments.
-
-
-
bit unboxable!(T)(Box value)
-
Return whether the value can be unboxed as the given type; if this
- returns false, attempting to do so will throw UnboxException.
-
-
-
T unbox!(T)(Box value)
-
This template function converts a boxed value into the provided
- type. To use it, instantiate the template with the desired result
- type, and then call the function with the box to convert.
-
-
- This will implicitly cast base types as necessary and in a way
- consistent with static types - for example, it will cast a boxed byte
- into int, but it won't cast a boxed float into short. If it cannot
- cast, it throws UnboxException.
-
-
- Example
-
-
-
- Box b = box(4.5);
- bit u = unboxable!(real)(b); // This is true.
- real r = unbox!(real)(b);
-
-
-
class UnboxException : Error
-
This class is thrown if unbox is unable to cast the value into the
- desired result.
-
-
-
this(Box object, TypeInfo outputType)
-
Assign parameters and create the message in the
- form "Could not unbox from type to ."
-
-
-
box object
-
This is the box that the user attempted to unbox.
-
-
-
TypeInfo outputType
-
This is the type that the user attempted to unbox the value as.
-
+
+
+This module is a set of types and functions for converting any object (value
+ or heap) into a generic box type, allowing the user to pass that object
+ around without knowing what's in the box, and then allowing him to recover
+ the value afterwards.
+
+Example:
+
// Convert the integer 45 into a box.
+Box b = box(45);
+
+// Recover the integer and cast it to real.
+real r = unbox!(real)(b);
+
+
+ That is the basic interface and will usually be all that you need to
+ understand. If it cannot unbox the object to the given type, it throws
+ UnboxException. As demonstrated, it uses implicit casts to behave in the exact
+ same way that static types behave. So for example, you can unbox from int to
+ real, but you cannot unbox from real to int: that would require an explicit
+ cast.
+
+
+ This therefore means that attempting to unbox an int as a string will throw
+ an error instead of formatting it. In general, you can call the toString method
+ on the box and receive a good result, depending upon whether std.string.format
+ accepts it.
+
+
+ Boxes can be compared to one another and they can be used as keys for
+ associative arrays.
+
+
+ There are also functions for converting to and from arrays of boxes.
+
+
+Example:
+
// Convert arguments into an array of boxes.
+Box[] a = boxArray(1, 45.4, "foobar");
+
+// Convert an array of boxes back into arguments.
+TypeInfo[] arg_types;
+void* arg_data;
+
+boxArrayToArguments(a, arg_types, arg_data);
+
+// Convert the arguments back into boxes using a
+// different form of the function.
+a = boxArray(arg_types, arg_data);
+
+ One use of this is to support a variadic function more easily and robustly;
+ simply call "boxArray(arguments, argptr)", then do whatever you need to do
+ with the array.
+
+
+Authors:
+Burton Radons
+
+License:
+Public Domain
+
+
+
enum TypeClass;
+
+
The type class returned from Box.findTypeClass; the order of entries is important.
+
< Any other type, such as delegates, function pointers, struct, void...
+
+
+
+
+
+
struct Box;
+
+
Box is a generic container for objects (both value and heap), allowing the
+ user to box them in a generic form and recover them later.
+ A box object contains a value in a generic fashion, allowing it to be
+ passed from one place to another without having to know its type. It is
+ created by calling the box function, and you can recover the value by
+ instantiating the unbox template.
+
+
+
+
bool unboxable(TypeInfo test);
+
+
Return whether this value could be unboxed as the given type without throwing.
+
+
+
+
TypeInfo type();
+
+
Property for the type contained by the box.
+ This is initially null and cannot be assigned directly.
+
+Returns:
+the type of the contained object.
+
+
+
+
+
void[] data();
+
+
Property for the data pointer to the value of the box.
+ This is initially null and cannot be assigned directly.
+
+Returns:
+the data array.
+
+
+
+
+
char[] toString();
+
+
Attempt to convert the boxed value into a string using std.string.format;
+ this will throw if that function cannot handle it. If the box is
+ uninitialized then this returns "".
+
+
+
+
+
bool opEquals(Box other);
+
+
Compare this box's value with another box. This implicitly casts if the
+ types are different, identical to the regular type system.
+
+
+
+
+
float opCmp(Box other);
+
+
Compare this box's value with another box. This implicitly casts if the
+ types are different, identical to the regular type system.
+
+
+
+
+
uint toHash();
+
+
Return the value's hash.
+
+
+
+
+
+
+
Box box(...);
+
+
Box the single argument passed to the function. If more or fewer than one
+ argument is passed, this will assert.
+
+
+
+
+
Box box(TypeInfo type, void* data);
+
+
Box the explicitly-defined object. type must not be null; data must not be
+ null if the type's size is greater than zero.
+ The data is copied.
+
+
+
+
+
Box [] boxArray(TypeInfo[] types, void* data);
+
+
Convert a list of arguments into a list of boxes.
+
+
+
+
+
Box [] boxArray(...);
+
+
Box each argument passed to the function, returning an array of boxes.
+
+
+
+
+
void boxArrayToArguments(Box [] arguments, out TypeInfo[] types, out void* data);
+
+
Convert an array of boxes into an array of arguments.
+
+
+
+
+
class UnboxException: object.Exception;
+
+
This class is thrown if unbox is unable to cast the value into the desired
+ result.
+
+
+
+
Box object;
+
+
This is the box that the user attempted to unbox.
+
+
+
+
TypeInfo outputType;
+
+
This is the type that the user attempted to unbox the value as.
+
+
+
+
this(Box object, TypeInfo outputType);
+
+
Assign parameters and create the message in the form
+ "Could not unbox from type ... to ... ."
+
+
+
+
+
+
+
template unboxCastReal(T)
+
A generic unboxer for the real numeric types.
+
+
+
+
+
template unboxCastInteger(T)
+
A generic unboxer for the integral numeric types.
+
+
+
+
+
template unboxCastComplex(T)
+
A generic unboxer for the complex numeric types.
+
+
+
+
+
template unboxCastImaginary(T)
+
A generic unboxer for the imaginary numeric types.
+
+
+
+
+
template unbox(T)
+
The unbox template takes a type parameter and returns a function that
+ takes a box object and returns the specified type.
+
+To use it, instantiate the template with the desired result type, and then
+ call the function with the box to convert.
+ This will implicitly cast base types as necessary and in a way consistent
+ with static types - for example, it will cast a boxed byte into int, but it
+ won't cast a boxed float into short.
+
+
+Throws:
+UnboxException if it cannot cast
+
+
+Example:
+
Box b = box(4.5);
+ bit u = unboxable!(real)(b); // This is true.
+real r = unbox!(real)(b);
+
+ Box y = box(4);
+ int x = unbox!(int) (y);
+
+
+
+
+
+
+
template unboxable(T)
+
Return whether the value can be unboxed as the given type; if this returns
+ false, attempting to do so will throw UnboxException.
+
+
@@ -69,7 +69,6 @@
std.path std.process std.random
- std.recls std.regexp std.socket std.socketstream
@@ -116,6 +115,10 @@
Dates are represented in several formats. The date implementation revolves
around a central type, d_time, from which other formats are converted to and
from.
+ Dates are calculated using the Gregorian calendar.
+
Compute year and week [1..53] from t. The ISO 8601 week 1 is the first week
of the year that includes January 4. Monday is the first day of the week.
+
MmFile objects control the memory mapped file resource.
- Any errors detected by
- the MmFile objects will throw an instance of
- std.file.FileException.
-
Open memory mapped file filename in mode.
- File is closed when the object instance is deleted.
- filename gives the name of the file. If null, an
- anonymous file mapping is created.
- mode gives the access mode defined above.
- size gives the size of the file. If 0, it is taken to
- be the size of the existing file.
- address gives the preferred address to map the file to,
- allthough the system is not required to honor it. If
- null, the system selects the most convenient address.
- window gives the preferred block size of the amount of data
- to map at one time with 0 meaning map the entire file.
- The window size must be a multiple of the memory allocation page size.
-
-
-
~this()
-
Flushes pending output and closes the memory mapped file.
-
-
-
void flush()
-
Flushes pending output.
-
-
-
Mode mode()
-
Read-only property returning the file mode.
-
-
-
ulong length()
-
Gives size in bytes of the memory mapped file.
-
-
-
size_t window
-
Property holding the window size. When mapping
- data the window on either side of the required range
- is also mapped in order to reduce the probability of thrashing.
- Data is mapped in multiples of the window size unless the entire
- file is mapped.
-
-
-
-
Operator overloads
-
-
-
-
-
void[] opSlice()
-
Returns entire file contents as an array.
-
-
-
void[] opSlice(ulong i1, ulong i2)
-
Returns slice of file contents as an array.
-
-
-
ubyte opIndex(ulong i)
-
Returns byte at index i in file.
-
-
-
ubyte opIndexAssign(ubyte value,ulong i)
-
Sets and returns byte at index i in file to value.
-
Open memory mapped file filename in mode.
+ File is closed when the object instance is deleted.
+
+Params:
+
char[] filename
+
name of the file.
+ If null, an anonymous file mapping is created.
+
Mode mode
+
access mode defined above.
+
ulong size
+
the size of the file. If 0, it is taken to be the
+ size of the existing file.
+
void* address
+
the preferred address to map the file to,
+ although the system is not required to honor it.
+ If null, the system selects the most convenient address.
+
uint window
+
preferred block size of the amount of data to map at one time
+ with 0 meaning map the entire file. The windowsize must be a
+ multiple of the memory allocation page size.
+
+Throws:
+std.file.FileException
+
+
+
+
+
ulong length();
+
+
Gives size in bytes of the memory mapped file.
+
+
+
+
+
Mode mode();
+
+
Read-only property returning the file mode.
+
+
+
+
+
void[] opSlice();
+
+
Returns entire file contents as an array.
+
+
+
+
+
void[] opSlice(ulong i1, ulong i2);
+
+
Returns slice of file contents as an array.
+
+
+
+
+
ubyte opIndex(ulong i);
+
+
Returns byte at index i in file.
+
+
+
+
+
ubyte opIndexAssign(ubyte value, ulong i);
+
+
Sets and returns byte at index i in file to value.
+
+
-
-
-
-Open-RJ is an open-source library that implements readers of the Record-Jar
-structured text file format, designed and implemented by Matthew Wilson, as an
-exemplar project for his column Positive Integration in
-C/C++ Users Journal.
-
-It is implemented in C & C++, with a C-API.
-The implementation of the basic library is platform-independent. Mappings are
-provided to several languages (including C++,
-D,
-Ruby
-and
-STL),
-and others (COM, Java, .NET, Perl, Python) are planned. In addition to
-platform-independence, the library focuses on small runtime
-costs - memory and speed - and the classic UNIX attributes of
-discoverability and visibility.
-
-
-
What is the Record-Jar format?
-
-As described in the excellent book
-"The Art Of UNIX Programming", a Record-Jar structured format file
-consists of records and fields.
-
-
-A field is a single line - optionally extended with trailing '\' - that contains
-a name, separated from an optional value by ':'.
-
-
-A record is a list of fields, whose contents are arbitrary and can vary between
-records in the same database. Records are separated by a line that begins with
-"%%". The record separator also acts as a comment, so
-anything can come on a record separator line after the first two characters.
-
-
-A database is a correctly parsed Record-Jar file. The Open-RJ API (and language
-mappings) provide access to all the records in the database and the complete set
-of fields. Hence, you may work with fields on a per-record basis, or treat the database
-as a single record and with all fields in the database.
-
-
-A very simple Record-Jar file, representing a Pets Database, is shown below:
-
-
-
-Name: Elsa
-Species: Dog
-Breed: Mixed
-%%
-Name: Fluffy Kitten
-Species: Cat
-%%
-Name: Rebel
-Species: Dog
-Breed: German
- Shepherd
-%%
-Name: Pepper
-Species: Dog
-Breed: Border Collie
-%%
-Name: Samson
-Species: Dog
-Breed: Ridgeback
-%%
-Name: Sheltie
-Species: Dog
-Breed: Shetland
- Sheepdog
-%%
-Name: Sparky
-Species: Cat
-%%
-
-
-
-And that's pretty much all there is to it. There are no restrictions on what fields may
-be in a record, and no controls over whether all records have the same fields or not.
-That's the job of higher layers of application functionality. We keep Record-Jar simple
-so it's reliable, portable and fast, and it's those things in spades!
-
-
-
std.openrj
-
-The D mapping of Open-RJ is packaged with Phobos in the std.openrj
-module. It consists of four classes:
-
- Exception class, derived from OpenRJException,
- thrown if the database Jar file cannot be opened, or its contents do not represent a
- correctly formed Open-RJ database.
-
- The DatabaseException class has the following properties:
- methods:
-
-
-
ORJRC rc()
-
The general error code associated with the exception
-
-
-
ORJ_PARSE_ERROR parseError()
-
The parsing error code associated with the exception
-recls - standing for recursive ls - is a platform-independent
-recursive search library, designed and implemented by Matthew Wilson, as the first
-exemplar project for his column Positive Integration in
-C/C++ Users Journal.
-
-recls currently supports recursive searching of file systems (UNIX and Windows), and
-FTP sites (currently Windows-only). Future enhancements may include recursive-searching of the
-Windows registry, source-code control systems, and, of course, FTP-searching for UNIX platforms.
-
-recls is implemented in C++, using the
-STLSoft
-libraries (which are also bundled with Digital Mars; see
-stlsoft.digitalmars.com),
-and presents a C-API. recls is also mapped to a host of other languages and
-technologies, including C++, COM, C#/.NET, Java, Ruby
-and STL among an ever-expanding list. Given its non-trivial size, the recls D
-mapping is a good place to learn about interfacing C libraries to D.
-
-The recls homepage is www.recls.org,
-from which updates to the library, and all the other language mappings, may be obtained. Support
-for recls has evolved to piggy-back on the
-STLSoft newsgroup, although
-questions about using recls in D should be directed through the main
-D newsgroup, and bugs in
-recls (in D) should be reported to the
-D bugs newsgroup.
-
-The Windows version of the D mapping of recls uses a crude-but-adequate delay-loading
-mechanism such that linking to WinInet.lib is not required. This strategy was necessitated by
-D's linkage model, and was elected to avoid encumbering executables with something that they
-may not use. There is are negative effects if the program explicitly uses WinInet.lib for
-other aspects.
-
-The recls object model is comprised of the following classes:
-
- // Enumerate all the zip and exe files on the Digital Mars FTP server
- Search s = new FtpSearch("ftp.digitalmars.com", "anonymous", "", "/",
- "*.zip;*.exe", RECLS_FLAG.RECURSIVE | RECLS_FLAG.PASSIVE_FTP);
-
- or
-
- // Enumerate all the three-letter first-level sub-directories beginning
- // with s of H:\SynSoft\D\phobos\
- FileSearch s = new FileSearch("H:\SynSoft\D\phobos\", "s??",
- RECLS_FLAG.DIRECTORIES);
-
-
-
- Enumerate the search instance, using foreach.
-
- foreach(Entry e; s)
- {
- if(e.size < 2000)
- {
- writef(e.path); // e.g. "/Digital_Mars_C++/STL"
- writef(e.directory); // e.g. "/Digital_Mars_C++/STL"
- writef(e.file); // e.g. "stlport.zip"
- writef(e.fileName); // e.g. "stlport"
- writef(e.fileExt); // e.g. "zip"
- ...
- }
- }
-
- The many properties of the Entry class are used to provide
- access to all attributes of file/directory entries.
-
- The FileSearch class derives from the
- Search class, and has the following
- methods:
-
-
-
this(in char[] searchRoot, in char[] pattern, in uint flags)
-
Create a search object with the given searchRoot, pattern and flags
-
-
searchRoot The root directory of the search. If null, or the empty string, the current directory is assumed
-
pattern The search pattern. If null all entries are returned (equivalent to specifying
- wildcardsAll().) If the empty string, the search returns an empty result set.
-
flags A combination of RECLS_FLAG flags which moderate the search
-
-
Note: pattern can be a composite pattern, e.g. "*.exe;*.zip;*.c??", but the separator must
- be the correct one for the local operating system (see getPathSeparator()).
- The FtpSearch class derives from the
- Search class, and has the following
- methods:
-
-
-
this(in char[] host, in char[] username, in char[] password, in char[] searchRoot, in char[] pattern, in uint flags)
-
Create a search object with the given searchRoot, pattern and flags
-
-
host The name of the host providing the FTP service
-
username The username of the acount to use to log on to the FTP server
-
password The password of the acount to use to log on to the FTP server
-
searchRoot The root directory of the search. If null, or the empty string, the current directory is assumed
-
pattern The search pattern. If null all entries are returned (equivalent to specifying
- wildcardsAll().) If the empty string, the search returns an empty result set.
-
flags A combination of RECLS_FLAG flags which moderate the search
-
-
Note: pattern can be a composite pattern, e.g. "*.exe;*.zip;*.c??", but the separator must
- be the correct one for the local operating system (see getPathSeparator()).
Returns an array of all file-system roots on the local system.
-
- On Unix, this always returns an array with a single entry which is "/". On Windows,
- it will return an array of strings representing the drives, e.g. "C:", "D:", "H:", "Y:"
-
.
-
-
-
-
char[] getPathNameSeparator();
-
Returns the symbol used to separate distinct path names in path name lists.
-
- On UNIX this is "/"; on Win32 it is "\".
-
.
-
-
-
-
char[] getPathNameSeparator();
-
Returns the symbol used to separate the directory parts within paths.
-
- On UNIX this is ":"; on Win32 it is ";".
-
.
-
-
-
-
char[] wildcardsAll();
-
Returns the wildcard symbol used to represent the "all files" for the current operating system.
- Determines whether the given directory is empty.
-
.
-
-
-
-
recls_filesize_t calcDirectorySize(char[] dir, int bRecurse);
-
recls_filesize_t calcDirectorySize(Entry dir, int bRecurse);
-
- Determines the size of the given directory. If bRecurse is non-0, it calculates the size of all
- sub-directories, otherwise it counts only the sizes of the files in the given directory.
-
.
-
-
-
-
-
-
-Copyright (c) 2003-2004 by Matthew Wilson, Synesis Software Pty Ltd, All Rights Reserved
-
-
Constructor used by classes derived from Thread that override main().
+ The optional stacksize parameter default value of 0 will cause threads
+ to be created with the default size for the executable - Dave Fladebo
Constructor used by classes derived from Thread that override run().
@@ -278,6 +279,13 @@
+
int isSelf();
+
+
Returns non-zero if this thread is the current thread.
+
+
+
+
static Thread getThis();
Returns a reference to the Thread for the thread that called the
diff -uNr dmd-0.154/dmd/html/d/phobos/std_uni.html dmd-0.155/dmd/html/d/phobos/std_uni.html
--- dmd-0.154/dmd/html/d/phobos/std_uni.html 2006-04-10 13:42:56.000000000 +0200
+++ dmd-0.155/dmd/html/d/phobos/std_uni.html 2006-04-28 00:08:38.000000000 +0200
@@ -24,7 +24,7 @@
| D
| Comments
-
The Microsoft Windows debugger \dmd\bin\windbg.exe
+ can be used to
+symbolically debug D programs, even though it is a C++ debugger.
+Versions of windbg.exe
+ other than the one supplied may not work with D.
+
+
+
To prepare a program for symbolic debugging, compile
+with the -g switch:
+
+
+
dmd myprogram -g
+
+
+
To invoke the debugger on it:
+
+
+
windbg myprogram args...
+
+
+
where args...
+ are the command line arguments to myprogram.exe.
+
+
+
When the debugger comes up, entering the command in the command window:
+
+
g _Dmain
+
+
+
will execute the program up until the entry into main().
+From thence, pressing the F10 key will single step each line
+of code.
+
+
Basic Commands:
+
+
+
F5
+
Go until breakpoint, an exception is thrown, or the end of the program.
+
+
F7
+
Continue until cursor.
+
+
F8
+
Single step, stepping into function calls.
+
+
F10
+
Single step, stepping over function calls.
+
+
+
For more comprehensive information on windbg, consult the
+file \dmd\bin\windbg.hlp
+.
+