Get the address and the size of the variable for passing to the Target::CreateWatchpointLocation() method.

llvm-svn: 139614
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index 78f16bf..7b6dcf7 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -333,7 +333,12 @@
 Target::CreateWatchpointLocation(lldb::addr_t addr, size_t size, uint32_t type)
 {
     WatchpointLocationSP wp_loc_sp;
-    if (addr == LLDB_INVALID_ADDRESS || size == 0 || GetProcessSP())
+    bool process_is_valid = m_process_sp && m_process_sp->IsAlive();
+    if (!process_is_valid)
+        return wp_loc_sp;
+    if (addr == LLDB_INVALID_ADDRESS)
+        return wp_loc_sp;
+    if (size == 0)
         return wp_loc_sp;
 
     // FIXME: Add implmenetation.