/*========================================================================= Program: Visualization Toolkit Module: vtkBreakPoint.h Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /** * @class vtkBreakPoint * @brief Utility function to debug with gdb and MPI. * * Wherever you need to set a break point inside a piece of code run by MPI, * * Step 1: call vtkBreakPoint::Break() in the code. * Step 2: start MPI, each process will display its PID and sleep. * Step 3: start gdb with the PID: gdb --pid= * Step 4: set a breakpoint at the line of interest: (gdb) b