Regression

lldb-api.commands/watchpoints/watchpoint_set_command.TestWatchLocationWithWatchSet.py (from lldb-api)

Failing for the past 1 build (Since Failed#2569 )
Took 53 sec.

Stacktrace

lldb version 10.0.99 (http://labmaster3.local/git/llvm-project.git revision 1edb7e0b6f390b066f5218208a7c8ac974ee243c)
  clang revision 17bde36a031a202ce9fe6cc1d134accbba7afb08
  llvm revision 17bde36a031a202ce9fe6cc1d134accbba7afb08
LLDB library dir: /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/bin
LLDB import library dir: /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/bin
libstdcxx tests will not be run because: Don't know how to build with libstdcxx on macosx
Skipping following debug info categories: ['dwo']

Session logs for test failures/errors/unexpected successes will go into directory '/Users/buildslave/jenkins/workspace/lldb-cmake/test/logs'
Command invoked: /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/test/API/dotest.py --arch=x86_64 -s /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/lldb-test-traces -S nm -u CXXFLAGS -u CFLAGS --executable /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./bin/lldb --dsymutil /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./bin/dsymutil --filecheck /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./bin/FileCheck -C /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./bin/clang --codesign-identity lldb_codesign --server /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./bin/debugserver --arch x86_64 --build-dir /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/lldb-test-build.noindex -s=/Users/buildslave/jenkins/workspace/lldb-cmake/test/logs -t --env TERM=vt100 --env LLVM_LIBS_DIR=/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./lib --build-dir /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/lldb-test-build.noindex --lldb-module-cache-dir /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/lldb-test-build.noindex/module-cache-clang/lldb-api /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command -p TestWatchLocationWithWatchSet.py
Change dir to: /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command
runCmd: settings set symbols.enable-external-lookup false
output: 

runCmd: settings set plugin.process.gdb-remote.packet-timeout 60
output: 

runCmd: settings set symbols.clang-modules-cache-path "/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/lldb-test-build.noindex/module-cache-lldb/lldb-api"
output: 

runCmd: settings set use-color false
output: 

runCmd: file /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/lldb-test-build.noindex/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.test_watchlocation_using_watchpoint_set_dsym/a.out
output: Current executable set to '/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/lldb-test-build.noindex/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.test_watchlocation_using_watchpoint_set_dsym/a.out' (x86_64).


runCmd: breakpoint set -l 105
output: Breakpoint 1: where = a.out`main + 391 at main.cpp:105:5, address = 0x0000000100001207


Expecting pattern: ^Breakpoint (?P<bpno>[0-9]+): (?P<num_locations>[0-9]+) locations\.$
Not matched

Expecting pattern: ^Breakpoint (?P<bpno>[0-9]+): (?P<num_locations>no) locations \(pending\)\.
Not matched

Expecting pattern: ^Breakpoint (?P<bpno>[0-9]+): where = (?P<module>.*)`(?P<symbol>[+\-]{0,1}[^+]+)( \+ (?P<offset>[0-9]+)){0,1}( \[inlined\] (?P<inline_symbol>.*)){0,1} at (?P<file>[^:]+):(?P<line_no>[0-9]+)(?P<column>(:[0-9]+)?), address = (?P<address>0x[0-9a-fA-F]+)$
Matched

runCmd: run
output: Process 27097 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x0000000100001207 a.out`main(argc=1, argv=0x00007ffeefbff480) at main.cpp:105:5
   102 	        int c;
   103 	    } MyAggregateDataType;
   104 	
-> 105 	    printf ("Before turning all three threads loose...\n"); // Set break point at this line.
    	    ^
   106 	    barrier_wait();
   107 	
   108 	    // Join all of our threads

Process 27097 launched: '/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/lldb-test-build.noindex/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.test_watchlocation_using_watchpoint_set_dsym/a.out' (x86_64)


runCmd: thread list
output: Process 27097 stopped
* thread #1: tid = 0xb2b147, 0x0000000100001207 a.out`main(argc=1, argv=0x00007ffeefbff480) at main.cpp:105:5, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  thread #2: tid = 0xb2b30d, 0x00007fff7754faa6 libsystem_kernel.dylib`__write_nocancel + 10
  thread #3: tid = 0xb2b30e, 0x00007fff7754e872 libsystem_kernel.dylib`__psynch_mutexwait + 10
  thread #4: tid = 0xb2b30f, 0x00007fff7754e872 libsystem_kernel.dylib`__psynch_mutexwait + 10


Expecting sub string: stopped
Matched

Expecting sub string: stop reason = breakpoint
Matched

runCmd: watchpoint set expression -w write -s 1 -- g_char_ptr + 7
output: Watchpoint created: Watchpoint 1: addr = 0x100500087 size = 1 state = enabled type = w
    new value: 0x0000000000000000


Expecting sub string: Watchpoint created
Matched

Expecting sub string: size = 1
Matched

Expecting sub string: type = w
Matched

runCmd: expr unsigned val = g_char_ptr[7]; val
output: (unsigned int) $1 = 0


looking at: (unsigned int) $1 = 0

Expecting end string:  = 0
Matched

runCmd: watchpoint list -v
output: Number of supported hardware watchpoints: 4
Current watchpoints:
Watchpoint 1: addr = 0x100500087 size = 1 state = enabled type = w
    new value: 0x0000000000000000
    hw_index = -1  hit_count = 0     ignore_count = 0   


Expecting sub string: hit_count = 0
Matched

runCmd: process continue
output: Process 27097 resuming
Process 27097 stopped
* thread #2, stop reason = watchpoint 1
    frame #0: 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1
   33  	    unsigned what = new_val;
   34  	    printf("new value written to array(%p) and index(%u) = %u\n", char_ptr, index, what);
   35  	    char_ptr[index] = new_val;
-> 36  	}
    	^
   37  	
   38  	uint32_t
   39  	access_pool (bool flag = false)
  thread #3, stop reason = watchpoint 1
    frame #0: 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1
   33  	    unsigned what = new_val;
   34  	    printf("new value written to array(%p) and index(%u) = %u\n", char_ptr, index, what);
   35  	    char_ptr[index] = new_val;
-> 36  	}
    	^
   37  	
   38  	uint32_t
   39  	access_pool (bool flag = false)
  thread #4, stop reason = watchpoint 1
    frame #0: 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1
   33  	    unsigned what = new_val;
   34  	    printf("new value written to array(%p) and index(%u) = %u\n", char_ptr, index, what);
   35  	    char_ptr[index] = new_val;
