summaryrefslogtreecommitdiff
path: root/misc
AgeCommit message (Collapse)Author
2025-04-15Always look for the top-level RBasic in LLDB scriptsÉtienne Barrié
`rp` and other commands were broken for me because they always showed the object as a T_NONE. The reason was that instead of returning the type `struct RBasic`, FindFirstType("struct RBasic") was returning `yjit::cruby::autogened::RBasic`. Explicitly asking for the top-level RBasic by prefixing it with `::` is enough to fix those commands. Notes: Merged: https://github.com/ruby/ruby/pull/13096
2025-04-15Fix LLDB heap_page commandÉtienne Barrié
Move _append_command_output and _append_expression to LLDBInterface, and use it from HeapPageCommand after setting result. Notes: Merged: https://github.com/ruby/ruby/pull/13096
2025-04-08Fix lldb debug scripts (#13048)Eileen
In ruby/ruby#13008 `RVALUE` was removed without replacement. This means the lldb scripts that relied on `RVALUE` stopped working. I updated the ones that were using it just for the bytesize to use `slot_size` and then round to the nearest power of 40. We can't use `slot_size` directly because in debug mode it's `48` but `RVALUE` is `40` bytes. For the `as_type` method, I updated it to check the type. It's only used for `bignum` and `array` so that's a simple change. Lastly, for the `dump_page` method I replaced it with `struct free_slot` since that's looking at the freelist. `struct RVALUE` has been removed from all the scripts and I verified that `rp` is fixed. I'm not confident the `dump_page` method is fixed, the freelist looks off, but for now this gets us closer. Notes: Merged-By: eileencodes <[email protected]>
2025-03-28Remove RUBY_FL_PROMOTED{0,1} from debugger scriptsÉtienne Barrié
These flags were removed in d426343418aab6148706860bd1678ac309dc12c0 and print_flags is broken because of it. Notes: Merged: https://github.com/ruby/ruby/pull/13006
2025-02-12Fix .vscode/settings.json for the latest extensionTakashi Kokubun
2024-10-17ruby-style.el: Minimize backslash columns [ci skip]Nobuyoshi Nakada
Basically we don't align line continuation backslashes.
2024-10-03Rename size_pool -> heapMatt Valentine-House
Now that we've inlined the eden_heap into the size_pool, we should rename the size_pool to heap. So that Ruby contains multiple heaps, with different sized objects. The term heap as a collection of memory pages is more in memory management nomenclature, whereas size_pool was a name chosen out of necessity during the development of the Variable Width Allocation features of Ruby. The concept of size pools was introduced in order to facilitate different sized objects (other than the default 40 bytes). They wrapped the eden heap and the tomb heap, and some related state, and provided a reasonably simple way of duplicating all related concerns, to provide multiple pools that all shared the same structure but held different objects. Since then various changes have happend in Ruby's memory layout: * The concept of tomb heaps has been replaced by a global free pages list, with each page having it's slot size reconfigured at the point when it is resurrected * the eden heap has been inlined into the size pool itself, so that now the size pool directly controls the free_pages list, the sweeping page, the compaction cursor and the other state that was previously being managed by the eden heap. Now that there is no need for a heap wrapper, we should refer to the collection of pages containing Ruby objects as a heap again rather than a size pool Notes: Merged: https://github.com/ruby/ruby/pull/11771
2024-09-20Add c-style for prism [ci skip]Nobuyoshi Nakada
2024-06-02Make interchangeable NODE types aliasesNobuyoshi Nakada
2024-05-28lldb: Show coderangeNobuyoshi Nakada
2024-05-16Fix dump of NODE [ci skip]Nobuyoshi Nakada
2024-04-04NODE_LIT is not used anymoreyui-knk
2024-03-25Show the chilled status of a String [ci skip]Nobuyoshi Nakada
2024-03-14YJIT: Let yjit_perf.py support perf with Python disabled (#10246)Takashi Kokubun
* YJIT: Let yjit_perf.py support perf with Python disabled * Update yjit.md about perf * Recommend the extra interface by default
2024-02-21Introduce NODE_REGX to manage regexp literalyui-knk
2024-02-20[Feature #20257] Rearchitect Ripperyui-knk
Introduce another semantic value stack for Ripper so that Ripper can manage both Node and Ruby Object separately. This rearchitectutre of Ripper solves these issues. Therefore adding test cases for them. * [Bug 10436] https://bugs.ruby-lang.org/issues/10436 * [Bug 18988] https://bugs.ruby-lang.org/issues/18988 * [Bug 20055] https://bugs.ruby-lang.org/issues/20055 Checked the differences of `Ripper.sexp` for files under `/test/ruby` are only on test_pattern_matching.rb. The differences comes from the differences between `new_hash_pattern_tail` functions between parser and Ripper. Ripper `new_hash_pattern_tail` didn’t call `assignable` then `kw_rest_arg` wasn’t marked as local variable. This is also fixed by this commit. ``` --- a/./tmp/before/test_pattern_matching.rb +++ b/./tmp/after/test_pattern_matching.rb @@ -3607,7 +3607,7 @@ [:in, [:hshptn, nil, [], [:var_field, [:@ident, “a”, [984, 13]]]], [[:binary, - [:vcall, [:@ident, “a”, [985, 10]]], + [:var_ref, [:@ident, “a”, [985, 10]]], :==, [:hash, nil]]], nil]]], @@ -3662,7 +3662,7 @@ [:in, [:hshptn, nil, [], [:var_field, [:@ident, “a”, [993, 13]]]], [[:binary, - [:vcall, [:@ident, “a”, [994, 10]]], + [:var_ref, [:@ident, “a”, [994, 10]]], :==, [:hash, [:assoclist_from_args, @@ -3813,7 +3813,7 @@ [:command, [:@ident, “raise”, [1022, 10]], [:args_add_block, - [[:vcall, [:@ident, “b”, [1022, 16]]]], + [[:var_ref, [:@ident, “b”, [1022, 16]]]], false]]], [:else, [[:var_ref, [:@kw, “true”, [1024, 10]]]]]]]], nil, @@ -3876,7 +3876,7 @@ [:@int, “0”, [1033, 15]]], :“&&“, [:binary, - [:vcall, [:@ident, “b”, [1033, 20]]], + [:var_ref, [:@ident, “b”, [1033, 20]]], :==, [:hash, nil]]]], nil]]], @@ -3946,7 +3946,7 @@ [:@int, “0”, [1042, 15]]], :“&&“, [:binary, - [:vcall, [:@ident, “b”, [1042, 20]]], + [:var_ref, [:@ident, “b”, [1042, 20]]], :==, [:hash, [:assoclist_from_args, @@ -5206,7 +5206,7 @@ [[:assoc_new, [:@label, “c:“, [1352, 22]], [:@int, “0”, [1352, 25]]]]]], - [:vcall, [:@ident, “r”, [1352, 29]]]], + [:var_ref, [:@ident, “r”, [1352, 29]]]], false]]], [:binary, [:call, @@ -5299,7 +5299,7 @@ [:assoc_new, [:@label, “c:“, [1367, 34]], [:@int, “0”, [1367, 37]]]]]], - [:vcall, [:@ident, “r”, [1367, 41]]]], + [:var_ref, [:@ident, “r”, [1367, 41]]]], false]]], [:binary, [:call, @@ -5931,7 +5931,7 @@ [:in, [:hshptn, nil, [], [:var_field, [:@ident, “r”, [1533, 11]]]], [[:binary, - [:vcall, [:@ident, “r”, [1534, 8]]], + [:var_ref, [:@ident, “r”, [1534, 8]]], :==, [:hash, [:assoclist_from_args, ```
2024-02-14YJIT: Add --yjit-perf=codegen option (#9957)Takashi Kokubun
2024-01-08Remove obsoleted lldb_yjit.pyTakashi Kokubun
which clearly seems to be written for Ruby 3.1 YJIT that was not rewritten in Rust yet. Since it has been left there as is, I don't think anybody is actively using this script. We could add a new one if we need it again.
2024-01-02Introduce NODE_FILEyui-knk
`__FILE__` was managed by `NODE_STR` with `String` object. This commit introduces `NODE_FILE` and `struct rb_parser_string` so that 1. `__FILE__` is detectable from AST Node 2. Reduce dependency ruby object
2024-01-02LLDB: Print actual node structure of NODE_LINEyui-knk
2023-12-11YJIT: implement call fuzzer script (#9129)Maxime Chevalier-Boisvert
* YJIT: implement call fuzzer script Attempt to detect bugs in YJIT call implementation. * Add basic checks for rest, kwrest. Impprove formatting. * Refactor call fuzzer to make it more powerful and maintainable Compute checksum of arguments * Fix checksum computation. Add useless locals as sussged by Alan. * Add some useless if statements * Add arguments of different types * Pass object arguments as well. Force different shapes. * Compute fuzzing time/speed * Make use of block param
2023-12-06Fix RCLASS_EXT dump [ci skip]Nobuyoshi Nakada
2023-10-31LLDB: Dump table structs in Hash [ci skip]Nobuyoshi Nakada
2023-10-25LLDB: Use `expression` to save the result into the history [ci skip]Nobuyoshi Nakada
2023-10-10LLDB: Print actual node structure [ci skip]yui-knk
2023-09-30Fix RBignum print [ci skip]Nobuyoshi Nakada
2023-09-30Fix RArray print [ci skip]Nobuyoshi Nakada
2023-09-30Delete empty lines at EOF [ci skip]Nobuyoshi Nakada
2023-08-29Fix string2cstr in lldb_cruby.py [ci skip]Peter Zhu
2023-08-23Fix gdb.py for C frames [ci skip]Takashi Kokubun
2023-08-03gdb.py: Support dumping a dummy frame [ci skip]Takashi Kokubun
2023-08-02* remove trailing spaces. [ci skip]git
2023-08-02gdb.py: Add -a option to dump all frames [ci skip]Takashi Kokubun
2023-08-02gdb.py: Print Env based on EP instead of BPTakashi Kokubun
because EP could be escaped.
2023-07-20misc/gdb.py: Allow overriding stack_size [ci skip]Takashi Kokubun
2023-07-20Get rid of obsoleted __bp__ referencesTakashi Kokubun
2023-07-07Add ruby_globals to lldb for easier debugging (#8041)Jemma Issroff
Notes: Merged-By: jemmaissroff
2023-06-11`RString::len` was moved at 7577c101ed6452de3e72fadb43db595946acc701Nobuyoshi Nakada
[ci skip]
2023-06-05Add an example for rust-analyzer.cargo.unsetTest [ci skip]Takashi Kokubun
2023-04-10LLDB: Fix T_ARRAY inspect [ci skip]Nobuyoshi Nakada
2023-04-01gdb: Fix a command exampleTakashi Kokubun
It was actually harder to type `cfp + 1`. `cfp 1` also works and is more useful.
2023-04-01gdb: Fix specvalTakashi Kokubun
Somehow my gdb stopped recognizing VM_BLOCK_HANDLER_NONE (macro) today. Just changing it to a safer code.
2023-04-01gdb: Don't dump params and locals for C framesTakashi Kokubun
2023-03-31gdb: Visualize register positions on the leftTakashi Kokubun
2023-03-31gdb: Always show actual values in cfpTakashi Kokubun
2023-03-31gdb: Show params and locals in cfpTakashi Kokubun
2023-03-31gdb: Dump env data in cfp commandTakashi Kokubun
2023-03-31Put misc/gdb.py [experimental]Takashi Kokubun
This works like: ``` (gdb) cfp CFP (count=3, addr=0x7ffff73fef50): $1 = {pc = 0x555556bf7818, sp = 0x7ffff72ff078, iseq = 0x7ffff2603270, self = 140737344619296, ep = 0x7ffff72ff058, block_code = 0x0, __bp__ = 0x7ffff72ff060, jit_return = 0x555558c2b000} Stack (size=3): [0] FIXNUM: 1 [1] T_STRING: "" bytesize:0 (embed) encoding:1 coderange:7bit $2 = (struct RString *) 0x7ffff249ea80 [2] [PROMOTED] T_OBJECT: $3 = {flags = 21474844769, klass = 140737344040416} $4 = {0x24, 0x24, 0x24} (gdb) cfp + 1 CFP (count=3, addr=0x7ffff73fef90): $5 = {pc = 0x5555567a78f8, sp = 0x7ffff72ff040, iseq = 0x7ffff26032d0, self = 140737344619296, ep = 0x7ffff72ff038, block_code = 0x0, __bp__ = 0x7ffff72ff040, jit_return = 0x555558c2b000} Stack (size=0): ```
2023-03-30[ci skip] LLDB: Fix rp for arraysMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/7632
2023-03-31Fix missing receiver [ci sip]Nobuyoshi Nakada