Root > Advanced topics > Using EurekaLog with other software > Debug information converters

Debug information converters

Previous pageReturn to chapter overviewNext page   

Debug information is necessary to display human-readable code location descriptions. It's used by many debugging-related tools to show readable information instead of RAW pointers. There are different formats of debug information. Each tool understands some of these formats. Another tool may understand other formats. If particular tool doesn't understand debug information format of your executable - then it will not show any useful information. For example, Delphi and C++ Builder supports variety of debug formats: embedded dcu/obj, .map (output only), .tds (TD32), .rsm (remote debug), DWARF (currently: 64-bit C++ Builder only) - all of these (except for DWARF) are Borland/CodeGear/Embarcadero-centric. On the other hand, Microsoft tools support Microsoft formats: .dbg and .pdb. Obviously, Embarcadero and Microsoft tools do not understand each other.

 

You can use debug information converters to solve such issues. These converter tools will take some form of debug information as input and convert it into another form.

 

 

Process Explorer tool shows no useful information about Delphi project

 

 

The same project after its debug information converted to DBG format

 

 

Same project after enabling Microsoft debug information for system DLLs

 

There are tools (like map2dbg or tds2pdb) which are able to convert map/tds to dbg/pdb - to make integration with Microsoft tools possible (such as Process Explorer or WinDbg). Basically, such converter tools require executable and debug information source. You can call them after compilation of your project to convert debug information file. Therefore, your actions to integrate with debug information converter would be:

1. Configure your project for maximum debugging. Be sure that required debug format option is turned on.
2. Place a call to converter tool to post-build event.

 

 

Example: Process Explorer and map2dbg tool

1. Create or open the project.
2. Enable and configure EurekaLog.
a. Set "Linking / Map file" = "Detailed" (Delphi) or "Detailed segment map" (C++ Builder). Be sure that "Map with mangled names" option is turned off (if it's present).
b. Enable "Linking / Debug information" (new Delphi), "Include TD32 debug info" (old Delphi) or "Full debug information" (C++ Builder). Be sure that "Place debug information in separate TDS file" option is turned on (if it's present).
c. Enable "Stack frames", "Debug information", "Use Debug DCUs" and (optionally) "Range checking" options on "Compiling" page (Delphi only).
d. Enable "Debug information" and "Debug line number information" options on "C++ Compiler"/"Debugging" page (C++ Builder only).
4. Open build events page and place a call to map2dbg tool to post-build event (success): map2dbg "%_IDETarget%"
5. Build your project.

 

Notes:

Do not confuse post-build's success and failure events. You need to insert call to post-build success event, not into post-build failure event.
You may need to specify full file path for tool's .exe file (like C:\Tools\map2dbg.exe).
Do not forget about surrounding double quotes for files with spaces in path.
Delphi/C++ Builder 2007+ also have build events. You can use either EurekaLog's or IDE's build events.
Debug information converter tool may run before or after EurekaLog's post-processing.

 

If you've done everything correctly - you should see a information about your Delphi/C++ Builder project in Process Explorer tool. Run your application, launch Process Explorer, right-click on your project in Process Explorer and click on "Properties", switch to "Threads" tab, pick a thread and click on "Call stack" button. You should see readable locations about your code instead of just module name + RAW offset.

 

 

See also:

Tools:
otds2pdb (another author)



Send feedback... Build date: 2024-09-30
Last edited: 2024-04-05
PRIVACY STATEMENT
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.


Permanent link to this article: https://www.eurekalog.com/help/eurekalog/external_di_converters.php