-> 36  	}
    	^
   37  	
   38  	uint32_t
   39  	access_pool (bool flag = false)



runCmd: thread list
output: Process 27097 stopped
  thread #1: tid = 0xb2b147, 0x00007fff7754e36a libsystem_kernel.dylib`__ulock_wait + 10, queue = 'com.apple.main-thread'
* thread #2: tid = 0xb2b30d, 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1, stop reason = watchpoint 1
  thread #3: tid = 0xb2b30e, 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1, stop reason = watchpoint 1
  thread #4: tid = 0xb2b30f, 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1, stop reason = watchpoint 1


Expecting sub string: stopped
Matched

Expecting sub string: stop reason = watchpoint
Matched

Expecting sub string: do_bad_thing_with_location
Matched

runCmd: thread list
output: Process 27097 stopped
  thread #1: tid = 0xb2b147, 0x00007fff7754e36a libsystem_kernel.dylib`__ulock_wait + 10, queue = 'com.apple.main-thread'
* thread #2: tid = 0xb2b30d, 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1, stop reason = watchpoint 1
  thread #3: tid = 0xb2b30e, 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1, stop reason = watchpoint 1
  thread #4: tid = 0xb2b30f, 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1, stop reason = watchpoint 1


runCmd: thread select 2
output: 

runCmd: thread select 3
output: 

runCmd: thread select 4
output: 

