Utilities for formatting strings


Functions

This module contains routines
and classes for the 
handling (error) messages */namespace LEVEL_BASE

Function Documentation

This module contains routines and classes for the handling error   ) 
 

Set mode for printing of addresses, two formats are available either 0x12345678 or #1234_5678

ctype::isspace alternative (avoids complications from including ctype.h)

ctype::toupper alternative (avoids complications from including ctype.h)

print pointer

convert a UINT64 into a string using the hex address format

convert a UINT64 into a dec string. Padding can be specified as well

convert a UINT64 into a dec string. Padding can be specified as well

Convert an array of integers to string, separated by spaces.

convert a UINT64 into a dec string with 1000 separation . Padding can be specified as well

add new lines to string to make it fit given line width restrictions

convert a UINT64 into a hex string. Padding can be specified as well

convert a FLT into a string. Padding can be specified as well

convert a BOOL into a string.

convert a string to a UINT32

convert a string to a UINT64

convert a string to a FLT64

Convert a string to an ADDRINT

popcount/bitcount code using the usual trick

read a line from file while maintaining a current line count skiping over blank and comment lines.

break a line into tokens separated by whitespace return them in 'array'

x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

left justify string

convert ADDRINT to "void *"

convert "void *" to ADDRINT

convert "void *" to ADDRINT

round integer up to given alignment

round integer down to given alignment

round address up to given alignment

round address down to given alignment

Convert a pointer to an ADDRINT.

Convert an ADDRINT to a pointer.

convert "void *" to int

integer bit width check

Parameters:
value the value to whose size we are checking
origSize where to look for the sign bit (typically 8,16,32 or 64)
extendedSize If not zero, a quick test compared against origSize for equality. We pass extendedSize as zero when we want to check if the value ifts in origSize.
Returns:
true if sign extending from origSize to extendedSize will not change value
Wrapper for 3-arg SignedImmedateFits()

Parameters:
value the value to whose size we are checking
origSize where to look for the sign bit (typically 8,16,32 or 64)
Returns:
true if sign extending from origSize to extendedSize will not change value
Internal helper for HashData().

Specialization for optimization (1 byte data size).

Specialization for optimization (2 byte data size).

Specialization for optimization (4 byte data size).

Specialization for optimization (8 byte data size).

Function to incrementally construct a hash value.

Parameters:
[in] prevHash Previous hash value (or zero)
[in] data New data item to include in hash value.
Returns:
Returns the new hash value.
This can be used to compute the number of bits required to hold an integer (up to a 32-bit integer). Usage is like this:

 int nbits = NUMBER_BITS<54>::bits;  // number of bits required to hold "54"

Note, the value computed is a compile-time constant, so it can be used wherever a constant is allowed:

 struct FOO
 {
    int a : NUMBER_BITS<54>::bits;  // define a bit field large enough to hold "54"
 };

helper function for pin command line argument processing

another pin helper function for command line arguments

Return the entry point of a program (either that of the main image or of the dynamic loader)

Concatenate two strings with a path delimiter

Strip the path information

Create a temporary file name

Push data into stack and return updated value of top of stack the stack is growing to the lower addresses

Parameters:
[in] stack top of stack
[in] data pointer to the data to be copied
[in] alignment new value of top of stack suppose to be aligned on "alignment" value, in bytes. the value has to be power of 2
[in] size size of the data, in bytes
Returns:
updated value of top of stack
Return offset, in bytes, of <ptr1> from <ptr2>

Return pointer whose offset, in bytes, from <ptr> is <offset>

Class that represents a memory range - interval of adrresses in the virtual address space

Utility class intended to help in implementing functions that perform their action only "once", when called for the first time. The functions are assumed to return BOOL or VOID.

Note:
the class is not multithread safe. USAGE: ONCE_STATE fooState; BOOL foo() { if (!fooState.Enter()) {return fooState.IsSuccess();} ..... return fooState.Exit(FALSE); ..... return fooState.Exit(TRUE); }
< initial state - function never executed

< function is currently running

< function executed successfully

< function executed but failed

Total net bytes allocated by RawMmap and RawMunmap. This must be global because another stats are normalized to this value. The actual value is kept as a local variable in sysfuncs_* and updated by UpdateRawMmapBytes to avoid accessing this variable before the constructor has run.

Total net bytes reserved.

Unattributed allocations

Update StatRawMmapBytes from a local variable. We can't update the stat directly in RawMmap because it might be called before the constructor for the stat has been executed.

A function calling all malloc-related functions. Calling PullinPinMalloc() in pin and pinclient forces the dynamic loader to pull in the Pin's malloc.


Generated on Tue Jan 16 00:09:08 2007 for Pin by  doxygen 1.4.6