title: How to print a variable on a particular condition in gdb?
body: <p>I wish to print the variable in a function (which is called 
  multiple times )  to be printed each time the function is invoked.</p>
  
  <p>Is it possible to do this automatically through gdb ?? Something 
  like conditional printing ... </p>
  
  <p>something like .. </p>
  
  <pre><code>void func()
  { 
      if( t == 0 ) 
         x = z+1;
      else
         x = p+2; 
  } 
  </code></pre>
  
  <p>I want the variable to be printed when t == 0 
  and ignore otherwise .. </p>