brintos

brintos / llvm-project-archived public Read only

0
0
Text · 462 B · 6022d63 Raw
21 lines · c
1 2// This simple program is to test the lldb Python API SBTarget ReadInstruction3// function.4//5// When the target is create we get all the instructions using the intel6// flavor and see if it is correct.7 8int test_add(int a, int b);9 10__asm__("test_add:\n"11        "    movl    %edi, %eax\n"12        "    addl    %esi, %eax\n"13        "    ret     \n");14 15int main(int argc, char **argv) {16  int a = 10;17  int b = 20;18  int result = test_add(a, b);19 20  return 0;21}