summaryrefslogtreecommitdiff
path: root/lldb/test/API/python_api/target/read-instructions-flavor/main.c
blob: 6022d63fb6ed773ef08f570562f3eb3695eb5cb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

// This simple program is to test the lldb Python API SBTarget ReadInstruction
// function.
//
// When the target is create we get all the instructions using the intel
// flavor and see if it is correct.

int test_add(int a, int b);

__asm__("test_add:\n"
        "    movl    %edi, %eax\n"
        "    addl    %esi, %eax\n"
        "    ret     \n");

int main(int argc, char **argv) {
  int a = 10;
  int b = 20;
  int result = test_add(a, b);

  return 0;
}