Coverage for /Syzygy/pe/decompose_image_to_text_app.h

CoverageLines executed / instrumented / missingexe / inst / missLanguageGroup
0.0%0029.C++source

Line-by-line coverage:

   1    :  // Copyright 2012 Google Inc. All Rights Reserved.
   2    :  //
   3    :  // Licensed under the Apache License, Version 2.0 (the "License");
   4    :  // you may not use this file except in compliance with the License.
   5    :  // You may obtain a copy of the License at
   6    :  //
   7    :  //     http://www.apache.org/licenses/LICENSE-2.0
   8    :  //
   9    :  // Unless required by applicable law or agreed to in writing, software
  10    :  // distributed under the License is distributed on an "AS IS" BASIS,
  11    :  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12    :  // See the License for the specific language governing permissions and
  13    :  // limitations under the License.
  14    :  //
  15    :  // A command line application to decompose an image to a human-readable,
  16    :  // textual description.
  17    :  
  18    :  #ifndef SYZYGY_PE_DECOMPOSE_IMAGE_TO_TEXT_APP_H_
  19    :  #define SYZYGY_PE_DECOMPOSE_IMAGE_TO_TEXT_APP_H_
  20    :  
  21    :  #include "base/files/file_path.h"
  22    :  #include "syzygy/block_graph/basic_block_subgraph.h"
  23    :  #include "syzygy/block_graph/block_graph.h"
  24    :  #include "syzygy/common/application.h"
  25    :  
  26  m :  namespace pe {
  27    :  
  28    :  // This class implements the decompose image to text command-line utility.
  29    :  //
  30    :  // See the description given in PrintUsage() for information about running
  31    :  // this utility.
  32  m :  class DecomposeImageToTextApp : public common::AppImplBase {
  33  m :   public:
  34  m :    DecomposeImageToTextApp();
  35    :  
  36    :    // @name Implementation of the AppImplBase interface.
  37    :    // @{
  38  m :    bool ParseCommandLine(const CommandLine* command_line);
  39    :  
  40  m :    int Run();
  41    :    // @}
  42    :  
  43  m :   protected:
  44  m :    typedef block_graph::BlockGraph BlockGraph;
  45  m :    typedef block_graph::BasicBlock BasicBlock;
  46  m :    typedef block_graph::BasicCodeBlock BasicCodeBlock;
  47  m :    typedef block_graph::BasicDataBlock BasicDataBlock;
  48  m :    typedef block_graph::BasicBlockSubGraph BasicBlockSubGraph;
  49    :  
  50  m :    void PrintUsage(const base::FilePath& program,
  51  m :                    const base::StringPiece& message);
  52    :  
  53    :    // Given @p address_space, dump it in text format to out().
  54  m :    void DumpAddressSpaceToText(const BlockGraph::AddressSpace& address_space);
  55    :  
  56    :    // Given @p subgraph, dump it in text format to out().
  57  m :    void DumpSubGraphToText(BasicBlockSubGraph& subgraph);
  58    :  
  59    :    // Given the code basic block @p bb, dump it in text format to out().
  60  m :    void DumpCodeBBToText(const BlockGraph::Block* block,
  61  m :                          const BasicCodeBlock* bb);
  62    :    // Given the data basic block @p bb, dump it in text format to out().
  63  m :    void DumpDataBBToText(const BlockGraph::Block* block,
  64  m :                          const BasicDataBlock* bb);
  65    :  
  66    :    // Dump @p block at @p addr in text format to out().
  67  m :    void DumpBlockToText(core::RelativeAddress addr,
  68  m :                         const BlockGraph::Block* block);
  69    :  
  70    :    // Dump the image at @p image_path to out().
  71  m :    bool DumpImageToText(const base::FilePath& image_path);
  72    :  
  73    :    // The image to decompose.
  74  m :    base::FilePath image_path_;
  75    :  
  76    :    // True if we're to dump basic block information.
  77  m :    bool dump_basic_blocks_;
  78    :  
  79    :    // True if we want to use the new decomposer.
  80  m :    bool use_new_decomposer_;
  81    :  
  82    :    // Number of references we've encountered.
  83  m :    size_t num_refs_;
  84  m :  };
  85    :  
  86  m :  }  // namespace pe
  87    :  
  88    :  #endif  // SYZYGY_PE_DECOMPOSE_IMAGE_TO_TEXT_APP_H_

Coverage information generated Thu Jul 04 09:34:53 2013.