[all-commits] [llvm/llvm-project] c8dfe9: [Reproducer] Generate LLDB reproducer on crash

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Wed Nov 20 13:14:23 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c8dfe907299e16aeb17175cb0896c17043fc7c81
      https://github.com/llvm/llvm-project/commit/c8dfe907299e16aeb17175cb0896c17043fc7c81
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

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

  Log Message:
  -----------
  [Reproducer] Generate LLDB reproducer on crash

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.

Differential revision: https://reviews.llvm.org/D70474




More information about the All-commits mailing list