Fix the check in StopInfoBreakpoint for "are we currently running an expression"
authorJim Ingham <jingham@apple.com>
Thu, 6 Apr 2023 00:10:42 +0000 (17:10 -0700)
committerJim Ingham <jingham@apple.com>
Thu, 6 Apr 2023 00:14:25 +0000 (17:14 -0700)
commitf79c037b63278bc5b4481a1a55c68e42f0ea1461
tree6bee82b9ab2f0c5f9a26e058c522dcae7574614c
parent38dc48fe200d784ed1aa47c3d63c9d25a48f18da
Fix the check in StopInfoBreakpoint for "are we currently running an expression"

We were checking "WasTheLastResumeForUserExpression" but that returns true even
if that expression was completed, provided we haven't run again.  This uses a
better check.

This is actually fairly hard to trigger.  It happens the first time you hit an
objc_exception_throw breakpoint and invoke that frame recognizer for that.  But
I couldn't trigger it using a Python based frame recognizer.  So I wrote a test
for the objc_exception_throw_breakpoint recognizer which should have been there
anyway...  It fails (the target auto-continues) w/o this patch and succeeds with
it.

Differential Revision: https://reviews.llvm.org/D147587
lldb/include/lldb/Target/Process.h
lldb/source/Target/StopInfo.cpp
lldb/test/API/macosx/objc_exception_recognizer/Makefile [new file with mode: 0644]
lldb/test/API/macosx/objc_exception_recognizer/TestObjCRecognizer.py [new file with mode: 0644]
lldb/test/API/macosx/objc_exception_recognizer/main.m [new file with mode: 0644]