Files
clang-p2996/lldb/test/API/python_api/target/read-instructions-flavor/main.c
Ebuka Ezike dda53bef35 [lldb] Fix SBTarget::ReadInstruction with flavor (#134626)
When you call the `SBTarget::ReadInstructions` with flavor from lldb
crashes. This is because the wrong order of the `DisassemblyBytes`
constructor this fixes that

---------

Signed-off-by: Ebuka Ezike <yerimyah1@gmail.com>
2025-04-11 13:45:19 +01:00

21 lines
462 B
C

// 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;
}