runCmd: thread backtrace
output: * thread #4, stop reason = watchpoint 1
  * frame #0: 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1
    frame #1: 0x0000000100000e4e a.out`access_pool(flag=true) at main.cpp:53:9
    frame #2: 0x0000000100000f35 a.out`thread_func(thread_index=2) at main.cpp:80:19
    frame #3: 0x00000001000027c4 a.out`decltype(__f=0x0000000100500258, __args=0x0000000100500260)(unsigned int)>(fp)(std::__1::forward<long>(fp0))) std::__1::__invoke<void (*)(unsigned int), long>(void (*&&)(unsigned int), long&&) at type_traits:3525:1
    frame #4: 0x000000010000270e a.out`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(unsigned int), long, 2ul>(__t=size=3, (null)=__tuple_indices<2> @ 0x000070000d3d4eb8)(unsigned int), long>&, std::__1::__tuple_indices<2ul>) at thread:273:5
    frame #5: 0x0000000100001f16 a.out`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(unsigned int), long> >(__vp=0x0000000100500250) at thread:283:5
    frame #6: 0x00007fff7760533d libsystem_pthread.dylib`_pthread_body + 126
    frame #7: 0x00007fff776082a7 libsystem_pthread.dylib`_pthread_start + 70
    frame #8: 0x00007fff77604425 libsystem_pthread.dylib`thread_start + 13


runCmd: expr unsigned val = g_char_ptr[7]; val
output: (unsigned int) $2 = 99


looking at: (unsigned int) $2 = 99

Expecting end string:  = 99
Matched

runCmd: watchpoint list -v
output: Number of supported hardware watchpoints: 4
Current watchpoints:
Watchpoint 1: addr = 0x100500087 size = 1 state = enabled type = w
    old value: 0x0000000000000063
    new value: 0x0000000000000063
    hw_index = 0  hit_count = 3     ignore_count = 0   


Expecting sub string: hit_count = 3
Matched

runCmd: thread backtrace all
output:   thread #1, queue = 'com.apple.main-thread'
    frame #0: 0x00007fff7754e36a libsystem_kernel.dylib`__ulock_wait + 10
    frame #1: 0x00007fff7760970b libsystem_pthread.dylib`_pthread_join + 356
    frame #2: 0x00007fff74b33978 libc++.1.dylib`std::__1::thread::join() + 24
    frame #3: 0x000000010000127f a.out`main(argc=1, argv=0x00007ffeefbff480) at main.cpp:110:16
    frame #4: 0x00007fff77413085 libdyld.dylib`start + 1
  thread #2, stop reason = watchpoint 1
    frame #0: 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1
    frame #1: 0x0000000100000e4e a.out`access_pool(flag=true) at main.cpp:53:9
    frame #2: 0x0000000100000f35 a.out`thread_func(thread_index=0) at main.cpp:80:19
    frame #3: 0x00000001000027c4 a.out`decltype(__f=0x00000001005001a8, __args=0x00000001005001b0)(unsigned int)>(fp)(std::__1::forward<long>(fp0))) std::__1::__invoke<void (*)(unsigned int), long>(void (*&&)(unsigned int), long&&) at type_traits:3525:1
    frame #4: 0x000000010000270e a.out`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(unsigned int), long, 2ul>(__t=size=3, (null)=__tuple_indices<2> @ 0x000070000d2ceeb8)(unsigned int), long>&, std::__1::__tuple_indices<2ul>) at thread:273:5
    frame #5: 0x0000000100001f16 a.out`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(unsigned int), long> >(__vp=0x00000001005001a0) at thread:283:5
    frame #6: 0x00007fff7760533d libsystem_pthread.dylib`_pthread_body + 126
    frame #7: 0x00007fff776082a7 libsystem_pthread.dylib`_pthread_start + 70
    frame #8: 0x00007fff77604425 libsystem_pthread.dylib`thread_start + 13
  thread #3, stop reason = watchpoint 1
    frame #0: 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1
    frame #1: 0x0000000100000e4e a.out`access_pool(flag=true) at main.cpp:53:9
    frame #2: 0x0000000100000f35 a.out`thread_func(thread_index=1) at main.cpp:80:19
    frame #3: 0x00000001000027c4 a.out`decltype(__f=0x00000001005001f8, __args=0x0000000100500200)(unsigned int)>(fp)(std::__1::forward<long>(fp0))) std::__1::__invoke<void (*)(unsigned int), long>(void (*&&)(unsigned int), long&&) at type_traits:3525:1
    frame #4: 0x000000010000270e a.out`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(unsigned int), long, 2ul>(__t=size=3, (null)=__tuple_indices<2> @ 0x000070000d351eb8)(unsigned int), long>&, std::__1::__tuple_indices<2ul>) at thread:273:5
    frame #5: 0x0000000100001f16 a.out`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(unsigned int), long> >(__vp=0x00000001005001f0) at thread:283:5
    frame #6: 0x00007fff7760533d libsystem_pthread.dylib`_pthread_body + 126
    frame #7: 0x00007fff776082a7 libsystem_pthread.dylib`_pthread_start + 70
    frame #8: 0x00007fff77604425 libsystem_pthread.dylib`thread_start + 13
