ROSE 编译器框架/预处理信息
除了节点和边,ROSE AST 可能还具有除节点和边之外的属性,这些属性附加用于预处理信息,如 #include 或 #if .. #else。 它们附加在附近的 AST 节点之前、之后或内部(只有具有源位置信息的节点)。
例如,一个示例翻译器将遍历输入代码的 AST 并转储信息,这些信息可能包括预处理信息。
例如
exampleTranslators/defaultTranslator/preprocessingInfoDumper -c main.cxx ----------------------------------------------- Found an IR node with preprocessing Info attached: (memory address: 0x2b7e1852c7d0 Sage type: SgFunctionDeclaration) in file /export/tmp.liao6/workspace/userSupport/main.cxx (line 3 column 1) -------------PreprocessingInfo #0 ----------- : classification = CpreprocessorIncludeDeclaration: String format = #include "all_headers.h" relative position is = before
源代码: http://www.rosecompiler.org/ROSE_Tutorial/ROSE-Tutorial.pdf(第 29 章 - 处理注释、预处理器指令以及向生成的代码添加任意文本)
它是一种 ROSE AST 元信息,用于存储源代码注释。
它们并不独立存在,而是附加到定位的 sgnode。
- before:代码段之前
- after:代码段之后
- inside:在空作用域内
PreprocessingInfo::RelativePositionType position=PreprocessingInfo::before
enum RelativePositionType
{
defaultValue = 0, // let the zero value be an error value
undef = 1, // Position of the directive is only going to be defined
// when the preprocessing object is copied into the AST,
// it remains undefined before that
before = 2, // Directive goes before the correponding code segment
after = 3, // Directive goes after the corresponding code segment
inside = 4 // Directive goes inside the correponding code segment (as in between "{" and "}" of an empty basic block)
};
typedef Rose_STL_Container<PreprocessingInfo*> AttachedPreprocessingInfoType;
- 源代码注释:C 样式、C++ 样式
- 预处理器信息:include、define、ifdef、行声明
- 以及更多
enum DirectiveType
{
CpreprocessorUnknownDeclaration,
// source comment
C_StyleComment,
CplusplusStyleComment,
CpreprocessorIncludeDeclaration,
CpreprocessorIncludeNextDeclaration,
CpreprocessorDefineDeclaration,
CpreprocessorUndefDeclaration,
CpreprocessorIfdefDeclaration,
CpreprocessorIfndefDeclaration,
CpreprocessorIfDeclaration,
CpreprocessorDeadIfDeclaration,
CpreprocessorElseDeclaration,
CpreprocessorElifDeclaration,
CpreprocessorEndifDeclaration,
CpreprocessorLineDeclaration,
CpreprocessorErrorDeclaration,
// DQ (10/19/2005): Added CPP warning directive
CpreprocessorWarningDeclaration,
CpreprocessorEmptyDeclaration,
// AS (11/18/05): Added macro support
CSkippedToken,
CMacroCall,
//A line replacement will replace a sub-tree in the AST
//after a node with position (filename,line)
LineReplacement,
ClinkageSpecificationStart,
ClinkageSpecificationEnd
};
void dumpPreprocInfo (SgLocatedNode *locatedNode)
Dumps a located node's preprocessing information.
(gdb) p SageInterface::dumpPreprocInfo(scope) ----------------------------------------------- Found an IR node (at 0x7ffff7ec2230 of type: SgGlobal) in file rose_test_20_2019_lib.cpp with attached preprocessingInfo numbering #0 :------------- classification= CplusplusStyleComment: String format:// tool_G -roseoutline:use_dlopen -rose:outline:copy_orig_file -rose:unparseHeaderFiles -c test_20.cpp relative position is: after with attached preprocessingInfo numbering #1 :------------- classification= CplusplusStyleComment: String format:// relative position is: after with attached preprocessingInfo numbering #2 :------------- classification= CplusplusStyleComment: String format:// This causes the reprocessing of generated files : generating rose_rose_xxx_lib_lib.cp relative position is: after with attached preprocessingInfo numbering #3 :------------- classification= CplusplusStyleComment: String format:// relative position is: after with attached preprocessingInfo numbering #4 :------------- classification= CpreprocessorIncludeDeclaration: String format:#include "test_20_2019.h" relative position is: after with attached preprocessingInfo numbering #5 :------------- classification= CplusplusStyleComment: String format:// other comments here relative position is: after $4 = void
此工具默认情况下未构建。 您必须手动构建它
- cd buildDebug/exampleTranslators/defaultTranslator
- make install
ROSE_SRC/exampleTranslators/defaultTranslator/preprocessingInfoDumper.C
ROSE_INSTALL/bin/preprocessingInfoDumper
! cat test2020_comment_1.f90 subroutine suba implicit none write(13,fmt='( & &3x,"Damping work: ")') ! good comment write(13,fmt='( & &3x,"Friction work: ")') ! BAD 1 This comment comes one line later end subroutine suba ./preprocessingInfoDumper -c test2020_comment_1.f90 ----------------------------------------------- Found an IR node with preprocessing Info attached: (memory address: 0x2ce0700 Sage type: SgWriteStatement) in file test2020_comment_1.f90 (line 5 column 4) -------------PreprocessingInfo #0 ----------- : classification = FortranStyleComment: String format = ! good comment relative position is = before ----------------------------------------------- Found an IR node with preprocessing Info attached: (memory address: 0x2b3e640 Sage type: SgInitializedName) in file test2020_comment_1.f90 (line 0 column 0) -------------PreprocessingInfo #0 ----------- : classification = FortranStyleComment: String format = ! BAD 1 This comment comes one line later relative position is = after
另请参见 rose_attributes_list.C 中的 ROSEAttributesList::display(),用于转储它
bash-3.00$ cat preprocessingInfo.C
// Example ROSE Translator: used within ROSE/tutorial
#include "rose.h"
using namespace std;
// Class declaration
class visitorTraversal:public AstSimpleProcessing
{
public:
virtual void visit (SgNode * n);
};
void
visitorTraversal::visit (SgNode * n)
{
// On each node look for any comments of CPP directives
SgLocatedNode *locatedNode = isSgLocatedNode (n);
if (locatedNode != NULL)
{
AttachedPreprocessingInfoType *comments =
locatedNode->getAttachedPreprocessingInfo ();
if (comments != NULL)
{
printf
("Found attached comments (to IR node at %p of type: %s): \n",
locatedNode, locatedNode->class_name ().c_str ());
int counter = 0;
AttachedPreprocessingInfoType::iterator i;
for (i = comments->begin (); i != comments->end (); i++)
{
printf
(" Attached Comment #%d in file %s: classification %s :\n%s\n",
counter++,
(*i)->get_file_info ()->get_filenameString ().c_str (),
PreprocessingInfo::directiveTypeName ((*i)->getTypeOfDirective ()).
c_str (), (*i)->getString ().c_str ());
if ((*i)->getRelativePosition () == PreprocessingInfo::inside)
printf (" relative position is inside\n");
else
printf (" relative position is %s\n", \
((*i)->getRelativePosition () == PreprocessingInfo::before) ? "before" : "after");
}
}
else
{
// printf ("No attached comments (at %p of type: %s): \n", locatedNode,
// locatedNode->sage_class_name ());
}
}
}
int
main (int argc, char *argv[])
{
// Build the AST used by ROSE
SgProject *project = frontend (argc, argv);
// Build the traversal object
visitorTraversal exampleTraversal;
// Call the traversal starting at the project node of the AST
// Traverse all header files and source file (the -rose:collectAllCommentsAndDirectives
// commandline option controls if comments and CPP directives are separately extracted
// from header files).
exampleTraversal.traverse (project, preorder);
return backend (project);
}
两个阶段:首先收集它们,然后将它们附加到匹配的节点
main()
- frontend()
- frontend()
- SgProject()
- SgProject::parse()
- SgProject::parse()
- determineFileType()
- SgSourceFile::callFrontEnd()
- SgFile::callFrontEnd()
- attachPreprocessingInfo(sourceFile); attachPreprocessingInfo.C
- SgFile::callFrontEnd()
- SgSourceFile::callFrontEnd()
- determineFileType()
- SgProject::parse()
- SgProject::parse()
- SgProject()
- frontend()
class AttachPreprocessingInfoTreeTrav // attach_all_info.C/h
- AttachAllPreprocessingInfoTreeTrav::evaluateSynthesizedAttribute()
- AttachAllPreprocessingInfoTreeTrav::evaluateInheritedAttribute()
Fortran 代码
main frontend frontend SgProject::SgProject() SgProject::parse SgProject::parse SgFile::secondaryPassOverSourceFile () src/frontend/SageIII/sageSupport.C:5049 attachPreprocessingInfo() src/frontend/SageIII/attachPreprocessingInfo.C:636 AstTopDownBottomUpProcessing SgTreeTraversal AttachPreprocessingInfoTreeTrav::evaluateInheritedAttribute() src/frontend/SageIII/attachPreprocessingInfoTraversal.C:750 AttachPreprocessingInfoTreeTrav::getListOfAttributes AttachPreprocessingInfoTreeTrav::buildCommentAndCppDirectiveList() src/frontend/SageIII/attachPreprocessingInfoTraversal.C:514 ROSEAttributesList::collectPreprocessorDirectivesAndCommentsForAST() src/frontend/SageIII/rose_attributes_list.C:1973
调用 attachPreprocessingInfo() 将它们附加
- C/C++ SgFile::callFrontEnd()
- Fortran:SgSourceFile::build_Fortran_AST()
SgLocatedNode::addToAttachedPreprocessingInfo(PreprocessingInfo *prepInfoPtr, PreprocessingInfo::RelativePositionType locationInList )
locationInList 滥用了 PreprocessingInfo::RelativePositionType,这里只有 before 和 after 位置有意义,用于指定信息列表的头部或尾部。
PreprocessingInfo::before
gdb 断点
> break PreprocessingInfo::PreprocessingInfo(PreprocessingInfo::DirectiveType, std::string const&, std::string const&, int, int, int, PreprocessingInfo::RelativePositionType)
src/frontend/SageIII/attachPreprocessingInfoTraversal.C
SgFile(总是)构造函数调用该函数
- void attachPreprocessingInfo(SgFile *sageFilePtr); 它反过来调用
- getPreprocessorDirectives(见上文),然后
调用一个树遍历,以将预处理器指令(即 preprocessingInfo 对象)附加到 AST 中的定位节点。
为此,数据成员 attachedPreprocessingInfoType* attachedPreprocessingInfoPtr; 可供 SgLocatedNode 类使用。 这是在 ROSETTA/src/node.C 中完成的。
此外,还存在相应的访问函数
- void addToAttachedPreprocessingInfo(preprocessingInfo *prepInfoPtr);
- attachedPreprocessingInfoType* getAttachedPreprocessingInfo(void);
到 SgLocatedNode 类。 这是在 ROSETTA/Grammar/LocatedNode.code 中完成的。
树遍历的工作原理如下
- 每当它遇到一个定位节点时
- 它会检查是否存在预处理信息,其行号小于或等于当前定位节点的行号(当前:当前语句)。
- 如果是这种情况,则相应的预处理信息将附加到当前定位节点(当前:在当前语句之前),取消解析标志:“before”。 所有这些都在派生树遍历类的 evaluateInheritedAttribute 成员函数中完成。
- evaluateSynthesizedAttribute 成员函数在遍历返回到 SgFile 对象时立即删除 preprocessingInfo 对象列表,并将尾随预处理信息附加到在文件中访问过的最后一个定位节点(当前为最后一个语句)(取消解析标志:“after”)。
注意,preprocessingInfo 对象始终附加到 AST 节点。 通过切换 USE_OLD_MECHANISM_OF_HANDLING_PREPROCESSING_INFO 标志,您仅更改取消解析器所基于的机制! 如果 USE_OLD_MECHANISM_OF_HANDLING_PREPROCESSING_INFO 设置为 1,则取消解析器将简单地忽略已附加到 AST 节点的 preprocessingInfo 对象。
处理预处理信息的问题可以在目录 ROSE/TESTS/KnownBugs/AttachPreprocessingInfo 中找到。
// frontend/SageIII/attachPreprocessingInfoTraversal.C
void AttachPreprocessingInfoTreeTrav::iterateOverListAndInsertPreviouslyUninsertedElementsAppearingBeforeLineNumber ( SgLocatedNode* locatedNode, int lineNumber, PreprocessingInfo::RelativePositionType location, bool reset_start_index, ROSEAttributesList *currentListOfAttributes)
iterateOverListAndInsertPreviouslyUninsertedElementsAppearingBeforeLineNumber() 的不同调用位置
如何决定不同的位置
- before:AttachPreprocessingInfoTreeTrav::evaluateInheritedAttribute ( SgNode *n,AttachPreprocessingInfoTreeTraversalInheritedAttrribute inheritedAttribute)
- 如果遍历在 evaluateInheritedAttribute() 中,则附加到当前语句的 before 位置。
- 调用 iterateOverListAndInsertPreviouslyUninsertedElementsAppearingBeforeLineNumber(currentLocNodePtr,line,PreprocessingInfo::before, reset_start_index, currentListOfAttributes );
- 如果遍历在 evaluateInheritedAttribute() 中,则附加到当前语句的 before 位置。
- 在内部:AttachPreprocessingInfoTreeTrav::evaluateSynthesizedAttribute( SgNode *n, AttachPreprocessingInfoTreeTraversalInheritedAttrribute inheritedAttribute, SubTreeSynthesizedAttributes synthiziedAttributeList)
- 在 evaluateSynthesizedAttribute() 中离开节点时,附加到多行定位节点的内部位置。
- 在之后:AttachPreprocessingInfoTreeTrav::evaluateSynthesizedAttribute( SgNode *n, AttachPreprocessingInfoTreeTraversalInheritedAttrribute inheritedAttribute, SubTreeSynthesizedAttributes synthiziedAttributeList)
- 例如,如果遍历在 evaluateSynthesizedAttribute() 中离开 V_SgSourceFile,则附加到先前定位节点的 after 位置。
并非所有定位节点都可以有注释!!
SgFunctionDeclaration* functionDeclaration = isSgFunctionDeclaration(n);
if (functionDeclaration != NULL)
{
string comment = string("// Auto-comment function name: ") +
functionDeclaration->get_name().str() +
" is now a commented function";
PreprocessingInfo* commentInfo =
new PreprocessingInfo(PreprocessingInfo::CplusplusStyleComment,
comment,"user-generated",0, 0, 0, PreprocessingInfo::before);
functionDeclaration->addToAttachedPreprocessingInfo(commentInfo);
}
比注释更通用
SgLocatedNode* node = *iter2;
std::ostringstream o;
o<<node;
std::string text = "\n/* HPCToolKit raw data: " +profileNode->toString();
text += " -> "+ string(node->sage_class_name()) + " " + o.str() + "*/\n";
// attach the text before the node (node is e_after the text)
SageInterface::addTextForUnparser(node,text,AstUnparseAttribute::e_after);
不能在迭代容器时删除元素。将元素子集保存到另一个容器中,然后删除它们。
AttachedPreprocessingInfoType *comments =
node->getAttachedPreprocessingInfo ();
if (comments==NULL)
return 0;
AttachedPreprocessingInfoType::iterator i;
std::vector< PreprocessingInfo* > removeList;
for (i = comments->begin (); i != comments->end (); i++)
{
// if...
removeList.push_back(*i);"
}
// remove those comments
for (std::vector<PreprocessingInfo* >::iterator j = removeList.begin();
j!=removeList.end();j++)
{
comments->erase(find(comments->begin(), comments->end(),*j));
// free memory also?
free(*j);
}
当我们删除或替换 AST 中的语句时,应保留源注释和 #if 指令。
可能的调用堆栈是
- SageInterface::removeStatement () 来自 src/frontend/SageIII/sageInterface/sageInterface.C:10086
- SageInterface::moveCommentsToNewStatement 来自 src/frontend/SageIII/sageInterface/sageInterface.C:10193
调试插入操作:SgLocatedNode::addToAttachedPreprocessingInfo() 在 buildTree 的 Cxx_Grammar.C 中
b SgLocatedNode::addToAttachedPreprocessingInfo(PreprocessingInfo*, PreprocessingInfo::RelativePositionType)
b Cxx_Grammar.C:54114 Breakpoint 1, SgLocatedNode::addToAttachedPreprocessingInfo (this=0x2aadaee62010, prepInfoPtr=0x2aadb00c0190, locationInList=after) at Cxx_Grammar.C:54114 54114 ROSE_ASSERT(prepInfoPtr != NULL); (gdb) bt #0 SgLocatedNode::addToAttachedPreprocessingInfo (this=0x2aadaee62010, prepInfoPtr=0x2aadb00c0190, locationInList=after) at Cxx_Grammar.C:54114 #1 0x00002aaaabb6afc3 in AttachPreprocessingInfoTreeTrav::iterateOverListAndInsertPreviouslyUninsertedElementsAppearingBeforeLineNumber (this=0x7fffffffd820, locatedNode=0x2aadaee62010, lineNumber=1000000000, location=after, reset_start_index=true, currentListOfAttributes=0x2aadb00bf840) at ../../../../sourcetree/src/frontend/SageIII/attachPreprocessingInfoTraversal.C:313 #2 0x00002aaaabb6d8a9 in AttachPreprocessingInfoTreeTrav::evaluateSynthesizedAttribute (this=0x7fffffffd820, n=0x2aaab05eb010, inheritedAttribute=..., synthiziedAttributeList=...) at ../../../../sourcetree/src/frontend/SageIII/attachPreprocessingInfoTraversal.C:1081 #3 0x00002aaaabb19e60 in SgTreeTraversal<AttachPreprocessingInfoTreeTraversalInheritedAttrribute, AttachPreprocessingInfoTreeTraversalSynthesizedAttribute>::performTraversal(SgNode *, AttachPreprocessingInfoTreeTraversalInheritedAttrribute, <anonymous enum>) (this=0x7fffffffd820, node=0x2aaab05eb010, inheritedValue=..., treeTraversalOrder=preandpostorder) at ../../../../sourcetree/src/midend/astProcessing/AstProcessing.h:1297 #4 0x00002aaaabb13730 in SgTreeTraversal<AttachPreprocessingInfoTreeTraversalInheritedAttrribute, AttachPreprocessingInfoTreeTraversalSynthesizedAttribute>::traverse(SgNode *, AttachPreprocessingInfoTreeTraversalInheritedAttrribute, <anonymous enum>) (this=0x7fffffffd820, node=0x2aaab05eb010, inheritedValue=..., treeTraversalOrder=preandpostorder) at ../../../../sourcetree/src/midend/astProcessing/AstProcessing.h:879 #5 0x00002aaaabb1381e in SgTreeTraversal<AttachPreprocessingInfoTreeTraversalInheritedAttrribute, AttachPreprocessingInfoTreeTraversalSynthesizedAttribute>::traverseWithinFile(SgNode *, AttachPreprocessingInfoTreeTraversalInheritedAttrribute, <anonymous enum>) (this=0x7fffffffd820, node=0x2aaab05eb010, inheritedValue=..., treeTraversalOrder=preandpostorder) at ../../../../sourcetree/src/midend/astProcessing/AstProcessing.h:841 #6 0x00002aaaabb0cf65 in AstTopDownBottomUpProcessing<AttachPreprocessingInfoTreeTraversalInheritedAttrribute, AttachPreprocessingInfoTreeTraversalSynthesizedAttribute>::traverseWithinFile (this=0x7fffffffd820, node=0x2aaab05eb010, inheritedValue=...) at ../../../../sourcetree/src/midend/astProcessing/AstProcessing.h:659 #7 0x00002aaaabb0268d in attachPreprocessingInfo (sageFilePtr=0x2aaab05eb010) at ../../../../sourcetree/src/frontend/SageIII/attachPreprocessingInfo.C:636 #8 0x00002aaaabb979f5 in SgFile::secondaryPassOverSourceFile (this=0x2aaab05eb010) at ../../../../sourcetree/src/frontend/SageIII/sageSupport.C:5049 #9 0x00002aaaabb95360 in SgProject::parse (this=0x2aaab057d010) at ../../../../sourcetree/src/frontend/SageIII/sageSupport.C:4104 #10 0x00002aaaabb94668 in SgProject::parse (this=0x2aaab057d010, argv=...) at ../../../../sourcetree/src/frontend/SageIII/sageSupport.C:3828 #11 0x00002aaaabc2704a in SgProject::SgProject (this=0x2aaab057d010, argv=...) at Cxx_Grammar.C:21076 #12 0x00002aaaad5af1d4 in frontend (argv=...) at ../../../sourcetree/src/roseSupport/utility_functions.C:138 #13 0x00002aaaad5af070 in frontend (argc=2, argv=0x7fffffffdde8) at ../../../sourcetree/src/roseSupport/utility_functions.C:118 #14 0x0000000000403e4d in main (argc=2, argv=0x7fffffffdde8) at ../../../sourcetree/exampleTranslators/defaultTranslator/preprocessingInfoDumper.C:54
Breakpoint 1, SgLocatedNode::addToAttachedPreprocessingInfo (this=0x20b0f50, prepInfoPtr=0xb0ca50, locationInList=PreprocessingInfo::after) at Cxx_Grammar.C:89431 (gdb) info breakpoints Num Type Disp Enb Address What 1 breakpoint keep y 0x00007ffff458a702 in SgLocatedNode::addToAttachedPreprocessingInfo(PreprocessingInfo*, PreprocessingInfo::RelativePositionType) at Cxx_Grammar.C:89431 breakpoint already hit 1 time (gdb) p this->class_name() $1 = "SgWriteStatement" (gdb) bt #0 SgLocatedNode::addToAttachedPreprocessingInfo (this=0x20b0f50, prepInfoPtr=0xb0ca50, locationInList=PreprocessingInfo::after) at Cxx_Grammar.C:89431 #1 0x00007ffff440b302 in AttachPreprocessingInfoTreeTrav::iterateOverListAndInsertPreviouslyUninsertedElementsAppearingBeforeLineNumber (this=0x7fffffff9840, locatedNode=0x20b0f50, lineNumber=5, location=Preprocessin gInfo::before, reset_start_index=false, currentListOfAttributes=0xb02bc0) at ../../../../sourcetree/src/frontend/SageIII/attachPreprocessingInfoTraversal.C:539 #2 0x00007ffff440e3b6 in AttachPreprocessingInfoTreeTrav::evaluateInheritedAttribute (this=0x7fffffff9840, n=0x20b0f50, inheritedAttribute=...) at ../../../../sourcetree/src/frontend/SageIII/attachPreprocessingInfoTr aversal.C:2837 #3 0x00007ffff43c4fcf in SgTreeTraversal<AttachPreprocessingInfoTreeTraversalInheritedAttrribute, AttachPreprocessingInfoTreeTraversalSynthesizedAttribute>::performTraversal (this=0x7fffffff9840, node=0x20b0f50, inhe ritedValue=..., treeTraversalOrder=preandpostorder) at ../../../../sourcetree/src/midend/astProcessing/AstProcessing.h:774 #4 0x00007ffff43c5168 in SgTreeTraversal<AttachPreprocessingInfoTreeTraversalInheritedAttrribute, AttachPreprocessingInfoTreeTraversalSynthesizedAttribute>::performTraversal (this=0x7fffffff9840, node=0x1c53ae0, inhe ritedValue=..., treeTraversalOrder=preandpostorder) at ../../../../sourcetree/src/midend/astProcessing/AstProcessing.h:828 #5 0x00007ffff43c5168 in SgTreeTraversal<AttachPreprocessingInfoTreeTraversalInheritedAttrribute, AttachPreprocessingInfoTreeTraversalSynthesizedAttribute>::performTraversal (this=0x7fffffff9840, node=0x1cf7bf0, inhe ritedValue=..., treeTraversalOrder=preandpostorder) at ../../../../sourcetree/src/midend/astProcessing/AstProcessing.h:828 #6 0x00007ffff43c5168 in SgTreeTraversal<AttachPreprocessingInfoTreeTraversalInheritedAttrribute, AttachPreprocessingInfoTreeTraversalSynthesizedAttribute>::performTraversal (this=0x7fffffff9840, node=0x7fff39b31010, inheritedValue=..., treeTraversalOrder=preandpostorder) at ../../../../sourcetree/src/midend/astProcessing/AstProcessing.h:828 #7 0x00007ffff43c5168 in SgTreeTraversal<AttachPreprocessingInfoTreeTraversalInheritedAttrribute, AttachPreprocessingInfoTreeTraversalSynthesizedAttribute>::performTraversal (this=0x7fffffff9840, node=0x7ffff7ee1120, inheritedValue=..., treeTraversalOrder=preandpostorder) at ../../../../sourcetree/src/midend/astProcessing/AstProcessing.h:828 #8 0x00007ffff43c5168 in SgTreeTraversal<AttachPreprocessingInfoTreeTraversalInheritedAttrribute, AttachPreprocessingInfoTreeTraversalSynthesizedAttribute>::performTraversal (this=0x7fffffff9840, node=0x7fffeb8de010, inheritedValue=..., treeTraversalOrder=preandpostorder) at ../../../../sourcetree/src/midend/astProcessing/AstProcessing.h:828 #9 0x00007ffff43bfb13 in SgTreeTraversal<AttachPreprocessingInfoTreeTraversalInheritedAttrribute, AttachPreprocessingInfoTreeTraversalSynthesizedAttribute>::traverse (this=0x7fffffff9840, node=0x7fffeb8de010, inherit edValue=..., treeTraversalOrder=preandpostorder) at ../../../../sourcetree/src/midend/astProcessing/AstProcessing.h:742 #10 0x00007ffff43bfcb3 in SgTreeTraversal<AttachPreprocessingInfoTreeTraversalInheritedAttrribute, AttachPreprocessingInfoTreeTraversalSynthesizedAttribute>::traverseWithinFile (this=0x7fffffff9840, node=0x7fffeb8de01 0, inheritedValue=..., treeTraversalOrder=preandpostorder) at ../../../../sourcetree/src/midend/astProcessing/AstProcessing.h:702 #11 0x00007ffff43bbd0f in AstTopDownBottomUpProcessing<AttachPreprocessingInfoTreeTraversalInheritedAttrribute, AttachPreprocessingInfoTreeTraversalSynthesizedAttribute>::traverseWithinFile (this=0x7fffffff9840, node= 0x7fffeb8de010, inheritedValue=...) at ../../../../sourcetree/src/midend/astProcessing/AstProcessing.h:502 #12 0x00007ffff43b3740 in attachPreprocessingInfo (sageFilePtr=0x7fffeb8de010) at ../../../../sourcetree/src/frontend/SageIII/attachPreprocessingInfo.C:797 #13 0x00007ffff444a14c in SgFile::secondaryPassOverSourceFile (this=0x7fffeb8de010) at ../../../../sourcetree/src/frontend/SageIII/sage_support/sage_support.cpp:3597 #14 0x00007ffff4447a5d in SgProject::parse (this=0x7fffeba2b010) at ../../../../sourcetree/src/frontend/SageIII/sage_support/sage_support.cpp:2593 #15 0x00007ffff444673a in SgProject::parse (this=0x7fffeba2b010, argv=std::vector of length 9, capacity 9 = {...}) at ../../../../sourcetree/src/frontend/SageIII/sage_support/sage_support.cpp:1965 #16 0x00007ffff4525653 in SgProject::SgProject (this=0x7fffeba2b010, argv=std::vector of length 9, capacity 9 = {...}, frontendConstantFolding=false) at Cxx_Grammar.C:29216 #17 0x00007ffff674644d in frontend (argv=std::vector of length 9, capacity 9 = {...}, frontendConstantFolding=false) at ../../../sourcetree/src/roseSupport/utility_functions.C:482 #18 0x00007ffff6746300 in frontend (argc=9, argv=0x7fffffffa738, frontendConstantFolding=false) at ../../../sourcetree/src/roseSupport/utility_functions.C:444 #19 0x000000000040a820 in main (argc=9, argv=0x7fffffffa738) at ../../../../sourcetree/tests/nonsmoke/functional/testTranslator.C:59