[Lldb-commits] [PATCH] D70474: [Reproducer] Generate LLDB reproducer on crash

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 19 17:37:56 PST 2019


JDevlieghere created this revision.
JDevlieghere added reviewers: labath, vsk, jingham, friss.
Herald added a reviewer: jfb.
Herald added a project: LLDB.
JDevlieghere edited the summary of this revision.
Herald added a subscriber: dexonsmith.

This patch hooks the reproducer infrastructure with the signal handlers.
When lldb crashes with reproducers capture enabled, it will now generate
the reproducer and print a short message the standard out. This doesn't
affect the pretty stack traces, which are still printed before.

This patch also introduces a new reproducer sub-command that
intentionally raises a given signal to test the reproducer signal
handling.

Currently the signal handler is doing too much work. Instead of copying
over files into the reproducers in the signal handler, we should
re-invoke ourselves with a special command line flag that looks at the
VFS mapping and performs the copy.

This is a NO-OP when reproducers are disabled.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D70474

Files:
  lldb/include/lldb/API/SBReproducer.h
  lldb/source/API/SBReproducer.cpp
  lldb/source/Commands/CommandObjectReproducer.cpp
  lldb/source/Commands/Options.td
  lldb/test/Shell/Reproducer/Inputs/GDBRemoteCrashCapture.in
  lldb/test/Shell/Reproducer/TestCrash.test
  lldb/test/Shell/Reproducer/TestGDBRemoteRepro.test
  lldb/tools/driver/Driver.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70474.230179.patch
Type: text/x-patch
Size: 11216 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191120/2ddf0af7/attachment-0001.bin>


More information about the lldb-commits mailing list