From f825dc00fcbc7bc0b56676584438b70d692c31d3 Mon Sep 17 00:00:00 2001 From: Scott Fennell Date: Tue, 1 Sep 2020 15:55:19 -0500 Subject: [PATCH] Merge test branch into master (#1047) * #1041 filter -W workaround for ICG linking to LLVM 10 libclang-cpp.so (#1044) * 1043 drg checkpoint memory leak (#1045) * #1043 drg fix drg checkpoint memory leak * 947 sie generation rework (#1046) generate S_sie.resource at during build instead of runtime --- .gitignore | 1 + include/trick/Sie.hh | 2 + libexec/trick/make_makefile_src | 2 +- libexec/trick/pm/s_source.pm | 9 ++- libexec/trick/sie_concat | 24 ++++++++ share/trick/sim_objects/default_trick_sys.sm | 2 +- .../codegen/Interface_Code_Gen/EnumValues.cpp | 6 ++ .../codegen/Interface_Code_Gen/EnumValues.hh | 9 +++ .../Interface_Code_Gen/EnumVisitor.cpp | 1 + .../Interface_Code_Gen/PrintAttributes.cpp | 58 +++++++++++++++++++ .../Interface_Code_Gen/PrintAttributes.hh | 6 ++ .../PrintFileContentsBase.hh | 6 +- .../codegen/Interface_Code_Gen/Utilities.cpp | 34 +++++++++++ .../codegen/Interface_Code_Gen/Utilities.hh | 3 +- .../codegen/Interface_Code_Gen/main.cpp | 13 ++++- .../DataRecord/DataRecordGroup.cpp | 33 +++++++++-- trick_source/sim_services/Sie/Sie.cpp | 57 ++++++++++++++++++ .../VariableServerThread_commands.cpp | 2 +- trick_source/sim_services/include/Makefile | 5 ++ 19 files changed, 260 insertions(+), 13 deletions(-) create mode 100755 libexec/trick/sie_concat diff --git a/.gitignore b/.gitignore index 27070e4e..0735fad6 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ trick_source/web/HttpServer/mongoose.c trick_source/web/HttpServer/mongoose.h trick_source/web/HttpServer/obj/ trick-offline +*sim_services_classes.resource diff --git a/include/trick/Sie.hh b/include/trick/Sie.hh index 2f2a2b9f..7208fceb 100644 --- a/include/trick/Sie.hh +++ b/include/trick/Sie.hh @@ -41,10 +41,12 @@ namespace Trick { void enum_attr_map_print_xml() ; void top_level_objects_print_xml() ; void sie_print_json() ; + void sie_append_runtime_objs() ; private: void top_level_objects_print(std::ofstream & sie_out) ; + void runtime_objects_print(std::fstream & sie_out) ; void top_level_objects_json(std::ofstream & sie_out) ; // These are singleton maps holding all attributes known to the sim diff --git a/libexec/trick/make_makefile_src b/libexec/trick/make_makefile_src index 3db90eec..54ae2ec6 100755 --- a/libexec/trick/make_makefile_src +++ b/libexec/trick/make_makefile_src @@ -309,7 +309,7 @@ all: S_sie.resource S_sie.resource: \$(S_MAIN) \t\$(PRINT_SIE) -\t\$(call ECHO_AND_LOG,./\$(S_MAIN) sie)\n" ; +\t\$(call ECHO_AND_LOG,\${TRICK_HOME}/\$(LIBEXEC)/trick/sie_concat)" ; # write out the override files we have read in open MAKEFILEOVER, ">build/Makefile_overrides" or die "Could not open build/Makefile_overrides" ; diff --git a/libexec/trick/pm/s_source.pm b/libexec/trick/pm/s_source.pm index 9b302b88..4eeb6d20 100644 --- a/libexec/trick/pm/s_source.pm +++ b/libexec/trick/pm/s_source.pm @@ -17,7 +17,7 @@ sub s_source($) { # Generate S_source.c open S_SOURCE, ">build/S_source.cpp" or die "Couldn't open build/S_source.cpp!\n"; open S_SOURCE_H, ">S_source.hh" or die "Couldn't open S_source.hh!\n"; - + open CLASSES_RESOURCE, ">build/classes.resource" or die "Couldn't open classes.resource!"; # Get Trick version my ($version, $thread) = get_trick_version() ; @@ -211,13 +211,20 @@ PURPOSE: print S_SOURCE " " x 4 , "if ( (ai = get_alloc_info_at(&$inst)) != NULL ) {\n" ; print S_SOURCE " " x 8 , "ai->alloced_in_memory_init = 1 ;\n" ; print S_SOURCE " " x 4 , "}\n" ; + print CLASSES_RESOURCE " \\n \\n\n"; } + print S_SOURCE " " x 4 , "// Add Integration Loop Sim Object(s) JMP\n" ; foreach my $integ_loop ( sort sim_integ_by_name @{$$sim_ref{integ_loop}} ) { print S_SOURCE " " x 4 , "exec_add_sim_object(&$$integ_loop{name} , \"$$integ_loop{name}\") ;\n" ; print S_SOURCE " " x 4 , "TMM_declare_ext_var(&$$integ_loop{name}, TRICK_STRUCTURED,\"IntegLoopSimObject\", 0, \"$$integ_loop{name}\", 0, NULL) ;\n" ; + print S_SOURCE " " x 4 , "if ( (ai = get_alloc_info_at(&$$integ_loop{name})) != NULL ) {\n" ; + print S_SOURCE " " x 8 , "ai->alloced_in_memory_init = 1 ;\n" ; + print S_SOURCE " " x 4 , "}\n" ; + print CLASSES_RESOURCE " \\n \\n\n"; } + close CLASSES_RESOURCE ; print S_SOURCE "\n" ; print S_SOURCE $$sim_ref{create_connections} ; diff --git a/libexec/trick/sie_concat b/libexec/trick/sie_concat new file mode 100755 index 00000000..676fac26 --- /dev/null +++ b/libexec/trick/sie_concat @@ -0,0 +1,24 @@ +#!/usr/bin/perl +package sie_concat; + +open(my $S_sie_resource, ">", "./S_sie.resource") + or die "cannot open S_sie.resource $!"; +print $S_sie_resource "\n\n\n\n"; + + +open(my $classes_resource, "<", "build/classes.resource") + or die "cannot open build/classes.resource"; +while(my $line = <$classes_resource>) { + print $S_sie_resource $line; +} +close($classes_resource); + +open(my $sim_services_resource, "<", "$ENV{TRICK_HOME}/trick_source/sim_services/include/sim_services_classes.resource") + or die "cannot open trick/trick_source/sim_services/include/sim_services_classes.resource"; +while(my $line = <$sim_services_resource>) { + print $S_sie_resource $line; +} +close($sim_services_resource); +print $S_sie_resource "\n"; +print $S_sie_resource ""; +close($S_sie_resource); diff --git a/share/trick/sim_objects/default_trick_sys.sm b/share/trick/sim_objects/default_trick_sys.sm index 29cbd396..21316c9c 100644 --- a/share/trick/sim_objects/default_trick_sys.sm +++ b/share/trick/sim_objects/default_trick_sys.sm @@ -237,7 +237,7 @@ class SieSimObject : public Trick::SimObject { Trick::Sie sie ; SieSimObject() { - {TRK} P0 ("default_data") sie.process_sim_args() ; + {TRK} ("initialization") sie.sie_append_runtime_objs() ; } } diff --git a/trick_source/codegen/Interface_Code_Gen/EnumValues.cpp b/trick_source/codegen/Interface_Code_Gen/EnumValues.cpp index d8abf85b..7a0d122c 100644 --- a/trick_source/codegen/Interface_Code_Gen/EnumValues.cpp +++ b/trick_source/codegen/Interface_Code_Gen/EnumValues.cpp @@ -10,6 +10,12 @@ void EnumValues::addEnum( std::string in_name , long long in_val ) { enum_values.push_back(new_enum) ; } +void EnumValues::addFullyQualifiedEnum( std::string in_name , long long in_val ) { + std::pair< std::string , long long > new_enum(in_name, in_val) ; + fully_qualified_enum_values.push_back(new_enum) ; +} + + void EnumValues::setHasDefinition( bool in ) { has_definition = in ; } diff --git a/trick_source/codegen/Interface_Code_Gen/EnumValues.hh b/trick_source/codegen/Interface_Code_Gen/EnumValues.hh index 2a1e4662..c1544394 100644 --- a/trick_source/codegen/Interface_Code_Gen/EnumValues.hh +++ b/trick_source/codegen/Interface_Code_Gen/EnumValues.hh @@ -31,6 +31,7 @@ class EnumValues : public ConstructValues { EnumValues() ; void addEnum(std::string in_name , long long in_val) ; + void addFullyQualifiedEnum(std::string in_name , long long in_val) ; void setHasDefinition( bool in ) ; bool getHasDefinition() ; @@ -39,6 +40,10 @@ class EnumValues : public ConstructValues { return enum_values; } + const std::vector& getFullyQualifiedPairs() { + return fully_qualified_enum_values; + } + friend std::ostream & operator << (std::ostream & os , EnumValues & ev ) ; private: @@ -46,6 +51,10 @@ class EnumValues : public ConstructValues { /** List of enums and their values */ std::vector< NameValuePair > enum_values ; + /** List of fully qualified enums and their values + This is used to generate the S_sie.resource file. */ + std::vector< NameValuePair > fully_qualified_enum_values ; + bool has_definition ; } ; diff --git a/trick_source/codegen/Interface_Code_Gen/EnumVisitor.cpp b/trick_source/codegen/Interface_Code_Gen/EnumVisitor.cpp index 58038fb3..5aeb6f23 100644 --- a/trick_source/codegen/Interface_Code_Gen/EnumVisitor.cpp +++ b/trick_source/codegen/Interface_Code_Gen/EnumVisitor.cpp @@ -70,6 +70,7 @@ bool EnumVisitor::VisitEnumType(clang::EnumType *et) { bool EnumVisitor::VisitEnumConstantDecl(clang::EnumConstantDecl *ecd) { //std::cout << ecd->getName().str() << " = " << ecd->getInitVal().getSExtValue() << std::endl ; eval.addEnum(ecd->getName().str() , ecd->getInitVal().getSExtValue()) ; + eval.addFullyQualifiedEnum(ecd->getQualifiedNameAsString(), ecd->getInitVal().getSExtValue()); return true ; } diff --git a/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp b/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp index 87661600..f9cafee6 100644 --- a/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp +++ b/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp @@ -15,10 +15,12 @@ #include "PrintAttributes.hh" #include "PrintFileContentsBase.hh" #include "PrintFileContents10.hh" +#include "FieldDescription.hh" #include "HeaderSearchDirs.hh" #include "CommentSaver.hh" #include "ClassValues.hh" #include "EnumValues.hh" +#include "Utilities.hh" PrintAttributes::PrintAttributes(int in_attr_version , HeaderSearchDirs & in_hsd , CommentSaver & in_cs , clang::CompilerInstance & in_ci, bool in_force , bool in_sim_services_flag , @@ -235,6 +237,7 @@ void PrintAttributes::printClass( ClassValues * cv ) { if (openIOFile(fileName)) { printer->printClass(outfile, cv); outfile.close(); + printSieClass(cv); } if (!isHeaderExcluded(fileName, false)) { @@ -261,6 +264,7 @@ void PrintAttributes::printEnum(EnumValues* ev) { if (openIOFile(fileName)) { printer->printEnum(outfile, ev) ; outfile.close() ; + printSieEnum(&enumValues) ; } if (!isHeaderExcluded(fileName, false)) { @@ -268,6 +272,60 @@ void PrintAttributes::printEnum(EnumValues* ev) { } } + +void PrintAttributes::printSieClass( ClassValues * cv ) { + std::string xmlFileName; + if(sim_services_flag) { + xmlFileName = std::string(getenv("TRICK_HOME")) + "/trick_source/sim_services/include/sim_services_classes.resource"; + } else { + xmlFileName = "build/classes.resource"; + } + std::ofstream ostream(xmlFileName, std::ofstream::app); + ostream << " getFullyQualifiedMangledTypeName("__")) << "\">\n"; + for (FieldDescription* fdes : printer->getPrintableFields(*cv)) { + std::string type = fdes->getFullyQualifiedMangledTypeName("__"); + std::replace(type.begin(), type.end(), ':', '_'); + ostream << " getName() << "\"\n" + << " type=\"" << replace_special_chars(type) << "\"\n" + << " io_attributes=\"" << fdes->getIO() << "\"\n" + << " units=\""; + if(fdes->isDashDashUnits()) { + ostream << "--\"" ; + } else { + ostream << fdes->getUnits() << "\"" ; + } + std::string description = fdes->getDescription(); + if(!description.empty()) { + ostream << "\n description=\"" << replace_special_chars(description) << "\""; + } + ostream << ">\n" ; + for(int i = 0; i < fdes->getNumDims(); i++) { + ostream + << " " << (fdes->getArrayDim(i) != -1 ? fdes->getArrayDim(i) : 0) << "\n"; + } + ostream << " \n"; + } + ostream << " \n" << std::endl; + ostream.close(); +} + +void PrintAttributes::printSieEnum( EnumValues * ev ) { + std::string xmlFileName; + if(sim_services_flag) { + xmlFileName = std::string(getenv("TRICK_HOME")) + "/trick_source/sim_services/include/sim_services_classes.resource"; + } else { + xmlFileName = "build/classes.resource"; + } + std::ofstream ostream(xmlFileName, std::ofstream::app); + ostream << " getFullyQualifiedTypeName("__")) << "\">\n"; + for(EnumValues::NameValuePair nvp : ev->getFullyQualifiedPairs()) { + ostream << " \n"; + } + ostream << " \n" << std::endl; + ostream.close(); +} + void PrintAttributes::createMapFiles() { struct stat buf ; std::string class_map_function_name ; diff --git a/trick_source/codegen/Interface_Code_Gen/PrintAttributes.hh b/trick_source/codegen/Interface_Code_Gen/PrintAttributes.hh index ba34bda0..9b3a7dec 100644 --- a/trick_source/codegen/Interface_Code_Gen/PrintAttributes.hh +++ b/trick_source/codegen/Interface_Code_Gen/PrintAttributes.hh @@ -58,6 +58,12 @@ class PrintAttributes { /** Prints an enum to the io_src file */ virtual void printEnum( EnumValues * in_enum) ; + /** Prints a class to the XML resource file */ + void printSieClass( ClassValues * cv ) ; + + /** Prints an enum to the XML resource file */ + void printSieEnum( EnumValues * ev ) ; + bool isHeaderExcluded(const std::string& header, bool exclude_ext_libs = true); void markHeaderAsVisited(const std::string& header); diff --git a/trick_source/codegen/Interface_Code_Gen/PrintFileContentsBase.hh b/trick_source/codegen/Interface_Code_Gen/PrintFileContentsBase.hh index 14f25dac..a157a533 100644 --- a/trick_source/codegen/Interface_Code_Gen/PrintFileContentsBase.hh +++ b/trick_source/codegen/Interface_Code_Gen/PrintFileContentsBase.hh @@ -42,6 +42,9 @@ class PrintFileContentsBase { virtual void printEnumMap(std::ostream & ostream, EnumValues * ev) ; virtual void printEnumMapFooter(std::ostream & ostream) ; + /* gets a vector of fields that can be printed */ + std::vector getPrintableFields(ClassValues& classValues, unsigned int ioMask = 0xFFFFFFF); + protected: /** Prints the io_src_allocate function */ virtual void print_units_map(std::ostream & ostream, ClassValues * cv) ; @@ -55,9 +58,6 @@ class PrintFileContentsBase { /* internal function determines if a particular field is printable */ bool isPrintable(ClassValues * c , FieldDescription *fdes , unsigned int ioMask = 0xFFFFFFF) ; - /* gets a vector of fields that can be printed */ - std::vector getPrintableFields(ClassValues& classValues, unsigned int ioMask = 0xFFFFFFF); - } ; #endif diff --git a/trick_source/codegen/Interface_Code_Gen/Utilities.cpp b/trick_source/codegen/Interface_Code_Gen/Utilities.cpp index c53ff73b..666d1d9c 100644 --- a/trick_source/codegen/Interface_Code_Gen/Utilities.cpp +++ b/trick_source/codegen/Interface_Code_Gen/Utilities.cpp @@ -14,6 +14,40 @@ std::string sanitize(const std::string& text) { return result ; } +// Replace special chars for xml output +std::string & replace_special_chars( std::string & str) { + + // escape & + size_t index = 0; + while (index != std::string::npos) { + index = str.find("&" , index) ; + if ( index != std::string::npos ) { + str.replace(index, 1, "&") ; + index += 5; + } + } + + // escape " + index = 0; + while (index != std::string::npos) { + index = str.find("\\\"" , index) ; + if ( index != std::string::npos ) { + str.replace(index, 2, """) ; + } + } + + // escape < + index = 0; + while (index != std::string::npos) { + index = str.find("<" , index) ; + if ( index != std::string::npos ) { + str.replace(index, 1, "<") ; + } + } + + return str; +} + // removes leading and trailing whitespace from a string std::string trim(const std::string& str, const std::string& whitespace ) { size_t strBegin = str.find_first_not_of(whitespace); diff --git a/trick_source/codegen/Interface_Code_Gen/Utilities.hh b/trick_source/codegen/Interface_Code_Gen/Utilities.hh index 6c05cc04..50dd24fe 100644 --- a/trick_source/codegen/Interface_Code_Gen/Utilities.hh +++ b/trick_source/codegen/Interface_Code_Gen/Utilities.hh @@ -14,7 +14,7 @@ enum Color { SKIP = 95 }; -std::string sanitize(const std::string&); +std::string sanitize(const std::string&) ; std::string trim( const std::string& str, const std::string& whitespace = " \t\n\r" ) ; bool isInUserCode( clang::CompilerInstance & ci , clang::SourceLocation sl , HeaderSearchDirs & hsd ) ; bool isInUserOrTrickCode( clang::CompilerInstance & ci , clang::SourceLocation sl , HeaderSearchDirs & hsd ) ; @@ -27,5 +27,6 @@ std::string bold(const std::string& text); std::string underline(const std::string& text); std::string underline(const std::string& text, unsigned length); std::string quote(const std::string& text); +std::string & replace_special_chars( std::string & str); #endif diff --git a/trick_source/codegen/Interface_Code_Gen/main.cpp b/trick_source/codegen/Interface_Code_Gen/main.cpp index e9ed3bdd..53b71f56 100644 --- a/trick_source/codegen/Interface_Code_Gen/main.cpp +++ b/trick_source/codegen/Interface_Code_Gen/main.cpp @@ -50,6 +50,7 @@ llvm::cl::opt print_trick_icg("print-TRICK-ICG", llvm:: llvm::cl::alias compat15_alias ("compat15" , llvm::cl::desc("Alias for -c") , llvm::cl::aliasopt(global_compat15)) ; llvm::cl::opt m32("m32", llvm::cl::desc("Generate io code for use with 32bit mode"), llvm::cl::init(false), llvm::cl::ZeroOrMore) ; + /** Most of the main program is pieced together from examples on the web. We are doing the following: @@ -73,8 +74,18 @@ int main(int argc, char * argv[]) { /** * Gather all of the command line arguments into lists of include directories, defines, and input files. * All other arguments will be ignored. + * + * Filter out -W because of LLVM cl option that has been enabled and cannot be disabled in LLVM 10 when linking libclang-cpp.so. + * TODO: Troubleshoot or contact LLVM for a fix. */ - llvm::cl::ParseCommandLineOptions(argc, argv); + std::vector filtered_args; + for ( unsigned int ii = 0; ii < argc ; ii++ ) { + if( strncmp(argv[ii], "-W", 2) ) { + filtered_args.push_back(argv[ii]); + } + } + + llvm::cl::ParseCommandLineOptions(filtered_args.size(), filtered_args.data()); if (input_file_names.empty()) { std::cerr << "No header file specified" << std::endl; diff --git a/trick_source/sim_services/DataRecord/DataRecordGroup.cpp b/trick_source/sim_services/DataRecord/DataRecordGroup.cpp index 4a36939e..2a18e7b8 100644 --- a/trick_source/sim_services/DataRecord/DataRecordGroup.cpp +++ b/trick_source/sim_services/DataRecord/DataRecordGroup.cpp @@ -450,10 +450,35 @@ int Trick::DataRecordGroup::checkpoint() { } void Trick::DataRecordGroup::clear_checkpoint_vars() { - if ( variable_names ) TMM_delete_var_a(variable_names) ; - if ( variable_alias ) TMM_delete_var_a(variable_alias) ; - if ( change_variable_names ) TMM_delete_var_a(change_variable_names) ; - if ( change_variable_alias ) TMM_delete_var_a(change_variable_alias) ; + + if ( variable_names ) { + for(int jj = 0; jj < num_variable_names; jj++) { + TMM_delete_var_a(variable_names[jj]); + } + TMM_delete_var_a(variable_names) ; + } + + if ( variable_alias ) { + for(int jj = 0; jj < num_variable_names; jj++) { + TMM_delete_var_a(variable_alias[jj]); + } + TMM_delete_var_a(variable_alias) ; + } + + if ( change_variable_names ) { + for(int jj = 0; jj < num_change_variable_names; jj++) { + TMM_delete_var_a(change_variable_names[jj]); + } + TMM_delete_var_a(change_variable_names) ; + } + + if ( change_variable_alias ) { + for(int jj = 0; jj < num_change_variable_names; jj++) { + TMM_delete_var_a(change_variable_alias[jj]); + } + TMM_delete_var_a(change_variable_alias) ; + } + variable_names = NULL ; variable_alias = NULL ; change_variable_names = NULL ; diff --git a/trick_source/sim_services/Sie/Sie.cpp b/trick_source/sim_services/Sie/Sie.cpp index 3366ec4f..b51d985f 100644 --- a/trick_source/sim_services/Sie/Sie.cpp +++ b/trick_source/sim_services/Sie/Sie.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include "trick/Sie.hh" #include "trick/SimObject.hh" @@ -74,6 +75,32 @@ void Trick::Sie::top_level_objects_print(std::ofstream & sie_out) { } } +void Trick::Sie::runtime_objects_print(std::fstream & sie_out) { + Trick::VARIABLE_MAP_ITER vit ; + int jj ; + + for ( vit = trick_MM->variable_map_begin() ; vit != trick_MM->variable_map_end() ; vit++ ) { + ALLOC_INFO * alloc_info = (*vit).second ; + + if ( alloc_info != NULL && alloc_info->alloced_in_memory_init == 0) { + sie_out << " first << "\"" ; + sie_out << "\n type=\"" ; + std::string type = trickTypeCharString(alloc_info->type, alloc_info->user_type_name ); + std::replace(type.begin(), type.end(), ':', '_'); + sie_out << type << "\"\n" ; + sie_out << " alloc_memory_init=\"" << alloc_info->alloced_in_memory_init << "\""; + sie_out << ">\n" ; + if ( alloc_info->num_index > 0 ) { + for (jj = 0; jj < alloc_info->num_index; jj++) { + sie_out << " " << alloc_info->index[jj] << "\n" ; + } + } + sie_out << " \n\n" ; + } + } +} + void Trick::Sie::top_level_objects_json(std::ofstream & sie_out) { Trick::VARIABLE_MAP_ITER vit ; int jj ; @@ -123,6 +150,36 @@ void Trick::Sie::sie_print_xml() { sie_out.close() ; } +void Trick::Sie::sie_append_runtime_objs() { + std::fstream sie_out ; + std::string file_name = std::string(command_line_args_get_default_dir()) + "/" + "S_sie.resource" ; + sie_out.open(file_name.c_str(), std::fstream::in | std::fstream::out) ; + sie_out.seekg(-1, sie_out.end); + const char * comment = "\n"; + const int commentLength = 86; + char buff[commentLength + 1] = {0}; + char last = '\0'; + int pos; + while(memcmp(comment, buff, commentLength) != 0) { + while(last != '!' || sie_out.peek() != '<') { + if(sie_out.bad() || sie_out.fail() || sie_out.eof()) { + std::cerr << "Error: S_sie.resource is corrupted or outdated. Cannot add runtime/dynamic allocations. Please rerun trick-CP" << std::endl; + exit(2); + } + last = sie_out.peek(); + sie_out.seekg(-1, std::ios::cur); + pos = sie_out.tellg(); + } + sie_out.get(buff, commentLength + 1, '\0'); + sie_out.seekg(pos - 1); + } + sie_out.seekg(pos - 1); + sie_out.seekp((int)sie_out.tellg() + commentLength + 1); + runtime_objects_print(sie_out); + sie_out << "\n"; + sie_out.close(); +} + void Trick::Sie::sie_print_json() { std::ofstream sie_out ; std::string file_name = std::string(command_line_args_get_default_dir()) + "/" + "S_sie.json" ; diff --git a/trick_source/sim_services/VariableServer/VariableServerThread_commands.cpp b/trick_source/sim_services/VariableServer/VariableServerThread_commands.cpp index 17ca85ab..e1763fcd 100644 --- a/trick_source/sim_services/VariableServer/VariableServerThread_commands.cpp +++ b/trick_source/sim_services/VariableServer/VariableServerThread_commands.cpp @@ -459,7 +459,7 @@ int Trick::VariableServerThread::send_file(std::string file_name) { } int Trick::VariableServerThread::send_sie_resource() { - sie_print_xml() ; + //sie_print_xml() ; return transmit_file(std::string(command_line_args_get_default_dir()) + "/S_sie.resource") ; } diff --git a/trick_source/sim_services/include/Makefile b/trick_source/sim_services/include/Makefile index 6f722048..e1035144 100644 --- a/trick_source/sim_services/include/Makefile +++ b/trick_source/sim_services/include/Makefile @@ -1,3 +1,8 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../share/trick/makefiles/Makefile.common include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib -include Makefile_deps + +resource_clean: + $(RM) -f sim_services_classes.resource + +real_clean: resource_clean