Page MenuHomePhabricator

[lldb] [llgs server] Support creating core dumps on NetBSD
Needs ReviewPublic

Authored by mgorny on Apr 26 2021, 4:52 AM.

Details

Summary

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.

Diff Detail

Event Timeline

mgorny requested review of this revision.Apr 26 2021, 4:52 AM
mgorny created this revision.
mgorny updated this revision to Diff 340558.Apr 26 2021, 9:26 AM
mgorny retitled this revision from [lldb] [llgs server] Support creating core dumps on NetBSD [WIP] to [lldb] [llgs server] Support creating core dumps on NetBSD.

Create a temporary file if path-hint is not provided.

mgorny updated this revision to Diff 340560.Apr 26 2021, 9:28 AM

Remove unnecessary const_cast, reformat.

Harbormaster completed remote builds in B100962: Diff 340560.
mgorny updated this revision to Diff 340638.Apr 26 2021, 1:58 PM

Fix missing + in qSupported. Fix known stub features.

mgorny updated this revision to Diff 341138.Apr 28 2021, 4:05 AM

Use a temporary file if path-hint is not writable.