20 lines
436 B
C
20 lines
436 B
C
|
// Usage example
|
|||
|
#include <stdio.h>
|
|||
|
#include "analysis_function.h"
|
|||
|
|
|||
|
// Test function
|
|||
|
int sum(int a, int b) {
|
|||
|
printf("a = %i, b = %i\n", a, b);
|
|||
|
a = a * 2 + b;
|
|||
|
b = b * 3 + 2;
|
|||
|
return a + b;
|
|||
|
}
|
|||
|
|
|||
|
int main() {
|
|||
|
byte* addr = AF_address(sum);
|
|||
|
// Get function size
|
|||
|
int fsize = AF_size(addr);
|
|||
|
// Print all function bytes
|
|||
|
printf("FUNCTION BYTES: "); AF_print_bytes(addr, fsize); printf("\n");
|
|||
|
return 0;
|
|||
|
}
|