File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed
test/Shell/ExecControl/StopHook Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -3992,6 +3992,7 @@ void Target::StopHook::GetDescription(Stream &s,
39923992 s.SetIndentLevel (indent_level + 2 );
39933993 }
39943994 GetSubclassDescription (s, level);
3995+ s.SetIndentLevel (indent_level);
39953996}
39963997
39973998void Target::StopHookCommandLine::GetSubclassDescription (
@@ -4002,7 +4003,7 @@ void Target::StopHookCommandLine::GetSubclassDescription(
40024003 s.PutCString (m_commands.GetStringAtIndex (0 ));
40034004 return ;
40044005 }
4005- s.Indent (" Commands: \n " );
4006+ s.Indent (" Commands:\n " );
40064007 s.SetIndentLevel (s.GetIndentLevel () + 4 );
40074008 uint32_t num_commands = m_commands.GetSize ();
40084009 for (uint32_t i = 0 ; i < num_commands; i++) {
Original file line number Diff line number Diff line change 1+ # Test format (e.g., indentation) when printing the list of stop hooks.
2+ #
3+ # RUN: %lldb -b -s %s | FileCheck %s --match-full-lines --strict-whitespace
4+
5+ # Create some stop hooks
6+ target stop-hook add -o 'print "Hello"' --auto-continue true --at-initial-stop true
7+ target stop-hook add -o 'print "world,"' -o 'print "nice"' --file 'my_file'
8+ target stop-hook add -o 'print "weather!"' --classname 'MyClass' --thread-name 'my_thread'
9+
10+ # Print hooks
11+ target stop-hook list
12+
13+ # CHECK:(lldb) target stop-hook list
14+ # CHECK:Hook: 1
15+ # CHECK: State: enabled
16+ # CHECK: AutoContinue on
17+ # CHECK: Commands:
18+ # CHECK: print "Hello"
19+ # CHECK-EMPTY:
20+ # CHECK:Hook: 2
21+ # CHECK: State: enabled
22+ # CHECK: Specifier:
23+ # CHECK: File: my_file.
24+ # CHECK: Commands:
25+ # CHECK: print "world,"
26+ # CHECK: print "nice"
27+ # CHECK-EMPTY:
28+ # CHECK:Hook: 3
29+ # CHECK: State: enabled
30+ # CHECK: Specifier:
31+ # CHECK: Class name: MyClass.
32+ # CHECK: Thread:
33+ # CHECK: thread name: "my_thread"
34+ # CHECK: Commands:
35+ # CHECK: print "weather!"
36+ # CHECK-EMPTY:
You can’t perform that action at this time.
0 commit comments