* thread #4, stop reason = watchpoint 1
  * frame #0: 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1
    frame #1: 0x0000000100000e4e a.out`access_pool(flag=true) at main.cpp:53:9
    frame #2: 0x0000000100000f35 a.out`thread_func(thread_index=2) at main.cpp:80:19
    frame #3: 0x00000001000027c4 a.out`decltype(__f=0x0000000100500258, __args=0x0000000100500260)(unsigned int)>(fp)(std::__1::forward<long>(fp0))) std::__1::__invoke<void (*)(unsigned int), long>(void (*&&)(unsigned int), long&&) at type_traits:3525:1
    frame #4: 0x000000010000270e a.out`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(unsigned int), long, 2ul>(__t=size=3, (null)=__tuple_indices<2> @ 0x000070000d3d4eb8)(unsigned int), long>&, std::__1::__tuple_indices<2ul>) at thread:273:5
    frame #5: 0x0000000100001f16 a.out`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(unsigned int), long> >(__vp=0x0000000100500250) at thread:283:5
    frame #6: 0x00007fff7760533d libsystem_pthread.dylib`_pthread_body + 126
    frame #7: 0x00007fff776082a7 libsystem_pthread.dylib`_pthread_start + 70
    frame #8: 0x00007fff77604425 libsystem_pthread.dylib`thread_start + 13


<bound method SBProcess.Kill of <lldb.SBProcess; proxy of <Swig Object of type 'lldb::SBProcess *' at 0x132d46960> >>: success

PASS: LLDB (/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/bin/clang-10-x86_64) :: test_watchlocation_using_watchpoint_set_dsym (TestWatchLocationWithWatchSet.WatchLocationUsingWatchpointSetTestCase)
runCmd: settings set symbols.enable-external-lookup false
output: 

runCmd: settings set plugin.process.gdb-remote.packet-timeout 60
output: 

runCmd: settings set symbols.clang-modules-cache-path "/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/lldb-test-build.noindex/module-cache-lldb/lldb-api"
output: 

runCmd: settings set use-color false
output: 

runCmd: file /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/lldb-test-build.noindex/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.test_watchlocation_using_watchpoint_set_dwarf/a.out
output: Current executable set to '/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/lldb-test-build.noindex/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.test_watchlocation_using_watchpoint_set_dwarf/a.out' (x86_64).


runCmd: breakpoint set -l 105
output: Breakpoint 1: where = a.out`main + 391 at main.cpp:105:5, address = 0x0000000100001207


Expecting pattern: ^Breakpoint (?P<bpno>[0-9]+): (?P<num_locations>[0-9]+) locations\.$
Not matched

Expecting pattern: ^Breakpoint (?P<bpno>[0-9]+): (?P<num_locations>no) locations \(pending\)\.
Not matched

Expecting pattern: ^Breakpoint (?P<bpno>[0-9]+): where = (?P<module>.*)`(?P<symbol>[+\-]{0,1}[^+]+)( \+ (?P<offset>[0-9]+)){0,1}( \[inlined\] (?P<inline_symbol>.*)){0,1} at (?P<file>[^:]+):(?P<line_no>[0-9]+)(?P<column>(:[0-9]+)?), address = (?P<address>0x[0-9a-fA-F]+)$
Matched

