92 lines
3.9 KiB
Plaintext
92 lines
3.9 KiB
Plaintext
Installs IDE expert which assists to insert JCL Debug
|
|
information into executable files. This can be useful when use
|
|
source location routines from JclDebug unit. These routines
|
|
needs some kind of special information to be able to provide
|
|
source location for given address in the process.
|
|
Currently there are four options to get it work:
|
|
|
|
1. Generate and deploy MAP file with your executable file. The
|
|
file is generated by the linker. It needs to be set in
|
|
Project|Options dialog->Linker page, Detailed checkbox.
|
|
|
|
2. Generate and deploy JDBG file file with your executable
|
|
file. This is binary file based on MAP file but its size is
|
|
typically about 12% of original MAP file. You can generate
|
|
it by MapToJdbg tool in jcl\examples\vcl\debugextension\tools
|
|
folder. The advantage over MAP file is smaller size and better
|
|
security of the file content because it is not a plain text
|
|
file and it also contains a checksum.
|
|
|
|
3. Generate Borland TD32 debug symbols. These symbols are
|
|
stored directly in the executable file but usually adds
|
|
several megabytes so the file is very large. The advantage
|
|
is you don't have to deploy any other file and it is easy
|
|
to generate it by checking Include TD32 debug info in
|
|
Linker option page.
|
|
|
|
4. Insert JCL Debug info into executable file by the IDE
|
|
expert. The size of added data is similar to JDBG file but
|
|
it will be inserted directly into the executable file. This
|
|
is probably best option because it combines small size of
|
|
included data and no requirement of deploying additional
|
|
files.
|
|
In case you use this option you need install the
|
|
JclDebugIde expert.
|
|
|
|
The IDE expert will add new item to IDE Project menu.
|
|
It adds 'Insert JCL Debug data' check item at the end
|
|
of the Project menu. When the item is checked, everytime
|
|
the project is compiled by one of following commands:
|
|
Compile, Build, Compile All Projects, Build All Projects
|
|
or Run necessary JCL debug data are automatically
|
|
inserted into the executable. Moreover, for Build and
|
|
Build All commands dialog with detailed information of
|
|
size of these data will be displayed.
|
|
|
|
You can generate those debug data for packages and
|
|
libraries as well using the expert. Each executable file
|
|
in the project can use different option from those
|
|
listed above. It is not necessary to generate any debug
|
|
data for Borland runtime packages because the source
|
|
location code can use names of exported functions to get
|
|
procedure or method name. To get line number information
|
|
for Borland RTL and VCL/CLX units you have to check Use
|
|
Debug DCUs checkbox in Project|Options dialog -> Compiler tab.
|
|
Unfortunately it is not possible to get line number
|
|
information for Borland runtime packages because Borland
|
|
does not provide detailed MAP files for them so you get
|
|
procedure or method name only.
|
|
|
|
In case you have more than one data source for an executable
|
|
file by an accident the best one is chosen in following order:
|
|
|
|
1. JCL Debug data in the executable file
|
|
2. JDBG file
|
|
3. Borland TD32 symbols
|
|
4. MAP file
|
|
5. Library or Borland package exports
|
|
|
|
It is also possible to insert JCL debug data programmatically
|
|
to the executable file by using MakeJclDbg command line tool
|
|
in jcl\examples\tools folder. You can study included makefiles
|
|
which uses this tool for building DelphiTools examples.
|
|
|
|
Short description of getting the JclDebug functionality
|
|
in your project:
|
|
|
|
1. Close all running instances of Delphi
|
|
2. Install JCL and IDE experts by the JCL Installer
|
|
3. Run Delphi IDE and open your project
|
|
4. Remove any TApplication.OnException handlers from
|
|
your project (if any).
|
|
5. Add new Exception Dialog by selecting
|
|
File | New | Other ... | Dialogs tab,
|
|
Select 'Exception Dialog' or
|
|
'Exception Dialog with Send' icon, Click OK button,
|
|
Save the form (use ExceptionDialog.pas name, for
|
|
example)
|
|
6. Check Project | Insert JCL Debug data menu item
|
|
7. Do Project | Build
|
|
|
|
|