Files
clang-p2996/lldb/test/Shell/Commands/command-stop-hook-no-target.test
Jonas Devlieghere 64d9b233b9 [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
2022-04-14 11:00:21 -07:00

5 lines
230 B
Plaintext

# RUN: %clang_host -g %S/Inputs/main.c -o %t
# RUN: %lldb -b -o 'target stop-hook add --name test --shlib test -o "p 95000 + 126"' -o 'file %t' -o 'b main' -o 'r' 2>&1 | FileCheck %s
# CHECK: Stop hook #1 added
# CHECK-NOT: 95126