ROSE 2.1.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
Rose::BinaryAnalysis::CilStringFinder Struct Reference

Description

A StringFinder class for CIL binaries.

Definition at line 20 of file CilStringFinder.h.

#include <Rose/BinaryAnalysis/CilStringFinder.h>

Public Types

enum  CilStringKinds {
  none = 0 ,
  literals = 1 << 0 ,
  metadata = 1 << 1 ,
  all = literals | metadata
}
 Settings for specifying which kind of CIL strings shall be found. More...
 
using StringCollectorFn = std::function< void(std::string s)>
 callback for storing strings
 

Public Member Functions

void collect (const SgProject &proj, StringCollectorFn collector, CilStringKinds kinds=CilStringKinds::all) const
 depending on the settings of kind finds strings in proj and calls collector for each one.
 
std::vector< std::string > find (const SgProject &proj, CilStringKinds kinds=CilStringKinds::all) const
 depending on the settings of kind finds strings in proj and calls collector for each one.
 

Member Typedef Documentation

◆ StringCollectorFn

using Rose::BinaryAnalysis::CilStringFinder::StringCollectorFn = std::function<void(std::string s)>

callback for storing strings

Definition at line 22 of file CilStringFinder.h.

Member Enumeration Documentation

◆ CilStringKinds

Settings for specifying which kind of CIL strings shall be found.

Enumerator
literals 

literals on the US heap referenced in the code section of methods

metadata 

strings referenced in the CIL metadata

Definition at line 25 of file CilStringFinder.h.

Member Function Documentation

◆ collect()

void Rose::BinaryAnalysis::CilStringFinder::collect ( const SgProject proj,
StringCollectorFn  collector,
CilStringKinds  kinds = CilStringKinds::all 
) const

depending on the settings of kind finds strings in proj and calls collector for each one.

Parameters
proja ROSE project containing CIL metadata
collecora string collection functor
kindssettings identifying which strings shall be found

◆ find()

std::vector< std::string > Rose::BinaryAnalysis::CilStringFinder::find ( const SgProject proj,
CilStringKinds  kinds = CilStringKinds::all 
) const

depending on the settings of kind finds strings in proj and calls collector for each one.

Parameters
proja ROSE project containing CIL metadata
collecora string collection functor
kindssettings identifying which strings shall be found
Returns
a vector of strings found in a CIL project proj.

The documentation for this struct was generated from the following file: