[rtems-tools commit] GcovFunctionData.cc: Add ostream_guard
    Joel Sherrill 
    joel at rtems.org
       
    Fri Aug 13 19:01:54 UTC 2021
    
    
  
Module:    rtems-tools
Branch:    master
Commit:    dc5e1fcdb10aae866894803192475b8177544001
Changeset: http://git.rtems.org/rtems-tools/commit/?id=dc5e1fcdb10aae866894803192475b8177544001
Author:    Ryan Long <ryan.long at oarcorp.com>
Date:      Wed Aug 11 16:13:14 2021 -0400
GcovFunctionData.cc: Add ostream_guard
CID 1506205: Not restoring ostream format
Closes #4484
---
 tester/covoar/GcovFunctionData.cc | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/tester/covoar/GcovFunctionData.cc b/tester/covoar/GcovFunctionData.cc
index aec04ce..4db5eba 100644
--- a/tester/covoar/GcovFunctionData.cc
+++ b/tester/covoar/GcovFunctionData.cc
@@ -13,6 +13,7 @@
 #include "ObjdumpProcessor.h"
 #include "CoverageMapBase.h"
 #include "DesiredSymbols.h"
+#include "rtems-utils.h"
 
 
 namespace Gcov {
@@ -367,6 +368,8 @@ namespace Gcov {
   {
     std::list<uint32_t>::iterator line;
 
+    rtems::utils::ostream_guard old_state( textFile );
+
     textFile << " > BLOCK " << std::setw( 3 ) << block->id
              << " from " << block->sourceFileName << std::endl
              << "    -counter: " << std::setw( 5 ) << block->counter
    
    
More information about the vc
mailing list