Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic TAU (steve huntington)
Decrease font size
Increase font size
Topic Title: Importing dependent on PreProcessor
Topic Summary: Importing dependent on Pre-Processor
Created On: 30-Mar-2006 18:37
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 30-Mar-2006 18:37
User is offline View Users Profile Print this message


Cherie Middleton

Posts: 15
Joined: 18-Nov-2005

Has anyone imported (reverse engineer) legacy code into Tau. I have tried but it seems I get different syntax errors depending on which Pre-Processor I use. I have tried GCC and Visual Studio (Microsoft) compilers and the both while trying to import give me different syntax errors. I was just wondering what else I need to change in my setup.

Also I was told that while importing files if Tau comes across an translation error while translating it will just report it and continue to import the rest of the code. When I try to import and Tau encounters an error while trying to import it stops and doesn't import any data types defined in my header files.

Report this to a Moderator Report this to a Moderator
 4-Apr-2006 00:06
User is offline View Users Profile Print this message


Ian Barnard

Posts: 91
Joined: 4-Jul-2002

Cherie

TAU can import the definitions present in C and C++ code by parsing the header files containing e.g. function prototypes and class definitions. It stops when it sees an error, but definitions imported up to that point are loaded into the model.

The usual way to do import is using the C/C++ Importer, which runs the preprocessor, but because (despite the attempts at standardisation) there are effectively different dialects of C++, the importer allows selection of the dialect you are using; you have to select the one appropriate for your code. For example there is no point choosing gcc if the preprocessor is going to be including e.g. stdio.h from Microsoft Visual Studio because that will simply not work.

And of course to run the preprocessor you need to provide all the -D and -I options which are needed to compile the code correctly, just as when compiling the code, usually set in your makefile. If you don't do this you are likely to see errors because, for example, unexpanded preprocessor macro usage does not conform to what the importer is expecting which is C++ syntax (i.e. AFTER the preprocessor has been applied).

Please check that you have setup the preprocessor -D and -I settings correctly. If you have a maintenance contract and are still having problems you should report this to support.

Regards
Ian


-------------------------
=============
Ian Barnard
Principal Consultant
Telelogic UK, an IBM company
Report this to a Moderator Report this to a Moderator
 4-Apr-2006 22:16
User is offline View Users Profile Print this message


Cherie Middleton

Posts: 15
Joined: 18-Nov-2005

I understand and know how to import. I guess my basic question is if it encounters an error in translating during an import, does Tau just report the error and continue on importing or does it just stop completely.
Report this to a Moderator Report this to a Moderator
 13-Apr-2006 11:39
User is offline View Users Profile Print this message


Ian Barnard

Posts: 91
Joined: 4-Jul-2002

If it's a C++ 'syntax error', yes it stops. The C++ you're importing has to be compilable.

HTH
Ian

-------------------------
=============
Ian Barnard
Principal Consultant
Telelogic UK, an IBM company
Report this to a Moderator Report this to a Moderator
 2-May-2006 20:08
User is offline View Users Profile Print this message


Cherie Middleton

Posts: 15
Joined: 18-Nov-2005

The C++ code is compilable. I was informed from the User Conference that if it comes across an error during translation that it will stop importing.
Report this to a Moderator Report this to a Moderator
 2-May-2006 22:52
User is offline View Users Profile Print this message


Ian Barnard

Posts: 91
Joined: 4-Jul-2002

Cherie

Without seeing the detail of the code you are trying to import and the settings of the importer I can't really help more. Maybe you should you try either a) asking for help from your Telelogic Account Manager (he may be able to arrange a discussion with one of our Application Engineers or Consultants to clear up the problems you are having), or b) ask this question directly to your local Telelogic support office.

Regards
Ian

-------------------------
=============
Ian Barnard
Principal Consultant
Telelogic UK, an IBM company
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic TAU forum.
There are currently 1 users logged in.
The most users ever online was 15 on 31-Mar-2008 at 16:22.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.