summaryrefslogtreecommitdiff
path: root/lldb
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2023-05-10 15:40:40 -0700
committerJim Ingham <jingham@apple.com>2023-05-10 15:40:40 -0700
commit7b5dc63fc4464e777e4210a68120b36cb283a9fd (patch)
tree2c69ee8135f37dd9933f3105851d11a89449f14e /lldb
parentf0d6876e3a4db10be4604719c1508f6f76aaf120 (diff)
downloadllvm-7b5dc63fc4464e777e4210a68120b36cb283a9fd.tar.gz
When the Debugger runs HandleProcessEvent it should allow
selecting the "Most relevant" frame. If you don't do that, then the correct frame gets selected, but it happens AFTER the frame info gets printed in the stop message, so you don't see the selected frame. The test for this hid the issue because it ran `frame info` and checked the result of that. That happens after the recognizer selects the frame, and so it was right. But if the recognizer is working correctly it will have already done the same printing in the stop message, and this way we also verify that the stop message was right. Differential Revision: https://reviews.llvm.org/D150315
Diffstat (limited to 'lldb')
-rw-r--r--lldb/source/Core/Debugger.cpp6
-rw-r--r--lldb/test/Shell/Recognizer/assert.test1
2 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index fbfee28183dd..e39879953820 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -1699,8 +1699,10 @@ void Debugger::HandleProcessEvent(const EventSP &event_sp) {
// Display running state changes first before any STDIO
if (got_state_changed && !state_is_stopped) {
+ // This is a public stop which we are going to announce to the user, so
+ // we should force the most relevant frame selection here.
Process::HandleProcessStateChangedEvent(event_sp, output_stream_sp.get(),
- DoNoSelectMostRelevantFrame,
+ SelectMostRelevantFrame,
pop_process_io_handler);
}
@@ -1740,7 +1742,7 @@ void Debugger::HandleProcessEvent(const EventSP &event_sp) {
// Now display any stopped state changes after any STDIO
if (got_state_changed && state_is_stopped) {
Process::HandleProcessStateChangedEvent(event_sp, output_stream_sp.get(),
- DoNoSelectMostRelevantFrame,
+ SelectMostRelevantFrame,
pop_process_io_handler);
}
diff --git a/lldb/test/Shell/Recognizer/assert.test b/lldb/test/Shell/Recognizer/assert.test
index 3e302ee40338..201e834cf357 100644
--- a/lldb/test/Shell/Recognizer/assert.test
+++ b/lldb/test/Shell/Recognizer/assert.test
@@ -9,7 +9,6 @@
# RUN: %lldb -b -s %s %t.out | FileCheck %s
run
# CHECK: thread #{{.*}}stop reason = hit program assert
-frame info
# CHECK: frame #{{.*}}`main at assert.c
frame recognizer info 0
# CHECK: frame 0 is recognized by Assert StackFrame Recognizer