<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - Support conditional breakpoints during expression evaluation"
   href="https://bugs.llvm.org/show_bug.cgi?id=33164">33164</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Support conditional breakpoints during expression evaluation
          </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>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </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@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>labath@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In D33283 Jim Ingham said:


The fact that a breakpoint hit while evaluating an expression doesn't check the
condition is a known limitation.

You've got to protect against artificial recursions in handling breakpoints.
For instance, you could have a breakpoint condition in a function where the
condition calls back into the same function, hitting the breakpoint again,
calling the condition again, etc... Sounds a bit far-fetched, but it actually
happened in the field, which is why I added this protection. The code that does
this is in StopInfoBreakpoint.cpp::PerformAction.

We could be smarter about condition evaluation, since nesting expression
evaluation does work. Maybe tracking how deeply nested the condition evaluation
is and having a cutoff at some (settable?) depth. Or have a "I promise I'm not
going to do anything stupid" setting - though that seems hacky... I don't think
there is a bug about this, but it would be great to file one.

Note, we also prohibit breakpoint command execution in expressions. We have to
do that because the current implementation of the command evaluator isn't
re-entrant. We really should fix that some day, but that's a decent chunk of
work. Anyway, so we have to be draconian about command evaluation, but with
some care we could relax the condition evaluation prohibition.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>