ruby-changes:60908
From: Nobuyoshi <ko1@a...>
Date: Sun, 26 Apr 2020 12:53:41 +0900 (JST)
Subject: [ruby-changes:60908] b5174beae6 (master): lldb_cruby.py: fixed empty string dump [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=b5174beae6 From b5174beae6e02b109ed2c5d5ad9c4653596236e4 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 26 Apr 2020 12:28:56 +0900 Subject: lldb_cruby.py: fixed empty string dump [ci skip] diff --git a/misc/lldb_cruby.py b/misc/lldb_cruby.py index a582b7d..8876581 100755 --- a/misc/lldb_cruby.py +++ b/misc/lldb_cruby.py @@ -132,7 +132,10 @@ def lldb_inspect(debugger, target, result, val): https://github.com/ruby/ruby/blob/trunk/misc/lldb_cruby.py#L132 result.write('T_STRING: %s' % flaginfo) tRString = target.FindFirstType("struct RString").GetPointerType() ptr, len = string2cstr(val.Cast(tRString)) - append_command_output(debugger, "print *(const char (*)[%d])%0#x" % (len, ptr), result) + if len == 0: + result.write("(empty)\n") + else: + append_command_output(debugger, "print *(const char (*)[%d])%0#x" % (len, ptr), result) elif flType == RUBY_T_SYMBOL: result.write('T_SYMBOL: %s' % flaginfo) tRSymbol = target.FindFirstType("struct RSymbol").GetPointerType() -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/