runCmd: run
output: Process 33166 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x0000000100001207 a.out`main(argc=1, argv=0x00007ffeefbff480) at main.cpp:105:5
   102 	        int c;
   103 	    } MyAggregateDataType;
   104 	
-> 105 	    printf ("Before turning all three threads loose...\n"); // Set break point at this line.
    	    ^
   106 	    barrier_wait();
   107 	
   108 	    // Join all of our threads

Process 33166 launched: '/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/lldb-test-build.noindex/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.test_watchlocation_using_watchpoint_set_dwarf/a.out' (x86_64)


runCmd: thread list
output: Process 33166 stopped
* thread #1: tid = 0xb2dafc, 0x0000000100001207 a.out`main(argc=1, argv=0x00007ffeefbff480) at main.cpp:105:5, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  thread #2: tid = 0xb2dc3e, 0x00007fff7749cb58 libsystem_c.dylib`__sfvwrite + 615
  thread #3: tid = 0xb2dc3f, 0x00007fff7754e872 libsystem_kernel.dylib`__psynch_mutexwait + 10
  thread #4: tid = 0xb2dc40, 0x00007fff7754e872 libsystem_kernel.dylib`__psynch_mutexwait + 10


Expecting sub string: stopped
Matched

Expecting sub string: stop reason = breakpoint
Matched

runCmd: watchpoint set expression -w write -s 1 -- g_char_ptr + 7
output: Watchpoint created: Watchpoint 1: addr = 0x100300057 size = 1 state = enabled type = w
    new value: 0x0000000000000000


Expecting sub string: Watchpoint created
Matched

Expecting sub string: size = 1
Matched

Expecting sub string: type = w
Matched

runCmd: expr unsigned val = g_char_ptr[7]; val
output: (unsigned int) $1 = 0


looking at: (unsigned int) $1 = 0

Expecting end string:  = 0
Matched

runCmd: watchpoint list -v
output: Number of supported hardware watchpoints: 4
Current watchpoints:
Watchpoint 1: addr = 0x100300057 size = 1 state = enabled type = w
    new value: 0x0000000000000000
    hw_index = -1  hit_count = 0     ignore_count = 0   


Expecting sub string: hit_count = 0
Matched

runCmd: process continue
output: Process 33166 resuming
Process 33166 stopped
* thread #2, stop reason = watchpoint 1
    frame #0: 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1
   33  	    unsigned what = new_val;
   34  	    printf("new value written to array(%p) and index(%u) = %u\n", char_ptr, index, what);
   35  	    char_ptr[index] = new_val;
-> 36  	}
    	^
   37  	
   38  	uint32_t
   39  	access_pool (bool flag = false)
  thread #3, stop reason = watchpoint 1
    frame #0: 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1
   33  	    unsigned what = new_val;
   34  	    printf("new value written to array(%p) and index(%u) = %u\n", char_ptr, index, what);
   35  	    char_ptr[index] = new_val;
-> 36  	}
    	^
   37  	
   38  	uint32_t
   39  	access_pool (bool flag = false)



runCmd: thread list
output: Process 33166 stopped
  thread #1: tid = 0xb2dafc, 0x00007fff7754e36a libsystem_kernel.dylib`__ulock_wait + 10, queue = 'com.apple.main-thread'
* thread #2: tid = 0xb2dc3e, 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1, stop reason = watchpoint 1
  thread #3: tid = 0xb2dc3f, 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1, stop reason = watchpoint 1
  thread #4: tid = 0xb2dc40, 0x00007fff7754faa6 libsystem_kernel.dylib`__write_nocancel + 10


Expecting sub string: stopped
Matched

Expecting sub string: stop reason = watchpoint
Matched

Expecting sub string: do_bad_thing_with_location
Matched

runCmd: thread list
output: Process 33166 stopped
  thread #1: tid = 0xb2dafc, 0x00007fff7754e36a libsystem_kernel.dylib`__ulock_wait + 10, queue = 'com.apple.main-thread'
* thread #2: tid = 0xb2dc3e, 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1, stop reason = watchpoint 1
  thread #3: tid = 0xb2dc3f, 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1, stop reason = watchpoint 1
  thread #4: tid = 0xb2dc40, 0x00007fff7754faa6 libsystem_kernel.dylib`__write_nocancel + 10


runCmd: thread select 2
output: 

runCmd: thread select 3
output: 

