Files
clang-p2996/lldb/test/Shell/Commands/command-wrong-subcommand-error-msg.test
Vy Nguyen 4d78881406 [LLDB]Provide clearer error message for invalid commands. (#111891)
Sometimes users (esp. gdb-longtime users) accidentally use GDB syntax,
such as `breakpoint foo`, and they would get an error message from LLDB
saying simply `Invalid command "breakpoint foo"`, which is not very
helpful.

This change provides additional suggestions to help correcting the
mistake.
2024-10-15 10:14:48 -04:00

8 lines
633 B
Plaintext

# UNSUPPORTED: system-windows
#
# RUN: %clang_host -g -O0 %S/Inputs/main.c -o %t.out
# RUN: not %lldb -b -o 'breakpoint foo' %t.out -o exit 2>&1 | FileCheck %s --check-prefix BP-MSG
# RUN: not %lldb -b -o 'watchpoint set foo' %t.out -o exit 2>&1 | FileCheck %s --check-prefix WP-MSG
# CHECK: at main.c:2:21
# BP-MSG: "foo" is not a valid subcommand of "breakpoint". Valid subcommands are: clear, command, delete, disable, enable, and others. Use "help breakpoint" to find out more.
# WP-MSG: "foo" is not a valid subcommand of "watchpoint set". Valid subcommands are: expression, variable. Use "help watchpoint set" to find out more.