[all-commits] [llvm/llvm-project] 64d9b2: [lldb] Prevent crash when adding a stop hook with ...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Thu Apr 14 11:00:34 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 64d9b233b9905a951b450eff5b258707a35e110f
      https://github.com/llvm/llvm-project/commit/64d9b233b9905a951b450eff5b258707a35e110f
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2022-04-14 (Thu, 14 Apr 2022)

  Changed paths:
    M lldb/source/Symbol/SymbolContext.cpp
    A lldb/test/Shell/Commands/command-stop-hook-no-target.test

  Log Message:
  -----------
  [lldb] Prevent crash when adding a stop hook with --shlib

Currently, lldb crashes when adding a stop hook with --shlib because we
unconditionally use the target in SymbolContextSpecifier::AddSpecification.
This patch prevents the crash and add a test.

rdar://68524781

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


  Commit: 99d9c44434f57df5f188146925eea3bd8771260d
      https://github.com/llvm/llvm-project/commit/99d9c44434f57df5f188146925eea3bd8771260d
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2022-04-14 (Thu, 14 Apr 2022)

  Changed paths:
    M lldb/include/lldb/Core/Module.h
    M lldb/include/lldb/Target/Process.h
    M lldb/source/Core/Module.cpp
    M lldb/source/Target/Process.cpp
    M lldb/test/Shell/Process/Optimization.test
    M lldb/test/Shell/Process/UnsupportedLanguage.test

  Log Message:
  -----------
  [lldb] Port Process::PrintWarning* to use the new diagnostic events

Port the two Process::PrintWarning functions to use the new diagnostic
events through Debugger::ReportWarning. I kept the wrapper function in
the process, but delegated the work to the Module. Consistent with the
current code, the Module ensures the warning is only printed once per
module.

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


Compare: https://github.com/llvm/llvm-project/compare/104e086a4f09...99d9c44434f5


More information about the All-commits mailing list