ROSE 0.11.145.192
Classes | Enumerations | Functions
Rose::BinaryAnalysis::Partitioner2::ModulesJvm Namespace Reference

Description

Disassembly and partitioning utility functions for JVM.

Utility functions, primarily for handling Java jar files.

Classes

struct  FileStat
 This class represents the contents of a central directory file header in a zip file. More...
 
struct  Zipper
 

Enumerations

enum  {
  MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG = 0x06054b50 ,
  MZ_ZIP_CENTRAL_DIR_HEADER_SIG = 0x02014b50 ,
  MZ_ZIP_LOCAL_DIR_HEADER_SIG = 0x04034b50 ,
  MZ_ZIP_LOCAL_DIR_HEADER_SIZE = 30 ,
  MZ_ZIP_CENTRAL_DIR_HEADER_SIZE = 46 ,
  MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE = 22 ,
  MZ_ZIP_CDH_SIG_OFS = 0 ,
  MZ_ZIP_CDH_VERSION_MADE_BY_OFS = 4 ,
  MZ_ZIP_CDH_VERSION_NEEDED_OFS = 6 ,
  MZ_ZIP_CDH_BIT_FLAG_OFS = 8 ,
  MZ_ZIP_CDH_METHOD_OFS = 10 ,
  MZ_ZIP_CDH_FILE_TIME_OFS = 12 ,
  MZ_ZIP_CDH_FILE_DATE_OFS = 14 ,
  MZ_ZIP_CDH_CRC32_OFS = 16 ,
  MZ_ZIP_CDH_COMPRESSED_SIZE_OFS = 20 ,
  MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS = 24 ,
  MZ_ZIP_CDH_FILENAME_LEN_OFS = 28 ,
  MZ_ZIP_CDH_EXTRA_LEN_OFS = 30 ,
  MZ_ZIP_CDH_COMMENT_LEN_OFS = 32 ,
  MZ_ZIP_CDH_DISK_START_OFS = 34 ,
  MZ_ZIP_CDH_INTERNAL_ATTR_OFS = 36 ,
  MZ_ZIP_CDH_EXTERNAL_ATTR_OFS = 38 ,
  MZ_ZIP_CDH_LOCAL_HEADER_OFS = 42 ,
  MZ_ZIP_LDH_SIG_OFS = 0 ,
  MZ_ZIP_LDH_VERSION_NEEDED_OFS = 4 ,
  MZ_ZIP_LDH_BIT_FLAG_OFS = 6 ,
  MZ_ZIP_LDH_METHOD_OFS = 8 ,
  MZ_ZIP_LDH_FILE_TIME_OFS = 10 ,
  MZ_ZIP_LDH_FILE_DATE_OFS = 12 ,
  MZ_ZIP_LDH_CRC32_OFS = 14 ,
  MZ_ZIP_LDH_COMPRESSED_SIZE_OFS = 18 ,
  MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS = 22 ,
  MZ_ZIP_LDH_FILENAME_LEN_OFS = 26 ,
  MZ_ZIP_LDH_EXTRA_LEN_OFS = 28 ,
  MZ_ZIP_ECDH_SIG_OFS = 0 ,
  MZ_ZIP_ECDH_NUM_THIS_DISK_OFS = 4 ,
  MZ_ZIP_ECDH_NUM_DISK_CDIR_OFS = 6 ,
  MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS = 8 ,
  MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS = 10 ,
  MZ_ZIP_ECDH_CDIR_SIZE_OFS = 12 ,
  MZ_ZIP_ECDH_CDIR_OFS_OFS = 16 ,
  MZ_ZIP_ECDH_COMMENT_SIZE_OFS = 20
}
 
enum  {
  MZ_ZIP_MAX_IO_BUF_SIZE = 64*1024 ,
  MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE = 260 ,
  MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE = 256
}
 

Functions

bool isJavaClassFile (const boost::filesystem::path &)
 True if named file is a Java class file.
 
bool isJavaJarFile (const boost::filesystem::path &)
 True if named file is a Java jar file.
 
bool loadClassFile (const std::string &, const std::vector< ModulesJvm::Zipper * > &, rose_addr_t)
 Load class file from jars, if present.
 
void warn (const std::string &msg)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Definition at line 52 of file ModulesJvm.h.

◆ anonymous enum

anonymous enum

Definition at line 101 of file ModulesJvm.h.

Function Documentation

◆ isJavaClassFile()

bool Rose::BinaryAnalysis::Partitioner2::ModulesJvm::isJavaClassFile ( const boost::filesystem::path &  )

True if named file is a Java class file.

Class files usually have names with a ".class" extension, although this function actually tries to open the file and parse the file header to make that determination.

References isJavaClassFile().

Referenced by isJavaClassFile().

◆ isJavaJarFile()

bool Rose::BinaryAnalysis::Partitioner2::ModulesJvm::isJavaJarFile ( const boost::filesystem::path &  )

True if named file is a Java jar file.

Jar files usually have names with a ".jar" extension, although this function actually tries to open the file and parse the file header to make that determination.

References isJavaJarFile().

Referenced by isJavaJarFile().