diff options
author | Davide Italiano <davide@freebsd.org> | 2018-12-17 18:21:51 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2018-12-17 18:21:51 +0000 |
commit | aeaf5c719ce66936043f92114cf5852027fac352 (patch) | |
tree | 6a59399001a15660bfa865649608466ba2d9135f /lldb/examples | |
parent | 78cb0defe9ae05207ca6e043ddfb000ee86c6811 (diff) |
Fix lldb's macosx/heap.py cstr command.
<rdar://problem/44432167>
Diffstat (limited to 'lldb/examples')
-rw-r--r-- | lldb/examples/darwin/heap_find/heap.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/examples/darwin/heap_find/heap.py b/lldb/examples/darwin/heap_find/heap.py index 81f36adb9c5..c463380bf49 100644 --- a/lldb/examples/darwin/heap_find/heap.py +++ b/lldb/examples/darwin/heap_find/heap.py @@ -1036,7 +1036,7 @@ range_callback_t range_callback = [](task_t task, void *baton, unsigned type, ui callback_baton_t *lldb_info = (callback_baton_t *)baton; if (lldb_info->cstr_len < ptr_size) { const char *begin = (const char *)ptr_addr; - const char *end = begin + ptr_size - info->cstr_len; + const char *end = begin + ptr_size - lldb_info->cstr_len; for (const char *s = begin; s < end; ++s) { if ((int)memcmp(s, lldb_info->cstr, lldb_info->cstr_len) == 0) { if (lldb_info->num_matches < MAX_MATCHES) { |