runCmd: thread backtrace
output: * thread #3, stop reason = watchpoint 1
  * frame #0: 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1
    frame #1: 0x0000000100000e4e a.out`access_pool(flag=true) at main.cpp:53:9
    frame #2: 0x0000000100000f35 a.out`thread_func(thread_index=1) at main.cpp:80:19
    frame #3: 0x00000001000027c4 a.out`decltype(__f=0x0000000100300248, __args=0x0000000100300250)(unsigned int)>(fp)(std::__1::forward<long>(fp0))) std::__1::__invoke<void (*)(unsigned int), long>(void (*&&)(unsigned int), long&&) at type_traits:3525:1
    frame #4: 0x000000010000270e a.out`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(unsigned int), long, 2ul>(__t=size=3, (null)=__tuple_indices<2> @ 0x00007000068d2eb8)(unsigned int), long>&, std::__1::__tuple_indices<2ul>) at thread:273:5
    frame #5: 0x0000000100001f16 a.out`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(unsigned int), long> >(__vp=0x0000000100300240) at thread:283:5
    frame #6: 0x00007fff7760533d libsystem_pthread.dylib`_pthread_body + 126
    frame #7: 0x00007fff776082a7 libsystem_pthread.dylib`_pthread_start + 70
    frame #8: 0x00007fff77604425 libsystem_pthread.dylib`thread_start + 13


runCmd: expr unsigned val = g_char_ptr[7]; val
output: (unsigned int) $2 = 99


looking at: (unsigned int) $2 = 99

Expecting end string:  = 99
Matched

runCmd: watchpoint list -v
output: Number of supported hardware watchpoints: 4
Current watchpoints:
Watchpoint 1: addr = 0x100300057 size = 1 state = enabled type = w
    old value: 0x0000000000000063
    new value: 0x0000000000000063
    hw_index = 0  hit_count = 2     ignore_count = 0   


Expecting sub string: hit_count = 2
Matched

runCmd: thread backtrace all
output:   thread #1, queue = 'com.apple.main-thread'
    frame #0: 0x00007fff7754e36a libsystem_kernel.dylib`__ulock_wait + 10
    frame #1: 0x00007fff7760970b libsystem_pthread.dylib`_pthread_join + 356
    frame #2: 0x00007fff74b33978 libc++.1.dylib`std::__1::thread::join() + 24
    frame #3: 0x000000010000127f a.out`main(argc=1, argv=0x00007ffeefbff480) at main.cpp:110:16
    frame #4: 0x00007fff77413085 libdyld.dylib`start + 1
  thread #2, stop reason = watchpoint 1
    frame #0: 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1
    frame #1: 0x0000000100000e4e a.out`access_pool(flag=true) at main.cpp:53:9
    frame #2: 0x0000000100000f35 a.out`thread_func(thread_index=0) at main.cpp:80:19
    frame #3: 0x00000001000027c4 a.out`decltype(__f=0x00000001003001f8, __args=0x0000000100300200)(unsigned int)>(fp)(std::__1::forward<long>(fp0))) std::__1::__invoke<void (*)(unsigned int), long>(void (*&&)(unsigned int), long&&) at type_traits:3525:1
    frame #4: 0x000000010000270e a.out`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(unsigned int), long, 2ul>(__t=size=3, (null)=__tuple_indices<2> @ 0x000070000684feb8)(unsigned int), long>&, std::__1::__tuple_indices<2ul>) at thread:273:5
    frame #5: 0x0000000100001f16 a.out`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(unsigned int), long> >(__vp=0x00000001003001f0) at thread:283:5
    frame #6: 0x00007fff7760533d libsystem_pthread.dylib`_pthread_body + 126
    frame #7: 0x00007fff776082a7 libsystem_pthread.dylib`_pthread_start + 70
    frame #8: 0x00007fff77604425 libsystem_pthread.dylib`thread_start + 13
