diff options
author | Jason Molenda <jmolenda@apple.com> | 2024-09-13 09:04:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-13 09:04:28 -0700 |
commit | 65a4d11b1e67429d53df1fcee0f93492aa95c448 (patch) | |
tree | f938ac92bff52f263fab72bb339a33e8d44ab253 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | |
parent | 213c59ddd2a702ddd3d849cea250440b1ed718e0 (diff) | |
download | llvm-65a4d11b1e67429d53df1fcee0f93492aa95c448.zip llvm-65a4d11b1e67429d53df1fcee0f93492aa95c448.tar.gz llvm-65a4d11b1e67429d53df1fcee0f93492aa95c448.tar.bz2 |
[lldb] Set the stop reason when receiving swbreak/hwbreak (#108518)
xusheng added support for swbreak/hwbreak a month ago, and no special
support was needed in ProcessGDBRemote when they're received because
lldb already marks a thread as having hit a breakpoint when it stops at
a breakpoint site. However, with changes I am working on, we need to
know the real stop reason a thread stopped or the breakpoint hit will
not be recognized.
This is similar to how lldb processes the "watch/rwatch/awatch" keys in
a thread stop packet -- we set the `reason` to `watchpoint`, and these
set it to `breakpoint` so we set the stop reason correctly later in
these methods.
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 5eaf9ce..271ff61 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -2317,6 +2317,8 @@ StateType ProcessGDBRemote::SetThreadStopInfo(StringExtractor &stop_packet) { StreamString ostr; ostr.Printf("%" PRIu64, wp_addr); description = std::string(ostr.GetString()); + } else if (key.compare("swbreak") == 0 || key.compare("hwbreak") == 0) { + reason = "breakpoint"; } else if (key.compare("library") == 0) { auto error = LoadModules(); if (error) { |