Runtime polymorphic types and enhanced RTTI

Started by
1 comment, last by Telastyn 18 years, 8 months ago
I am nearing the completion of code for an article I have been considering writing. The topic deals with runtime polymorphic types and enhancing the existing RTTI available in C++ (and specifically the MS C++ compiler). The code originally started out as a way to access all of the RTTI information generated by the compiler for polymorphic types but has grown considerably since its inception. My current intention for the article is to cover the following topics: 1. Documenting the RTTI data structures generated by MSVC including a framework for accessing the data. 2. Generating a catalog of classes, structs, enumerations, and type aliases (typedefs). 3. Using the catalog to provide reflection API's. 4. Provide runtime virtual inheritance. 5. Allow automatic generation of marshaling for interpreted/scripted environments. C# and the Mono implementation of the ECMA-335 runtime are being used for the article examples. Currently the only portion of the effort which is unfinished is the tool for gathering all of the type and RTTI information. The tool pulls all the necessary information from the program database file that is generated by the compiler. This uses the (typically named) vc70.pdb file which is the only complete source of type information before the library/program link is started. Unfortunately the debug helper lib (dbghelp.dll) does not handle this this file properly and the DIA SDK is only available with the Universal MSDN distro. This means the PDB lib needs to be implemented which is the only major delay for starting on the article itself. I am very interested in getting some input from other developers on different features and functionality they would like to see in this library. If I was writing the library just for myself I probably wouldn't care much but since I'm targeting a fairly large audience I figured I would get some opinions on what type of information and features other developers would like. Suggestions? Requests?
Advertisement
I usually don't use RTTI for very much, but I was under the impression that the .PDB wasn't required to be available for the compiled features to work.

I do have a request: I wish to be able to edit what's in a .PDB file, and create them from scratch for an existing .EXE (manually, of course, using some kind of .PDB editor app).

I'm wanting about to write a stand-alone debugger with some custom features (tracking execution to gather performance data by breakpointing and using a counter for each function without manually coding it in to the application) that Visual Studio's debugger doesn't have. The major problem is that I have no idea how to access the debugging information, so basically all I have is an assembly-view debugger, and just finding function entry points is challenging (searching for CALL is harder than it sounds).

[Edit] VS *does* have breakpoint counters, but you have to add them to every function manually.
Perhaps this is a problem only I have, but I find many libraries and tools like this to be far harder to use than they really should be. Some good ease of use goes a long way. Like for #2, most seem to create a convoluted process to get the catalog printed, when its something that should be as easy as running an exe from the directory the pdb is in [or specifying the path as a parameter].

This topic is closed to new replies.

Advertisement