Package ghidra.app.cmd.data.rtti.gcc
Class VtableUtils
java.lang.Object
ghidra.app.cmd.data.rtti.gcc.VtableUtils
public class VtableUtils extends Object
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_PTR_DIFFS
-
Method Summary
Modifier and Type Method Description static Function[]
getFunctionTable(Program program, Address address)
Gets the function table at the specified address.static int
getFunctionTableLength(Program program, Address address)
Gets the number of elements in the vtable_prefix's function tablestatic int
getNumPtrDiffs(Program program, Address address)
Gets the number of ptrdiff_t's in the vtable_prefix at the addressstatic int
getNumPtrDiffs(Program program, Address address, int maxLength)
Gets the size of the ptrdiff_t array at the start of a vtable_prefixstatic Program
getProgram(Vtable vtable)
static String
getSymbolName(Vtable vtable)
static ClassTypeInfo
getTypeInfo(Program program, Address address)
Returns the TypeInfo Model this vtable points tostatic VttModel
getVttModel(Program program, GnuVtable vtable)
Gets the VttModel for the specified VtableModel if one existsstatic boolean
isMangled(String s)
-
Field Details
-
MAX_PTR_DIFFS
public static final int MAX_PTR_DIFFS- See Also:
- Constant Field Values
-
-
Method Details
-
getNumPtrDiffs
Gets the number of ptrdiff_t's in the vtable_prefix at the address- Parameters:
program
- the program containing the vtable_prefixaddress
- the address of the vtable_prefix- Returns:
- the number of ptrdiff_t's in the vtable_prefix at the address
-
getNumPtrDiffs
Gets the size of the ptrdiff_t array at the start of a vtable_prefix- Parameters:
program
- the program containing the ptrdiff_t arrayaddress
- the address of the ptrdiff_t arraymaxLength
- the max length for the ptrdiff_t array- Returns:
- the number of ptrdiff_t's in the array or 0 if invalid
-
getTypeInfo
Returns the TypeInfo Model this vtable points to- Parameters:
program
- program the vtable is inaddress
- address of the start of the vtable- Returns:
- the pointed to TypeInfo Model or null if not found
-
getFunctionTableLength
Gets the number of elements in the vtable_prefix's function table- Parameters:
program
- the program containing the function tableaddress
- the address of the function table- Returns:
- the number of elements in the vtable_prefix's function table
-
getFunctionTable
Gets the function table at the specified address.- Parameters:
program
- the program containing the function tableaddress
- the address of the function table- Returns:
- a Function[] representing the function table.
-
getVttModel
Gets the VttModel for the specified VtableModel if one exists- Parameters:
program
- the program containing the vtablevtable
- the vtable- Returns:
- the VttModel or
VttModel.INVALID
if none
-
isMangled
-
getSymbolName
-
getProgram
-