Files
clang-p2996/lldb/test/functionalities/thread/jump/main.cpp
Richard Mitton f86248d9ba Added a 'jump' command, similar to GDBs.
This allows the PC to be directly changed to a different line.
It's similar to the example python script in examples/python/jump.py, except implemented as a builtin.

Also this version will track the current function correctly even if the target line resolves to multiple addresses. (e.g. debugging a templated function)

llvm-svn: 190572
2013-09-12 02:20:34 +00:00

35 lines
701 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.
//
//===----------------------------------------------------------------------===//
// This test verifies the correct handling of program counter jumps.
int otherfn();
template<typename T>
T min(T a, T b)
{
if (a < b)
{
return a; // 1st marker
} else {
return b; // 2nd marker
}
}
int main ()
{
int i;
double j;
i = min(4, 5); // 3rd marker
j = min(7.0, 8.0); // 4th marker
return 0;
}