aboutsummaryrefslogtreecommitdiffstats
path: root/misc
Commit message (Collapse)AuthorAgeFilesLines
* [Feature #18045] Implement size classes for GCPeter Zhu2021-08-251-3/+4
| | | | | | | | | This commits implements size classes in the GC for the Variable Width Allocation feature. Unless `USE_RVARGC` compile flag is set, only a single size class is created, maintaining current behaviour. See the redmine ticket for more details. Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
* [Feature #18045] Remove T_PAYLOADPeter Zhu2021-08-251-3/+0
| | | | | | | This commit removes T_PAYLOAD since the new VWA implementation no longer requires T_PAYLOAD types. Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
* Revert "[Feature #18045] Implement size classes for GC"Peter Zhu2021-08-231-4/+6
| | | | | | This reverts commits 48ff7a9f3e47bffb3e4d067a12ba9b936261caa0 and b2e2cf2dedd104acad8610721db5e4d341f135ef because it is causing crashes in SPARC solaris and i386 debian.
* [Feature #18045] Implement size classes for GCPeter Zhu2021-08-231-3/+4
| | | | | | | | | This commits implements size classes in the GC for the Variable Width Allocation feature. Unless `USE_RVARGC` compile flag is set, only a single size class is created, maintaining current behaviour. See the redmine ticket for more details. Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
* [Feature #18045] Remove T_PAYLOADPeter Zhu2021-08-231-3/+0
| | | | | | | This commit removes T_PAYLOAD since the new VWA implementation no longer requires T_PAYLOAD types. Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
* lldb_cruby.py: push non-flonum float to history [ci skip]Nobuyoshi Nakada2021-06-041-3/+1
|
* lldb_cruby.py: fix non-flonum float inspection [ci skip]Nobuyoshi Nakada2021-06-041-1/+1
|
* Promote net-smtp to the bundled gemsHiroshi SHIBATA2021-05-271-1/+0
|
* Promote net-pop to the bundled gemsHiroshi SHIBATA2021-05-271-1/+0
|
* Promote net-imap to the bundled gemsHiroshi SHIBATA2021-05-271-1/+0
|
* Promote net-ftp to the bundled gemsHiroshi SHIBATA2021-05-271-1/+0
|
* Promote matrix to the bundled gemsHiroshi SHIBATA2021-05-271-1/+0
|
* Update the latest list of default gems for misc/expand_tabs.rbHiroshi SHIBATA2021-05-251-8/+54
|
* add rb_id2str to lldb debugging scriptsAaron Patterson2021-05-241-0/+46
|
* lldb: convert heap_page_obj_limit from a float to intPeter Zhu2021-05-061-5/+2
|
* lldb: teach rp about T_PAYLOADMatt Valentine-House2021-05-061-0/+3
|
* lldb: Warn when attempting to dump invalid pagesMatt Valentine-House2021-04-291-14/+32
|
* [ruby/optparse] Add EditorConfig fileAlexander Popov2021-04-282-3/+3
| | | | | | | | | | More info here: https://editorconfig.org/ For example, `ruby/ruby` has it: https://github.com/ruby/ruby/blob/05ebaee/.editorconfig Also fix some offenses. https://github.com/ruby/optparse/commit/29402e7e0e
* lldb: highlight the slot when using dump_page_rvalueMatt Valentine-House2021-04-271-2/+6
|
* lldb: dump_page_rvalue - dump a heap page containing an RVALUEMatt Valentine-House2021-04-271-10/+30
| | | | | | | | | | | rather than having to do this in a two step process: 1. heap_page obj 2. dump_page $2 (or whatever lldb variable heap_page set) we can now just dump_page_rvalue obj
* lldb: Add Freelist Index to dump_page outputMatt Valentine-House2021-04-271-12/+49
|
* [ruby/optparse] Completion scripts themselves are not executableNobuyoshi Nakada2021-03-292-2/+4
| | | | https://github.com/ruby/optparse/commit/65d8aff935
* [ruby/optparse] Use ZDOTDIR env var to locate .zshrcMartin Rey2021-03-291-3/+3
| | | | https://github.com/ruby/optparse/commit/c4977674bf
* LLDB: Introduce dump_page helperMatt Valentine-House2021-03-161-0/+53
| | | | | | | This dumps out object type information for every object on a page in the form: bits [LM R ] T_CLASS [389]: Addr: 0x1007ebcf0 (flags: 0x100000062)
* LLDB: Extract a dump_bits function from rpMatt Valentine-House2021-03-161-14/+18
| | | | that dumps the heap page bitmaps for a slot
* Promote webrick to bundled gemsHiroshi SHIBATA2020-12-101-1/+0
|
* 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
* Fix lldb disassembler so it works with core filesAaron Patterson2020-10-081-24/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the lldb disassembler script so that it doesn't need a live process when disassembling rb_iseq_t. I also added the PC to the output so you can tell what the VM is executing when it crashed. For example: ``` (lldb) rbdisasm ec->cfp->iseq PC IDX insn_name(operands) 0x56039f0a1720 0000 nop 0x56039f0a1728 0001 getlocal_WC_1( 5 ) 0x56039f0a1738 0003 branchunless( 7 ) 0x56039f0a1748 0005 getlocal_WC_0( 3 ) 0x56039f0a1758 0007 putstring( (VALUE)0x56039f0c7eb8 ) 0x56039f0a1768 0009 opt_send_without_block( (struct rb_call_data *)0x56039f09f140 ) 0x56039f0a1778 0011 pop 0x56039f0a1780 0012 getglobal( ID: 0x7fd7 ) 0x56039f0a1790 0014 branchunless( 7 ) 0x56039f0a17a0 0016 getlocal_WC_0( 3 ) 0x56039f0a17b0 0018 putstring( (VALUE)0x56039f0c7e90 ) 0x56039f0a17c0 0020 opt_send_without_block( (struct rb_call_data *)0x56039f09f150 ) 0x56039f0a17d0 0022 pop 0x56039f0a17d8 0023 getlocal_WC_0( 3 ) 0x56039f0a17e8 0025 putobject( (VALUE)0x56039f0c7e68 ) 0x56039f0a17f8 0027 getlocal_WC_1( 6 ) 0x56039f0a1808 0029 dup 0x56039f0a1810 0030 checktype( 5 ) 0x56039f0a1820 0032 branchif( 4 ) 0x56039f0a1830 0034 dup 0x56039f0a1838 0035 opt_send_without_block( (struct rb_call_data *)0x56039f09f160 ) 0x56039f0a1848 0037 tostring 0x56039f0a1850 0038 putobject( (VALUE)0x56039f0c7e40 ) 0x56039f0a1860 0040 concatstrings( 3 ) 0x56039f0a1870 0042 opt_send_without_block( (struct rb_call_data *)0x56039f09f170 ) 0x56039f0a1880 0044 nop 0x56039f0a1888 0045 leave (lldb) p ec->cfp->pc (const VALUE *) $146 = 0x000056039f0a1848 ``` Here we can see the VM is currently executing `opt_send_without_block` (because the PC is one ahead of the current instruction)
* bit table information when printing an objectAaron Patterson2020-09-281-0/+30
|
* Rudimentary support for disassembling rb_iseq_tAaron Patterson2020-09-221-0/+197
| | | | | | | | | | | | | | | | | | | | | | | I need to disassemble instruction sequences while debugging, so I wrote this. Usage is like this: ``` (lldb) p iseq (rb_iseq_t *) $147 = 0x0000000101068400 (lldb) rbdisasm iseq 0000 putspecialobject( 3 ) 0002 putnil 0003 defineclass( ID: 0x560b, (rb_iseq_t *)0x1010681d0, 2 ) 0007 pop 0008 putspecialobject( 3 ) 0010 putnil 0011 defineclass( ID: 0x56eb, (rb_iseq_t *)0x101063b58, 2 ) 0015 leave ``` Also thanks a ton to @kivikakk helping me figure out how to navigate LLDB's Python 😆
* 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
|
* Removed sdbm entries from toolchaninsHiroshi SHIBATA2020-06-191-1/+0
|
* 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
|
* Fixed misspellingsNobuyoshi Nakada2019-12-201-1/+1
| | | | Fixed misspellings reported at [Bug #16437], only in ruby and rubyspec.
* 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.
* Fix ArgumentError in expand_tabs.rbJeremy Evans2019-08-251-2/+2
| | | | | | | | | This fixes the following in my environment: misc/expand_tabs.rb:29:in `=~': invalid byte sequence in US-ASCII (ArgumentError) This switches from =~ to start_with? as a regular expression is not actually needed here.