diff options
| author | Jim Ingham <jingham@apple.com> | 2012-10-23 07:20:06 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2012-10-23 07:20:06 +0000 |
| commit | a7dfb665e31dfcaba37c0680c5057ae478fbdca2 (patch) | |
| tree | 92dddd6d1e2ee021262a14463d18fdc8d730b891 /lldb/source/Target/Target.cpp | |
| parent | 0a08aa91d50a70185e0912e39ebfbde7da632f43 (diff) | |
| download | bcm5719-llvm-a7dfb665e31dfcaba37c0680c5057ae478fbdca2.tar.gz bcm5719-llvm-a7dfb665e31dfcaba37c0680c5057ae478fbdca2.zip | |
Watchpoints remember the type of the expression or variable they were set with, and use
it to print the old and new values.
Temporarily disable the "out of scope" checking since it didn't work correctly, and was
not what people generally expected watchpoints to be doing.
llvm-svn: 166472
Diffstat (limited to 'lldb/source/Target/Target.cpp')
| -rw-r--r-- | lldb/source/Target/Target.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index 330537301af..33d0ffd1618 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -523,12 +523,12 @@ CheckIfWatchpointsExhausted(Target *target, Error &error) // See also Watchpoint::SetWatchpointType(uint32_t type) and // the OptionGroupWatchpoint::WatchType enum type. WatchpointSP -Target::CreateWatchpoint(lldb::addr_t addr, size_t size, uint32_t type, Error &error) +Target::CreateWatchpoint(lldb::addr_t addr, size_t size, const ClangASTType *type, uint32_t kind, Error &error) { LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_WATCHPOINTS)); if (log) log->Printf("Target::%s (addr = 0x%8.8llx size = %llu type = %u)\n", - __FUNCTION__, addr, (uint64_t)size, type); + __FUNCTION__, addr, (uint64_t)size, kind); WatchpointSP wp_sp; if (!ProcessIsValid()) @@ -559,7 +559,7 @@ Target::CreateWatchpoint(lldb::addr_t addr, size_t size, uint32_t type, Error &e (matched_sp->WatchpointRead() ? LLDB_WATCH_TYPE_READ : 0) | (matched_sp->WatchpointWrite() ? LLDB_WATCH_TYPE_WRITE : 0); // Return the existing watchpoint if both size and type match. - if (size == old_size && type == old_type) { + if (size == old_size && kind == old_type) { wp_sp = matched_sp; wp_sp->SetEnabled(false); } else { @@ -570,13 +570,12 @@ Target::CreateWatchpoint(lldb::addr_t addr, size_t size, uint32_t type, Error &e } if (!wp_sp) { - Watchpoint *new_wp = new Watchpoint(addr, size); + Watchpoint *new_wp = new Watchpoint(*this, addr, size, type); if (!new_wp) { printf("Watchpoint ctor failed, out of memory?\n"); return wp_sp; } - new_wp->SetWatchpointType(type); - new_wp->SetTarget(this); + new_wp->SetWatchpointType(kind); wp_sp.reset(new_wp); m_watchpoint_list.Add(wp_sp); } |

