mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-27 07:19:03 -04:00

The first issue was that the test was capturing the "before" disassembly before launching, and the "after" after. This is a problem because some of the disassembly will change after we know the load address (e.g. PCs in call instructions). I fix this by capturing both disassemblies with the process running. The second issue was that the refactor in r328488 accidentaly changed the meaning of the test, as it was no longer disassembling the function which contained the breakpoint. While inside, I also modernize the test to use lldbutil.run_to_source_breakpoint and prevent debug-info replication. llvm-svn: 328504
29 lines
620 B
C++
29 lines
620 B
C++
//===-- main.cpp ------------------------------------------------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
int
|
|
sum (int a, int b)
|
|
{
|
|
int result = a + b; // Set a breakpoint here
|
|
return result;
|
|
}
|
|
|
|
int
|
|
main(int argc, char const *argv[])
|
|
{
|
|
|
|
int array[3];
|
|
|
|
array[0] = sum (1238, 78392);
|
|
array[1] = sum (379265, 23674);
|
|
array[2] = sum (872934, 234);
|
|
|
|
return 0;
|
|
}
|