title: How to setup custom breakpoints in the C++ program?
body: <p>I'm working on a project, where I cannot disclose the details of the code. So, the application is all written in C and C++. Since, a particular file which wanted to debug has a lot of dependencies and exports, I need to debug the whole project. How do I set breakpoints in the code itself so that the debugging would stop at that particular point? I'm using Ubuntu 14.04 (since the project is compatible with this environment) and gdb debugger.</p>
  
  <p>I've tried using</p>
  
  <pre><code>#include &lt;csignal&gt;
  
  // Generate an interrupt
  std::raise(SIGINT);
  </code></pre>
  
  <p>But I keep getting error</p>
  
  <pre><code>error: ‘raise’ is not a member of ‘std’
  </code></pre>
  
  <p>Even this also didn't work</p>
  
  <pre><code>#include &lt;signal.h&gt;
  raise(SIGINT);
  </code></pre>
  
  <p>Plus the debugging wont stop at that point, so that I could foresee the function at that point. I only want to debug it from console, rather using any IDE.</p>
  
  <p>Since the programfile I want to debug has lot many header files which it imports, I'm unable to make a executable to use gdb. So, while <code>make clean build</code> of my MakeFile I want to debug the particular program file at a particular function. So, for that I want to add  breakpoints in the program. I cannot use any GUI for debugging since I should not use.</p>