So, for the Sinewave.Exe program, it would look like this:
CIDDep /OUT=Sinewave.Depend *.Cpp
CIDDep also does not understand all of the various ways of doing conditional compilations. It understands these forms:
#if defined(XYZ)
// Include this if XYZ is defined
#endif
#if !defined(XYZ)
// Don't include this if XYZ is defined
#endif
#if defined(ABX) \
|| (defined(XYZ)
//
// Include this if ABC or XYZ is included. Note that they are put
// on separate lines. Only the || (OR) condition is understood
// right now. And also note that the \ line extension character is
// required to wrap the conditional test to multiple lines.
//
#endif
The CIDLib system will catch any traps and/or fatal runtime errors and
generate a file, in the current directory, with the name ErrorInf.CIDLib. This
file will contain the information about the trap/error and a trace up the call
stack from the place of the error to the start of that thread. Each entry in
the call stack trace indicates which Dll/Exe the call was in, along with an
offset within that Dll/Exe.
You can use the MapDump.Exe program to map this address to a method. It will
look for the closest match in the map file, unmangle it, and display it. The
displayed method name has all of the type information of the parameters.
MapDump 0x20021 C:\MyResDir\MyDll.Map
The output might look something like this:
MapDump.Exe, A CSet/2++ Map File Parser Utility
Copyright (c) `CIDCorp 1994..1995
Author: Dean Roddey
Closest match is symbol: MyClass::MyFunction(const TMyType* const,double)
You will have to keep the Map files of any releases you send into the field in order to be able to map trap/error info provided by the client to places in the code for that release.
When you start a new session, you will be presented with a dialog which shows the available applications on the left and the available metrics groups on the right. As you select different applications in the left list box, the metrics groups available to you will be updated on the right. Make the appropriate selections and press the Accept button.
The top group of fields display information that is process wide. For
instance, each application has an unsigned field and a string to which it can
write program specific information. And there is also the termination code
left when the program exits and the process' state.
One of these shared resources is the process' metrics data area. When you choose "New Session" and select a process, that list of processes comes from the process registry. When you select on, MiniMetrics builds the name to associated metrics information using the process id it gets from the registry entry for the selected process.
CIDBuild is a raw C++ program. It does not depend upon any CIDLib functionality since it is used to build CIDLib itself. It is just a TTY style program that acts as much as possible like the standard command line prompt. When you type commands, any unrecognized stuff is passed on to Cmd.Exe to be interpreted as usual. CIDBuild specific commands are handled by the shell itself. This allows it to provide value added command line functionality.
CIDBuild uses a text project file, written by you, to describe the build environment, the projects, and the attributes of those projects. It also supports a powerful symbolic token system.
CIDLib comes with a project file for building itself and its demo programs,
which is set up so that you can build CIDLib right there in place under the
CIDLib installation directory. This is fine for playing around; but, if you
want to do serious work or have your own build tree, then you will want to
set up your own development tree with its own project file.
CIDBuild [Dev|Prod]
It will display some startup information, parse the project file, and
present a prompt, ready to go to work. To see a list of the available
commands, type ? at the prompt. To see help on a particular command, then
type:
xxx ?
where xxx is the command of interest.
The Dev or Prod command line parameter will cause either the DEVBUILD or
PRODBUILD token to be defined. You can use this to put conditional code into
the project file for either development or producton builds.
The known and obvious limitations are:
CD @xxx
where xxx is either a symbol defined in the project file (or manually from the
shell command line) or a project name. First the list of defined projects is
searched. If xxx matches a project name, then the current directory is changed
to the home directory of that project. Otherwise it is assumed to be a symbolic
value and the symbol is expanded and used as a directory name.
If no symbolic values are present, then the command is executed verbatim. Note
that, unlike the OS/2 command line, there must be a space between CD and the
directory. I.e. you can't type CD\MyDir, though that is a valid OS/2 command
line.
Cmp has these forms:
Cmp filename
Cmp DEPEND
The first form compiles one or more target files, such as *.Obj or MyProject.Res.
Note that the case of the target file is significant, and must match that of the
actual file on disk (a side effect of DMake.) The second form just rebuilds the
dependency file for the project in the current directory.
Contrast the Cmp command to the Make command which rebuilds the entire
project, or at least any files that are out of date from DMake's perspective.
Dbg has these forms:
Dbg [parms]
Dbg RAW
The first version invokes the debugger with the project Exe name and passing
along any parameters given to the Dbg command. The second command does the same
environmental setup but does not provide the exe name, so the debugger startup
dialog shows up.
If no parameters are provided to the Dbg command, then the symbol $(DefDbgFlags) is used. This symbol defaults to /p- if you don't set it in the project file or via the command line. The /p- tells the debugger not to reuse the profile for this project. If you want to have the default be to use the old profile, then set it to "" or /p+.
If you set the DBGPARMS attribute for the project file, these will be passed
as the parameters to the program being debugged. Otherwise you will not be
given a chance to give program parameters. If you set like this, DBGPARMS=*,
then you will be prompted for program arguments when you invoke the dbg command.
Note that the same command line editing and recall is available here as at the
main shell prompt.
Dir has these forms:
Dir @projname [wildcard]
Dir @symbol [wildcard]
Dir [wildcard]
The first form will show all (or the matching) files within the home directory
of the indicated project. The second format will show all (or the matching)
files within the directory obtained by expanding the indicated symbol. The
last form is basically just like the regular OS/2 command line Dir.
The form is:
GrepAll [options] pattern
where pattern is the pattern to grep for. The options, and the format of your
pattern string, are determined by the grep utility you use.
Since it is used so often, you can change the home token by just typing
Home xxxxx, where xxxx is the new home directory. You will be changed to that
directory and it will become the new home directory.
Project has these forms:
Project projname
Project Projname Env
The first form shows you the magic (i.e. specially understood by the shell)
symbols for the project. The second form shows you any environment variables
defined for the project (using the SET= form.)
This command will maintain up to 9 previous zips. When you issue the command, it will check the archive directory and rename any existing Zips upwards, deleting the 10th one if it exists. The files are named CIDSourceX.Zip where X is the number 1 through 9. The output of the Zip process is dumped to a file named CIDSourceX.List, with the same number X. This lets you go back later and quickly see what was put into the Zip.
For the demo project file that comes with CIDLib, this command is not very
useful since _CIDRoot points to the installation directory. Later though, when
you set up your own development tree, it will be more useful.
*.Bak;*.Err;Dump.Txt;
This makes the scrub command very flexible, however it cannot be defined
differently for different projects. It applies the same to any current
directory.
Scrub has these forms:
Scrub
Scrub All
Scrub dirname
The first form scrubs from the current directory. The second scrubs all project
directories plus those paths lists in the symbol $(ScrubPath). ScrubPath is a
list of directories, like the OS/2 LIBPATH for instance, that should be scrubbed
in addition to project directories. The last form will scrub a single target
directory. Of course you cannot scrub a subdirectory, of the current directory,
named All because that will be interpreted as the second form.
Set has these forms:
SET Symbol
SET Symbol=
SET Symbol=Value
The first form shows the current value, if any, of the symbol. The second form
sets the symbol to the value ``. The last form sets the symbol to the passed
value. Symbols can be used in the Value part of the equation, including the
same symbol as is being set (which is how you concatenate onto an existing
symbol value.)
Show has these forms:
Show OS2Env
Show ShellEnv
Show Make
Show Projects
The OS2Env modifier will show the variables of the OS/2 environment as it was
seen by the shell when it started. The ShellEnv modifier shows the values of
the specially recognized shell symbols. The Make modifier shows the settings
defined in the Make project, which is a special environmental project. The
Projects modifier shows the currently defined projects, in alphabetical order.
Define symbolic values
Set up the DMake environment
Configure the shell prompt
Configure some special directories and paths used by the build
Configure the projects and their attributes
#define MyWorkDir=C:\MyDirectory\Work
To use a symbolic value after it has been defined, you would use it like this:
#define SomePath=C:\Path1;C:\Path2;$(MyWorkDir);
This would cause MyWorkDir to be expanded when this line is read from the
project file. Since the project file is parsed and compiled in a single pass,
you must define all symbolic values before they are used (unless they are
'double dollared' so that their value does not get evaluated.)
Symbolic values can also be used on the command line. When you press Enter after typing a command, any symbolic values are expanded before the command is interpreted. Some commands, such as CD (change directory), have a special syntax for symbolic values, in order to save typing. To change to the directory defined above, I would type:
CD @MyWorkDir
This is a lot faster than using the standard $(value) syntax, but it can only
used in certain commands where its use is unambiguous. Note that CD first
checks the symbolic name to see if it is a project name and changes to that
project's directory. If its not a project name, then it is looked up as a
symbolic name.
If you want to define a token such that it survives the expansion phase, so that it can be expanded later when used, then type it like this:
#define Prompt=[$$(CurDir),$$(BuildMode)]After this, the value of Prompt is [$(CurDir),$(BuildMode)], so the extra dollar sign told the build shell not to expand it. This particular symbolic value, Prompt, often uses this scheme. It is discussed below.
You must use the old style #ifdef xxx keywords to check for value being
defined, as apposed to the newer #if defined(xxx) style.
#define Prompt=[$$(CurDir),$$(BuildMode)]
So it shows the current directory and the build mode. Basically the prompt
lets you display any symbolic values defined by you in the project file or
magically by the shell. Note the special syntax with the double dollars to
prevent the symbol from getting expanded when the line is read from the
project file.
You can use the Prompt command at runtime to change the prompt, but it
will revert to what is defined in the project file the next time the build
shell is run.
Defined by the shell
Archive - The value of the _CIDArchive environment variable
DevBuild - Defined to 1 if shell is started with Dev parameter
ProdBuild - Defined to 1 if shell is started with Prod Parameter
Rel - The value of the _CIDRelease environment variable
Root - The value of the _CIDRoot environment variable
Special symbols defined by you in the Project file
BuildPath - Path to the Build files, see Build Files below
DefDbgFlags - Used by the Dbg command if no parms are provided
Prompt - The prompt the shell should display
ScrubList - The list of files to use with the Scrub command
ScrubPath - The non-project directories to be scrubbed by Scrub All
Src - The Source directory, $(Root)\Source
Archive is a special one that you may or may not make use of. It is a
directory that I use to archive Zips of my source code to periodically. The
SaveSource command will zip the entire tree, starting at _CIDRoot, to the
archive directory.