<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Breakpoint does not hit when evaluating a function call expression"
   href="http://llvm.org/bugs/show_bug.cgi?id=22315">22315</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Breakpoint does not hit when evaluating a function call expression
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sivachandra@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Consider the following code:

  1  int
  2  f (int a, int b)
  3  { 
  4    return a + b;  // Break here
  5  } 
  6 
  7  int
  8  main ()
  9  {
 10    return f (0, 0);
 11  }

I see that the break point at the marked line is not hit when evaluating a call
to f from lldb command line:

(lldb) b simple.cc :4
Breakpoint 1: where = a.out`f(int, int) + 10 at simple.cc:4, address =
0x00000000004004f7

(lldb) r
Process 23889 launching
Process 23889 launched: '/usr/local/google/home/sivachandra/LAB/c++/a.out'
(x86_64)
Process 23889 stopped
* thread #1: tid = 23889, 0x00000000004004f7 a.out`f(a=0, b=0) + 10 at
simple.cc:4, name = 'a.out', stop reason = breakpoint 1.1
    frame #0: 0x00000000004004f7 a.out`f(a=0, b=0) + 10 at simple.cc:4
   1       int
   2       f (int a, int b)
   3       {
-> 4         return a + b;  // Break here
   5       }
   6       
   7       int

(lldb) p f(1, 2)
(int) $0 = 3

The function call returns without stopping at the breakpoint.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>