diff options
author | Peter Zhu <[email protected]> | 2021-08-26 10:06:32 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2021-10-25 13:26:23 -0400 |
commit | a5b6598192c30187b19b892af3110a46f6a70d76 () | |
tree | 4620f69a10659deb6f278b36c10ec7915194573e /misc/lldb_cruby.py | |
parent | 6374be5a8188ff5ed2c70b9f1d76672c87a0eda7 (diff) |
[Feature #18239] Implement VWA for strings
This commit adds support for embedded strings with variable capacity and uses Variable Width Allocation to allocate strings.
Notes: Merged: https://.com/ruby/ruby/pull/4933
-rwxr-xr-x | misc/lldb_cruby.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -190,6 +190,8 @@ def string2cstr(rstring): cptr = int(rstring.GetValueForExpressionPath(".as.heap.ptr").value, 0) clen = int(rstring.GetValueForExpressionPath(".as.heap.len").value, 0) else: cptr = int(rstring.GetValueForExpressionPath(".as.ary").location, 0) clen = (flags & RSTRING_EMBED_LEN_MASK) >> RSTRING_EMBED_LEN_SHIFT return cptr, clen @@ -315,7 +317,6 @@ def lldb_inspect(debugger, target, result, val): else: len = val.GetValueForExpressionPath("->as.heap.len").GetValueAsSigned() ptr = val.GetValueForExpressionPath("->as.heap.ptr") - #print(val.GetValueForExpressionPath("->as.heap"), file=result) result.write("T_ARRAY: %slen=%d" % (flaginfo, len)) if flags & RUBY_FL_USER1: result.write(" (embed)") |