Skip to content

Commit 4f3ef7a

Browse files
committed
improved documentation
1 parent 94a9b1d commit 4f3ef7a

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

python_pin.h

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -80,72 +80,71 @@ static PyMethodDef methods[] = {
8080
{"RTN_Name",
8181
Python_RTN_Name,
8282
METH_VARARGS,
83-
"fuck if I know dude"},
83+
"Name of routine"},
8484
{"RTN_Address",
8585
Python_RTN_Address,
8686
METH_VARARGS,
87-
"fuck if I know dude"},
87+
"Address in memory of rtn"},
8888
{"RTN_InsertCall",
8989
Python_RTN_InsertCall,
9090
METH_VARARGS,
91-
"stop"},
92-
/*AUTO GENERATED SKELETONS*/
91+
"Insert call relative to a rtn."},
9392
{"RTN_Valid",
9493
Python_RTN_Valid ,
9594
METH_VARARGS,
96-
"fuck if I know dude"},
95+
"True if x is not RTN_Invalid(). RTN_Valid() returns FALSE in certain cases when there is no static image of the code available, including dynamically generated code."},
9796
{"RTN_Id",
9897
Python_RTN_Id ,
9998
METH_VARARGS,
100-
"fuck if I know dude"},
99+
"Pin assigns each routine a unique ID. The ID is globally unique, i.e. an ID will not appear in two images. If the same routine name exists in two different images (i.e. they are in different addresses), each will have a different ID. If an image is unloaded and then reloaded, the routines within it will most likely have different IDs than before."},
101100
{"RTN_Range",
102101
Python_RTN_Range ,
103102
METH_VARARGS,
104-
"fuck if I know dude"},
103+
"range of routine in bytes (until the next known symbol or end of current code region)."},
105104
{"RTN_Size",
106-
Python_RTN_Size ,
105+
Python_RTN_Size,
107106
METH_VARARGS,
108-
"fuck if I know dude"},
107+
"size of routine in bytes"},
109108
{"RTN_IsDynamic",
110109
Python_RTN_IsDynamic ,
111110
METH_VARARGS,
112-
"fuck if I know dude"},
111+
"TRUE if the routine is dynamically created"},
113112
{"RTN_IsSafeForProbedInsertion",
114113
Python_RTN_IsSafeForProbedInsertion ,
115114
METH_VARARGS,
116-
"fuck if I know dude"},
115+
"Return TRUE if the given RTN is a candidate for function insertion using probes, and FALSE otherwise. This API should be called before attempting to insert a call to an analysis function using RTN_InsertCallProbed(). If you want to replace the given RTN with RTN_ReplaceSignatureProbed() or RTN_ReplaceProbed() you should use RTN_IsSafeForProbedReplacement()"},
117116
{"RTN_IsSafeForProbedReplacement",
118117
Python_RTN_IsSafeForProbedReplacement ,
119118
METH_VARARGS,
120-
"fuck if I know dude"},
119+
"Return TRUE if the given RTN is a candidate for probed function replacement, and FALSE otherwise. This API should be called before attempting to replace a function using RTN_ReplaceSignatureProbed() or RTN_ReplaceProbed(). Note that this routine does not guarantee it is safe to place a probe, it merely indicates that certain conditions are not present."},
121120
{"RTN_FindNameByAddress",
122121
Python_RTN_FindNameByAddress ,
123122
METH_VARARGS,
124-
"fuck if I know dude"},
123+
"Return the name of a function. If more than one name is associated with this address, the first name found is returned."},
125124
{"RTN_FindByName",
126125
Python_RTN_FindByName,
127126
METH_VARARGS,
128-
"fuck if I know dude"},
127+
"Handle to the RTN found. If not found returns RTN_Invalid()"},
129128
{"RTN_Open",
130129
Python_RTN_Open ,
131130
METH_VARARGS,
132-
"fuck if I know dude"},
131+
"Open the given rtn. This must be called before RTN_InsHead() or RTN_InsertCall() or RTN_InsHeadOnly()"},
133132
{"RTN_Close",
134133
Python_RTN_Close,
135134
METH_VARARGS,
136-
"fuck if I know dude"},
135+
"Close the given rtn. This must be called before opening a new rtn."},
137136
{"RTN_InsHead",
138137
Python_RTN_InsHead ,
139138
METH_VARARGS,
140-
"fuck if I know dude"},
139+
"You must call RTN_Open() before the first time this is called for an rtn"},
141140
{"RTN_InsTail",
142141
Python_RTN_InsTail ,
143142
METH_VARARGS,
144-
"fuck if I know dude"},
143+
"You must call RTN_Open() before the first time this is called for an rtn"},
145144
{"RTN_NumIns",
146145
Python_RTN_NumIns ,
147146
METH_VARARGS,
148-
"fuck if I know dude"},
147+
"Compute number of static INSs inside RTN."},
149148
{"IMG_Next",
150149
Python_IMG_Next,
151150
METH_VARARGS,

0 commit comments

Comments
 (0)