* thread #3, stop reason = watchpoint 1
  * frame #0: 0x0000000100000d92 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:36:1
    frame #1: 0x0000000100000e4e a.out`access_pool(flag=true) at main.cpp:53:9
    frame #2: 0x0000000100000f35 a.out`thread_func(thread_index=1) at main.cpp:80:19
    frame #3: 0x00000001000027c4 a.out`decltype(__f=0x0000000100300248, __args=0x0000000100300250)(unsigned int)>(fp)(std::__1::forward<long>(fp0))) std::__1::__invoke<void (*)(unsigned int), long>(void (*&&)(unsigned int), long&&) at type_traits:3525:1
    frame #4: 0x000000010000270e a.out`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(unsigned int), long, 2ul>(__t=size=3, (null)=__tuple_indices<2> @ 0x00007000068d2eb8)(unsigned int), long>&, std::__1::__tuple_indices<2ul>) at thread:273:5
    frame #5: 0x0000000100001f16 a.out`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(unsigned int), long> >(__vp=0x0000000100300240) at thread:283:5
    frame #6: 0x00007fff7760533d libsystem_pthread.dylib`_pthread_body + 126
    frame #7: 0x00007fff776082a7 libsystem_pthread.dylib`_pthread_start + 70
    frame #8: 0x00007fff77604425 libsystem_pthread.dylib`thread_start + 13
  thread #4
    frame #0: 0x00007fff7754faa6 libsystem_kernel.dylib`__write_nocancel + 10
    frame #1: 0x00007fff774a1920 libsystem_c.dylib`_swrite + 87
    frame #2: 0x00007fff7749a4e3 libsystem_c.dylib`__sflush + 87
    frame #3: 0x00007fff7749cc0f libsystem_c.dylib`__sfvwrite + 798
    frame #4: 0x00007fff774a6a3a libsystem_c.dylib`__vfprintf + 16604
    frame #5: 0x00007fff774cb13b libsystem_c.dylib`__v2printf + 475
    frame #6: 0x00007fff774a2882 libsystem_c.dylib`vfprintf_l + 54
    frame #7: 0x00007fff774a099a libsystem_c.dylib`printf + 174
    frame #8: 0x0000000100000d81 a.out`do_bad_thing_with_location(index=7, char_ptr="", new_val='c') at main.cpp:34:5
    frame #9: 0x0000000100000e4e a.out`access_pool(flag=true) at main.cpp:53:9
    frame #10: 0x0000000100000f35 a.out`thread_func(thread_index=2) at main.cpp:80:19
    frame #11: 0x00000001000027c4 a.out`decltype(__f=0x00000001003002a8, __args=0x00000001003002b0)(unsigned int)>(fp)(std::__1::forward<long>(fp0))) std::__1::__invoke<void (*)(unsigned int), long>(void (*&&)(unsigned int), long&&) at type_traits:3525:1
    frame #12: 0x000000010000270e a.out`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(unsigned int), long, 2ul>(__t=size=3, (null)=__tuple_indices<2> @ 0x0000700006955eb8)(unsigned int), long>&, std::__1::__tuple_indices<2ul>) at thread:273:5
    frame #13: 0x0000000100001f16 a.out`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(unsigned int), long> >(__vp=0x00000001003002a0) at thread:283:5
    frame #14: 0x00007fff7760533d libsystem_pthread.dylib`_pthread_body + 126
    frame #15: 0x00007fff776082a7 libsystem_pthread.dylib`_pthread_start + 70
    frame #16: 0x00007fff77604425 libsystem_pthread.dylib`thread_start + 13


<bound method SBProcess.Kill of <lldb.SBProcess; proxy of <Swig Object of type 'lldb::SBProcess *' at 0x106f16180> >>: success

PASS: LLDB (/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/bin/clang-10-x86_64) :: test_watchlocation_using_watchpoint_set_dwarf (TestWatchLocationWithWatchSet.WatchLocationUsingWatchpointSetTestCase)
UNSUPPORTED: LLDB (/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/bin/clang-10-x86_64) :: test_watchlocation_using_watchpoint_set_dwo (TestWatchLocationWithWatchSet.WatchLocationUsingWatchpointSetTestCase) (test case does not fall in any category of interest for this run) 
runCmd: settings set symbols.enable-external-lookup false
output: 

runCmd: settings set plugin.process.gdb-remote.packet-timeout 60
output: 

runCmd: settings set symbols.clang-modules-cache-path "/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/lldb-test-build.noindex/module-cache-lldb/lldb-api"
output: 

runCmd: settings set use-color false
output: 

