diff options
| author | Mohit K. Bhakkad <mohit.bhakkad@gmail.com> | 2015-10-09 15:13:20 +0000 |
|---|---|---|
| committer | Mohit K. Bhakkad <mohit.bhakkad@gmail.com> | 2015-10-09 15:13:20 +0000 |
| commit | 18af8a20c554a4a5cfe90e1c301c6b509cc3e844 (patch) | |
| tree | bcd9f2926bd98eca70f804c13803bb83edc5d7e5 /lldb/source | |
| parent | 5df85cebfb7f1d53b3d76ca4b0b9161e14a136e7 (diff) | |
| download | bcm5719-llvm-18af8a20c554a4a5cfe90e1c301c6b509cc3e844.tar.gz bcm5719-llvm-18af8a20c554a4a5cfe90e1c301c6b509cc3e844.zip | |
[LLDB] Fix display of value of a vector variables in watchpoint operations
Reviewers: clayborg, zturner.
Subscribers: jaydeep, bhushan, sagar, nitesh.jain, brucem,lldb-commits.
Differential Revision: http://reviews.llvm.org/D13202
llvm-svn: 249838
Diffstat (limited to 'lldb/source')
| -rw-r--r-- | lldb/source/Breakpoint/Watchpoint.cpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/lldb/source/Breakpoint/Watchpoint.cpp b/lldb/source/Breakpoint/Watchpoint.cpp index 41b24fd67df..f1cb679c61d 100644 --- a/lldb/source/Breakpoint/Watchpoint.cpp +++ b/lldb/source/Breakpoint/Watchpoint.cpp @@ -218,14 +218,31 @@ Watchpoint::DumpSnapshots(Stream *s, const char *prefix) const s->Printf("\nWatchpoint %u hit:", GetID()); prefix = ""; } - + if (m_old_value_sp) { - s->Printf("\n%sold value: %s", prefix, m_old_value_sp->GetValueAsCString()); + const char *old_value_cstr = m_old_value_sp->GetValueAsCString(); + if (old_value_cstr && old_value_cstr[0]) + s->Printf("\n%sold value: %s", prefix, old_value_cstr); + else + { + const char *old_summary_cstr = m_old_value_sp-> GetSummaryAsCString(); + if (old_summary_cstr && old_summary_cstr[0]) + s->Printf("\n%sold value: %s", prefix, old_summary_cstr); + } } + if (m_new_value_sp) { - s->Printf("\n%snew value: %s", prefix, m_new_value_sp->GetValueAsCString()); + const char *new_value_cstr = m_new_value_sp->GetValueAsCString(); + if (new_value_cstr && new_value_cstr[0]) + s->Printf("\n%snew value: %s", prefix, new_value_cstr); + else + { + const char *new_summary_cstr = m_new_value_sp-> GetSummaryAsCString(); + if (new_summary_cstr && new_summary_cstr[0]) + s->Printf("\n%snew value: %s", prefix, new_summary_cstr); + } } } |

