reverse engineering?

Hello,

what tool do you guys use for reverse engineering? I have not yet been able to find a tool that properly reverse engineer C++ code to UML. The best I found was StarUML but it still has many problems and is unusable with most projects.

What are your thoughts on this matter?

Thank you!
First let me say that I'm not an expert on this topic.

In case you didn't know already, I just wanted to say that Visual Studio 2008 and above has 'limited functionality' for generating class diagrams from native C++ code:

http://msdn.microsoft.com/en-us/library/bb385735.aspx

However, I don't think it's included in the free express editions...
"Reverse engineering" is a black art. There is no tool to "decompile" code to its sources.

There do exist tools that will get you close, but that's the best you can get.


It should be noted that RE is not something that most people mess with -- those who spend a lot of time with it are typically doing something illegal (or classified).
i also want to know the behind the scenes of this reverse engineering.. though c++ to UML i think is not reverse engineering..
All there is to it is some pattern recognition.

The problem is that the patterns for things can be very complex. Consider the basic iostream classes. How do you "decompile" that? And when you do, you have no way of knowing what is public, private, etc. What names do you give things?

Even before you compile code, you can write clean, easy to read stuff, or you can write things that will completely lose you. RE takes clean stuff and undoes it to something barely legible. There simply aren't enough clues in the machine code to tell you more.


Some systems are old enough or simple enough that compiler vendors would also sell stuff that "decompiles" their own code. (This is sometimes a useful tool.) Such things got you a great deal more information simply because the decompilation can be "rigged": there is more information available than usual.

Systems like the GCC make it very hard, because it purposefully produces different output every time. (This is a security feature.)


If you google around "decompile" and "reverse engineer c++" and the like you might find some interesting reading. But beware.

Good luck!
closed account (z05DSL3A)
Tools such as Rational Rose, talk in terms of forward, reverse and round trip engineering. When you generate code from the UML model you forward engineer. If you then modify your code, you reverse engineer the code changes into the model. The the process of doing both is round trip engineering.
@Duoas, Well, I usually use (or would use!) reverse engineering for studying others project. For exemple, I was having a look at Geometric tools's Wild Magic, inside which most class are declared as follows: class WM4_CLASS TheClass{...}. The tools I tried all fail with this syntax, they think the class name is WM4_CLASS and most of the parsing is screwed... Unfortunately most of the stuff I want to reverse engineer tend to use this type of syntax.

I do not want to reverse engineer complete projects. I only take the header files relevant to the part I am curious about.

Thanks!
Just start your drawing from the scratch, reverse engineer may affect your learning method. And i know it may be very complicated. Go buy UML book
Last edited on
My question was about reverse engineering tools. Not about the pertinence of my learning methods.

But, for the sake of arguing ;), in my opinion, when you have experience in one topic, you can generate many new design ideas by looking at the architecture of existing systems. No solution is perfect and while thinking about a new architecture, looking at the existing ones is very benific. It often helps you see constraints and limitations you were not aware of. And I believe that UML is a great way of doing so.

And, for the record, I own and read both of David Eberly's book on wild magic. Still i find it much more convinient to look at a UML diagram than to go through 100 pages of text.
Topic archived. No new replies allowed.