title: How to do a specific action when ANY Unknown Breakpoint gets Hit in GDB
body: <p>I have read the following SO question:
  <a href="https://stackoverflow.com/questions/6517423/do-specific-action-when-certain-breakpoint-hits-in-gdb">Do specific action when certain breakpoint hits in gdb</a></p>
  
  <p>Here, we use 'command' to decide what to do when the SPECIFIED Breakboint Gets Hit.</p>
  
  <p>My Question is:</p>
  
  <p>Suppose I put Breakpoints on ALL the Functions matching a given pattern:</p>
  
  <pre><code>gdb$rbreak func_
  </code></pre>
  
  <p>=> 100 Breakpoints (say)</p>
  
  <p>When I execute this Code, I want to do the SAME Action - on hitting Each of these functions.</p>
  
  <p>Hence, I cannot define something like:</p>
  
  <pre><code>command break_point_number 
  </code></pre>
  
  <p>// since I don't know how many breakpoints will be there</p>
  
  <p>Can somebody please suggest me:</p>
  
  <p>How can I do a specific action-set when ANY Breakpoint gets Hit in GDB?</p>
  
  <p>Thanks.</p>