[Lldb-commits] [PATCH] Add synchronization to TestWatchLocation.

Chaoren Lin chaorenl at google.com
Thu Feb 26 12:34:01 PST 2015


================
Comment at: test/functionalities/watchpoint/hello_watchlocation/main.cpp:85
@@ -84,2 +84,3 @@
     g_char_ptr = (char *)malloc (1);
     *g_char_ptr = 0;
+    pthread_barrier_init(&barrier, NULL, 4);
----------------
ovyalov wrote:
> ovyalov wrote:
> > My understanding the watchpoint is set for g_char_ptr variable but I don't see any command to set watchpoint - is watchpoint here set implicitly by lldb?
> Very minor unrelated thing - do we need to free this memory?
TestWatchLocation.py breaks on the printf and does "watchpoint set expression -w write -x 1 -- g_char_ptr".

================
Comment at: test/functionalities/watchpoint/hello_watchlocation/main.cpp:85
@@ -84,2 +84,3 @@
     g_char_ptr = (char *)malloc (1);
     *g_char_ptr = 0;
+    pthread_barrier_init(&barrier, NULL, 4);
----------------
chaoren wrote:
> ovyalov wrote:
> > ovyalov wrote:
> > > My understanding the watchpoint is set for g_char_ptr variable but I don't see any command to set watchpoint - is watchpoint here set implicitly by lldb?
> > Very minor unrelated thing - do we need to free this memory?
> TestWatchLocation.py breaks on the printf and does "watchpoint set expression -w write -x 1 -- g_char_ptr".
Yeah, there's a memory leak. I'll fix that too.

http://reviews.llvm.org/D7916

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list