aboutsummaryrefslogtreecommitdiffstats
path: root/misc/lldb_cruby.py
Commit message (Collapse)AuthorAgeFilesLines
* Mostly recover a Ruby stack trace from a core fileAaron Patterson2020-10-141-0/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the lldb script so it can mostly recover a Ruby stack trace from a core file. It's still missing line numbers and dealing with CFUNCs, but you use it like this: ``` (lldb) rbbt ec rb_control_frame_t TYPE 0x7f6fd6555fa0 EVAL ./bootstraptest/runner.rb error!! 0x7f6fd6555f68 METHOD ./bootstraptest/runner.rb main 0x7f6fd6555f30 METHOD ./bootstraptest/runner.rb in_temporary_working_directory 0x7f6fd6555ef8 METHOD /home/aaron/git/ruby/lib/tmpdir.rb mktmpdir 0x7f6fd6555ec0 BLOCK ./bootstraptest/runner.rb block in in_temporary_working_directory 0x7f6fd6555e88 CFUNC 0x7f6fd6555e50 BLOCK ./bootstraptest/runner.rb block (2 levels) in in_temporary_working_directory 0x7f6fd6555e18 BLOCK ./bootstraptest/runner.rb block in main 0x7f6fd6555de0 METHOD ./bootstraptest/runner.rb exec_test 0x7f6fd6555da8 CFUNC 0x7f6fd6555d70 BLOCK ./bootstraptest/runner.rb block in exec_test 0x7f6fd6555d38 CFUNC 0x7f6fd6555d00 TOP /home/aaron/git/ruby/bootstraptest/test_insns.rb error!! 0x7f6fd6555cc8 CFUNC 0x7f6fd6555c90 BLOCK /home/aaron/git/ruby/bootstraptest/test_insns.rb block in <top (required)> 0x7f6fd6555c58 METHOD ./bootstraptest/runner.rb assert_equal 0x7f6fd6555c20 METHOD ./bootstraptest/runner.rb assert_check 0x7f6fd6555be8 METHOD ./bootstraptest/runner.rb show_progress 0x7f6fd6555bb0 METHOD ./bootstraptest/runner.rb with_stderr 0x7f6fd6555b78 BLOCK ./bootstraptest/runner.rb block in show_progress 0x7f6fd6555b40 BLOCK ./bootstraptest/runner.rb block in assert_check 0x7f6fd6555b08 METHOD ./bootstraptest/runner.rb get_result_string 0x7f6fd6555ad0 METHOD ./bootstraptest/runner.rb make_srcfile 0x7f6fd6555a98 CFUNC 0x7f6fd6555a60 BLOCK ./bootstraptest/runner.rb block in make_srcfile ``` Getting the main execution context is difficult (it is stored in a thread local) so for now you must supply an ec and this will make a backtrace
* bit table information when printing an objectAaron Patterson2020-09-281-0/+30
|
* add lldb functions for getting the heap page / heap page bodyAaron Patterson2020-09-021-0/+40
|
* support T_MATCH in lldbAaron Patterson2020-09-021-0/+4
|
* add T_ZOMBIE support to lldb scriptsAaron Patterson2020-08-271-0/+4
|
* lldb_cruby.py: show the sign of Bignum [ci skip]Nobuyoshi Nakada2020-06-231-2/+3
|
* Add T_IMEMO support to lldbAaron Patterson2020-05-071-0/+6
| | | | | I'm trying to find why a reference to an IMEMO object isn't being updated
* Add T_MOVED support to lldbAaron Patterson2020-05-071-0/+4
|
* lldb_cruby.py: fixed empty string dump [ci skip]Nobuyoshi Nakada2020-04-261-1/+4
|
* lldb_cruby.py: improved dump of SymbolNobuyoshi Nakada2019-11-251-5/+10
| | | | [ci skip]
* lldb_cruby.py: fixed dump of embedded RArrayNobuyoshi Nakada2019-11-251-1/+4
| | | | [ci skip]
* Refined `rp` output [ci skip]Nobuyoshi Nakada2019-10-241-14/+15
| | | | | So that the result structure can be accessed as `$number` variables, not a mere `VALUE`.
* lldb_cruby.py: fixed inspecting string [ci skip]Nobuyoshi Nakada2019-10-091-5/+2
| | | | | | | | | | | | Show the size of String. To see the whole contents even after NUL char: ``` (lldb) rp str (const char [5]) $1 = "x" (lldb) memory read -s1 --format x --count `sizeof($1)` -- &$1 0x1010457a8: 0x78 0x00 0x61 0x61 0x61 ```
* lldb_cruby.py: fixed embedded string ptr [ci skip]Nobuyoshi Nakada2019-10-091-1/+3
| | | | Use GetLocation to get the address of embedded array.
* Resolve unused local variable reported by LGTMRomain Tartière2019-10-031-1/+1
| | | | | | | | | LGTM reports that the value assigned to local variable 'shared' is never used: https://lgtm.com/projects/g/ruby/ruby/snapshot/f319a5d064627c6641817ec2ed16b97b4d215148/files/misc/lldb_cruby.py#x6512c0281581a470:1 This problem was introduced in by the refactoring that took place in 7c496b6624f720d539e3c0b40f122a9422a13b99.
* lldb_inspect: removed unnecessary newline and `end` optionNobuyoshi Nakada2019-09-251-3/+2
|
* misc/lldb_cruby.py: update for python3 [ci skip]Nobuyoshi Nakada2019-09-241-35/+36
| | | | lldb module bundled with Xcode is for Python 3 now.
* misc/lldb_cruby.py: removed unused module `commands` [ci skip]Nobuyoshi Nakada2019-09-241-1/+0
|
* Add some NODE information for lldbAaron Patterson2019-08-291-0/+6
| | | | | Just adds a conditional in the lldb scripts so we can more easily debug NODE objects.
* add FROZEN to lldb debug outputAaron Patterson2019-05-091-0/+2
|
* Fix typo in lldb scripttenderlove2019-04-021-1/+1
| | | | | | Also fix tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add regex support to lldb debug outputtenderlove2019-04-011-0/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lldb_cruby.py: T_COMPLEX support [ci skip]nobu2018-10-201-0/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lldb_cruby.py: T_RATIONAL support [ci skip]nobu2018-10-201-0/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lldb_rp: support Symbol [ci skip]nobu2018-10-041-0/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lldb_rp: support T_CLASS,T_MODULE,T_ICLASS [ci skip]nobu2018-10-031-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lldb_rp: use append_command_output [ci skip]nobu2018-10-031-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lldb_rp: support more types [ci skip]nobu2018-10-031-0/+22
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lldb_rp: fix the order of results [ci skip]nobu2018-10-031-20/+28
| | | | | | | The outputs from HandleCommand are printed immediately before print statements. Fix the order in `result` by capturing the outputs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lldb_rp: reload debug info if not loaded yet [ci skip]nobu2018-10-021-0/+3
| | | | | | | As debug infos in shared libraries are not accessible until loaded, retry loading the infos when needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lldb_cruby.py: T_DATA support [ci skip]nobu2018-10-011-0/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add initial test for lldb extensionnaruse2017-08-031-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Port more commands from .gdbinit to lldbyugui2017-08-021-0/+63
| | | | | | * misc/lldb_cury.py (dump_node, SDR, rb_count_objects): added git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* debug.c: more enumsnobu2017-06-011-14/+0
| | | | | | | * debug.c (ruby_dummy_gdb_enums): add enums for RObject, RModule, RString, RArray. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lldb_cruby.py: eval outside framesnobu2017-05-311-2/+9
| | | | | | | * misc/lldb_cruby.py (lldb_rp): evaluate without frames when no process is running, and show error messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lldb_cruby.py: constants from the targetnobu2017-05-281-87/+68
| | | | | | | * misc/lldb_cruby.py (lldb_init): get constants from ruby_dummy_gdb_enums in the target. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Initial commit of LLDB port of debug utilitynaruse2017-05-271-0/+138
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e