diff options
author | Michał Górny <mgorny@moritz.systems> | 2021-04-26 13:47:02 +0200 |
---|---|---|
committer | Michał Górny <mgorny@moritz.systems> | 2021-09-06 12:16:14 +0200 |
commit | 37cbd817d3e2b8c673862e2eb262cad6dd3dd244 (patch) | |
tree | 57262d6e7bbc9c8d89a3a88be8887c0b64fee23d /lldb/source/Utility/StringExtractorGDBRemote.cpp | |
parent | fae0dfa6421ea6c02f86ba7292fa782e1e2b69d1 (diff) | |
download | llvm-37cbd817d3e2b8c673862e2eb262cad6dd3dd244.zip llvm-37cbd817d3e2b8c673862e2eb262cad6dd3dd244.tar.gz llvm-37cbd817d3e2b8c673862e2eb262cad6dd3dd244.tar.bz2 |
[lldb] [llgs server] Support creating core dumps on NetBSD
Add a new SaveCore() process method that can be used to request a core
dump. This is currently implemented on NetBSD via the PT_DUMPCORE
ptrace(2) request, and enabled via 'savecore' extension.
Protocol-wise, a new qSaveCore packet is introduced. It accepts zero
or more semicolon-separated key:value options, invokes the core dump
and returns a key:value response. Currently the only option supported
is "path-hint", and the return value contains the "path" actually used.
The support for the feature is exposed via qSaveCore qSupported feature.
Differential Revision: https://reviews.llvm.org/D101285
Diffstat (limited to 'lldb/source/Utility/StringExtractorGDBRemote.cpp')
-rw-r--r-- | lldb/source/Utility/StringExtractorGDBRemote.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Utility/StringExtractorGDBRemote.cpp b/lldb/source/Utility/StringExtractorGDBRemote.cpp index 29cf585..7279075 100644 --- a/lldb/source/Utility/StringExtractorGDBRemote.cpp +++ b/lldb/source/Utility/StringExtractorGDBRemote.cpp @@ -260,6 +260,8 @@ StringExtractorGDBRemote::GetServerPacketType() const { break; case 'S': + if (PACKET_STARTS_WITH("qSaveCore")) + return eServerPacketType_qLLDBSaveCore; if (PACKET_STARTS_WITH("qSpeedTest:")) return eServerPacketType_qSpeedTest; if (PACKET_MATCHES("qShlibInfoAddr")) |