runCmd: file /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/lldb-test-build.noindex/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.test_watchlocation_using_watchpoint_set_gmodules/a.out
output: Current executable set to '/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/lldb-test-build.noindex/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.test_watchlocation_using_watchpoint_set_gmodules/a.out' (x86_64).


runCmd: breakpoint set -l 105
output: Breakpoint 1: where = a.out`main + 391 at main.cpp:105:5, address = 0x0000000100001207


Expecting pattern: ^Breakpoint (?P<bpno>[0-9]+): (?P<num_locations>[0-9]+) locations\.$
Not matched

Expecting pattern: ^Breakpoint (?P<bpno>[0-9]+): (?P<num_locations>no) locations \(pending\)\.
Not matched

Expecting pattern: ^Breakpoint (?P<bpno>[0-9]+): where = (?P<module>.*)`(?P<symbol>[+\-]{0,1}[^+]+)( \+ (?P<offset>[0-9]+)){0,1}( \[inlined\] (?P<inline_symbol>.*)){0,1} at (?P<file>[^:]+):(?P<line_no>[0-9]+)(?P<column>(:[0-9]+)?), address = (?P<address>0x[0-9a-fA-F]+)$
Matched

runCmd: run
output: Process 38642 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x0000000100001207 a.out`main(argc=1, argv=0x00007ffeefbff478) at main.cpp:105:5
   102 	        int c;
   103 	    } MyAggregateDataType;
   104 	
-> 105 	    printf ("Before turning all three threads loose...\n"); // Set break point at this line.
    	    ^
   106 	    barrier_wait();
   107 	
   108 	    // Join all of our threads

Process 38642 launched: '/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/lldb-test-build.noindex/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.test_watchlocation_using_watchpoint_set_gmodules/a.out' (x86_64)


runCmd: thread list
output: Process 38642 stopped
* thread #1: tid = 0xb30057, 0x0000000100001207 a.out`main(argc=1, argv=0x00007ffeefbff478) at main.cpp:105:5, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  thread #2: tid = 0xb301bf, 0x00007fff774920ff libsystem_c.dylib`localeconv_l + 89
  thread #3: tid = 0xb301c0, 0x00007fff7754e872 libsystem_kernel.dylib`__psynch_mutexwait + 10
  thread #4: tid = 0xb301c1, 0x00007fff7754e872 libsystem_kernel.dylib`__psynch_mutexwait + 10


Expecting sub string: stopped
Matched

Expecting sub string: stop reason = breakpoint
Matched

runCmd: watchpoint set expression -w write -s 1 -- g_char_ptr + 7
runCmd failed!
error: expression evaluation of address to watch failed
expression evaluated: 
g_char_ptr + 7


FAIL: LLDB (/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/bin/clang-10-x86_64) :: test_watchlocation_using_watchpoint_set_gmodules (TestWatchLocationWithWatchSet.WatchLocationUsingWatchpointSetTestCase)
<bound method SBProcess.Kill of <lldb.SBProcess; proxy of <Swig Object of type 'lldb::SBProcess *' at 0x132d46960> >>: success

Restore dir to: /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/test
======================================================================
FAIL: test_watchlocation_using_watchpoint_set_gmodules (TestWatchLocationWithWatchSet.WatchLocationUsingWatchpointSetTestCase)
   Test watching a location with 'watchpoint set expression -w write -s size' option.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1748, in test_method
    return attrvalue(self)
  File "/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py", line 111, in wrapper
    func(*args, **kwargs)
  File "/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py", line 111, in wrapper
    func(*args, **kwargs)
  File "/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.py", line 69, in test_watchlocation_using_watchpoint_set
    'type = w'])
  File "/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 2309, in expect
    inHistory=inHistory)
  File "/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 2068, in runCmd
    msg if (msg) else CMD_MSG(cmd))
AssertionError: False is not True : Watchpoint created successfully
Error output:
error: expression evaluation of address to watch failed
expression evaluated: 
g_char_ptr + 7

Config=x86_64-/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/bin/clang-10
----------------------------------------------------------------------
Ran 4 tests in 52.346s

RESULT: FAILED (2 passes, 1 failures, 0 errors, 1 skipped, 0 expected failures, 0 unexpected successes)