Pin
Classes | Functions | Variables
util.cpp File Reference
#include "level_base.H"
#include <sys/times.h>
#include <string.h>
#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <errno.h>
#include "my_unistd.H"

Classes

class  LEVEL_BASE::COMMAND_LINE_ARGUMENTS
 
struct  LEVEL_BASE::DECSTR
 
struct  LEVEL_BASE::HEXSTR
 
struct  LEVEL_BASE::FLTSTR
 

Functions

VOID LEVEL_BASE::SetAddress0x (BOOL val)
 
BOOL LEVEL_BASE::CharIsSpace (CHAR c)
 
CHAR LEVEL_BASE::CharToUpper (CHAR c)
 
std::string LEVEL_BASE::ptrstr (const VOID *val)
 
std::string LEVEL_BASE::StringFromAddrint (ADDRINT l)
 
std::string LEVEL_BASE::StringFromUint64 (UINT64 l)
 
std::string LEVEL_BASE::StringDec (UINT64 l, UINT32 digits, CHAR padding)
 
std::string LEVEL_BASE::StringDecSigned (INT64 l, UINT32 digits, CHAR padding)
 
std::string LEVEL_BASE::StringBignum (INT64 l, UINT32 digits, CHAR padding)
 
std::string LEVEL_BASE::Reformat (const std::string &s, const std::string &prefix, UINT32 min_line, UINT32 max_line)
 
std::string LEVEL_BASE::StringHex32 (UINT32 l, UINT32 digits, BOOL prefix_0x)
 
std::string LEVEL_BASE::StringBool (BOOL b)
 
std::string LEVEL_BASE::StringTri (TRI t)
 
INT32 LEVEL_BASE::Int32FromString (const std::string &s)
 
UINT32 LEVEL_BASE::Uint32FromString (const std::string &s)
 
INT64 LEVEL_BASE::Int64FromString (const std::string &s)
 
UINT64 LEVEL_BASE::Uint64FromString (const std::string &s)
 
FLT64 LEVEL_BASE::FLT64FromString (const std::string &s)
 
INT LEVEL_BASE::CharToHexDigit (CHAR c)
 
ADDRINT LEVEL_BASE::AddrintFromString (const std::string &str)
 
std::string LEVEL_BASE::ReadLine (std::istream &inputFile, UINT32 *lineNum)
 
UINT32 LEVEL_BASE::Tokenize (const std::string &line, std::string *array, UINT32 n)
 
std::string LEVEL_BASE::StringHex (UINT32 l, UINT32 digits, BOOL prefix_0x=TRUE)
 
std::string LEVEL_BASE::decstr (INT64 val, UINT32 width=0)
 
std::string LEVEL_BASE::decstr (INT32 val, UINT32 width=0)
 
std::string LEVEL_BASE::decstr (INT16 val, UINT32 width=0)
 
std::string LEVEL_BASE::decstr (UINT64 val, UINT32 width=0)
 
std::string LEVEL_BASE::decstr (UINT32 val, UINT32 width=0)
 
std::string LEVEL_BASE::decstr (UINT16 val, UINT32 width=0)
 
std::string LEVEL_BASE::hexstr (INT64 val, UINT32 width=0)
 
std::string LEVEL_BASE::hexstr (INT32 val, UINT32 width=0)
 
std::string LEVEL_BASE::hexstr (INT16 val, UINT32 width=0)
 
std::string LEVEL_BASE::hexstr (UINT64 val, UINT32 width=0)
 
std::string LEVEL_BASE::hexstr (VOID *p, UINT32 width=0)
 
std::string LEVEL_BASE::hexstr (const VOID *p, UINT32 width=0)
 
std::string LEVEL_BASE::hexstr (UINT32 val, UINT32 width=0)
 
std::string LEVEL_BASE::hexstr (UINT16 val, UINT32 width=0)
 
std::string LEVEL_BASE::ljstr (const std::string &s, UINT32 width, CHAR padding=' ')
 
std::string LEVEL_BASE::StringFlt (FLT64 val, UINT32 precision, UINT32 width)
 
std::string LEVEL_BASE::fltstr (FLT64 val, UINT32 prec=0, UINT32 width=0)
 

Variables

LOCALVAR BOOL LEVEL_BASE::Address0x = false
 
LOCALVAR const CHAR LEVEL_BASE::HexTab [] = "0123456789abcdef"
 

Detailed Description

This module contains useful utility functions.