MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / PrintILExpr

Function PrintILExpr

examples/llil_parser/src/llil_parser.cpp:182–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180
181
182static void PrintILExpr(const LowLevelILInstruction& instr, size_t indent)
183{
184 PrintIndent(indent);
185 PrintOperation(instr.operation);
186 printf("\n");
187
188 indent++;
189
190 for (auto& operand : instr.GetOperands())
191 {
192 switch (operand.GetType())
193 {
194 case IntegerLowLevelOperand:
195 PrintIndent(indent);
196 printf("int 0x%" PRIx64 "\n", operand.GetInteger());
197 break;
198
199 case IndexLowLevelOperand:
200 PrintIndent(indent);
201 printf("index %" PRIdPTR "\n", operand.GetIndex());
202 break;
203
204 case ExprLowLevelOperand:
205 PrintILExpr(operand.GetExpr(), indent);
206 break;
207
208 case RegisterLowLevelOperand:
209 PrintIndent(indent);
210 printf("reg ");
211 PrintRegister(instr.function, operand.GetRegister());
212 printf("\n");
213 break;
214
215 case FlagLowLevelOperand:
216 PrintIndent(indent);
217 printf("flag ");
218 PrintFlag(instr.function, operand.GetFlag());
219 printf("\n");
220 break;
221
222 case FlagConditionLowLevelOperand:
223 PrintIndent(indent);
224 printf("flag condition ");
225 PrintFlagCondition(operand.GetFlagCondition());
226 printf("\n");
227 break;
228
229 case SSARegisterLowLevelOperand:
230 PrintIndent(indent);
231 printf("ssa reg ");
232 PrintRegister(instr.function, operand.GetSSARegister().reg);
233 printf("#%" PRIdPTR "\n", operand.GetSSARegister().version);
234 break;
235
236 case SSAFlagLowLevelOperand:
237 PrintIndent(indent);
238 printf("ssa flag ");
239 PrintFlag(instr.function, operand.GetSSAFlag().flag);

Callers 1

mainFunction · 0.70

Calls 15

PrintRegisterFunction · 0.85
PrintFlagFunction · 0.85
PrintFlagConditionFunction · 0.85
GetRegisterMethod · 0.80
GetFlagMethod · 0.80
GetSSARegisterMethod · 0.80
GetSSAFlagMethod · 0.80
GetSSARegisterListMethod · 0.80
GetSSAFlagListMethod · 0.80
PrintIndentFunction · 0.70
PrintOperationFunction · 0.70
GetOperandsMethod · 0.45

Tested by

no test coverage detected