mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ci-skip][Feature #18910][lldb] New directory structure
Push the newly refactored lldb files into a sub-directory so that we're not cluttering up the misc directory
This commit is contained in:
parent
a4ef2f1672
commit
b26aec9daa
Notes:
git
2022-08-19 02:26:11 +09:00
6 changed files with 11 additions and 6 deletions
14
misc/lldb_rb/commands/rclass_ext_command.py
Normal file
14
misc/lldb_rb/commands/rclass_ext_command.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
from lldb_rb.rb_base_command import RbBaseCommand
|
||||
|
||||
class RclassExtCommand(RbBaseCommand):
|
||||
program = "rclass_ext"
|
||||
help_string = "retrieves and prints the rb_classext_struct for the VALUE pointer passed in"
|
||||
|
||||
def call(self, debugger, command, exe_ctx, result):
|
||||
uintptr_t = self.target.FindFirstType("uintptr_t")
|
||||
rclass_t = self.target.FindFirstType("struct RClass")
|
||||
rclass_ext_t = self.target.FindFirstType("rb_classext_t")
|
||||
|
||||
rclass_addr = self.target.EvaluateExpression(command).Cast(uintptr_t)
|
||||
rclass_ext_addr = (rclass_addr.GetValueAsUnsigned() + rclass_t.GetByteSize())
|
||||
debugger.HandleCommand("p *(rb_classext_t *)%0#x" % rclass_ext_addr)
|
Loading…
Add table
Add a link
Reference in a new issue