summaryrefslogtreecommitdiff
path: root/.gdbinit
AgeCommit message (Collapse)Author
12 daysgdbinit: fix printing of T_DATAJohn Hawthorn
Notes: Merged: https://.com/ruby/ruby/pull/13592
2025-04-10Allow gdb's rp to work on classes offlineJohn Hawthorn
It's useful to be able to get information about classes without a running process, ie. when debugging a coredump. Notes: Merged: https://.com/ruby/ruby/pull/13099
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://.com/ruby/ruby/pull/13006
2025-03-03.gdbinit: Fix T_HASH printing [ci skip]Alan Wu
Tested and it works with both AR and ST tables, with live process and core dumps.
2024-12-06.gdbinit: Fix reference to undefined rb_thread_t field [ci skip]Alan Wu
2024-11-11.gdbinit: Update RString printing for new layout [ci skip]Alan Wu
2024-11-11.gdbinit: Have rp() work without a target [ci skip]Alan Wu
Useful for core dumps. It used to not work because: (gdb) p !"" evaluation of this expression requires the target program to be active (gdb) p 0 == "" evaluation of this expression requires the target program to be active
2024-09-26Import es for old macOS from MacPortsNobuyoshi Nakada
Notes: Merged: https://.com/ruby/ruby/pull/11690
2024-06-11Allow gdb to search source path for required filesMatt Valentine-House
When doing out-of-source builds I often end up wanting to use gdb from inside a build directory. Currently if I do that the `.gdbinit` in the ruby source directory is not read. Attempting to manually load the `.gdbinit` from the Ruby source directory errors because of hard coded file-paths that assume we're running gdb from inside the source tree. Adding the `-s` flag to the `source` command when loading relative files signals to gdb to search in the source search path for the required file, rather than just the current directory. This allows me to use a custom `.gdbinit` from my build directory that sets the correct source directory and then loads the Ruby `.gdbinit`. ``` dir ../src source ../src/.gdbinit ```
2023-08-23Remove nd_entry from NODE_GASGN and NODE_GVARyui-knk
After a0f12a0258e4020bd657ee80b7d8f22bd33ea223 NODE_GASGN and NODE_GVAR hold same value on both nd_vid and nd_entry. This commit stops setting value to nd_entry and makes to use only nd_vid. Notes: Merged: https://.com/ruby/ruby/pull/8261
2023-06-29Fix broken wiki links (#8002)Jemma Issroff
Since [Misc #19679] migrated the wiki, these links should be updated to their new locations. Notes: Merged-By: jemmaissroff
2023-03-31Expand tabs in .gdbinitTakashi 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-30Fix ivar dump for RVARGC in .gdbinitTakashi Kokubun
It was crashing with: No symbol "ROBJECT_EMBED_LEN_MAX" in current context.
2023-01-09Fix a warning in .gdbinitTakashi Kokubun
Warning: 'set logging on', an alias for the command 'set logging enabled', is deprecated. Use 'set logging enabled on'.
2022-08-20Fix gdb incompatibilies in rp_class, rb_ps_vmnick evans
Other changes are needed to bring .gdbinit up-to-date with current ruby. It looks like lldb is the preferred approach now, and that config *is* being kept up-to-date. Still, this might be helpful to someone? Notes: Merged: https://.com/ruby/ruby/pull/6246
2021-02-06.gdbinit: Fix indentation in print_id [ci skip]Adam Jensen
Notes: Merged: https://.com/ruby/ruby/pull/4156
2021-01-27kill OBJ_TAINT etc.卜部昌平
Now that RUBY_FL_TAINT is recycled to become new RUBY_FL_SHAREABLE. Setting/clearing this flag from extension libraries break Ractor. Especially problematic one is OBJ_INFECT, which would make non-shareable objects travel across Ractor boundaries. Such operations should just be prohibited. Notes: Merged: https://.com/ruby/ruby/pull/4100
2020-12-04Add T_MOVED to rp command of GDBPeter Zhu
Notes: Merged: https://.com/ruby/ruby/pull/3846
2020-06-12.gdbinit: struct RHash::basic is not a pointer卜部昌平
2020-06-12.gdbinit: as.heap.aux.shared no longer exist卜部昌平
Maybe 182ae1407b3f6597cdbf6872f788c1ed3aa22a35 missed it.
2019-12-31Redmine /projects/ruby-trunk is now redirectedTakashi Kokubun
to /projects/ruby-master
2019-05-16Prefix global_symbols with `ruby_`Nobuyoshi Nakada
2019-02-17.gdbinit (rp): follow up changes in r66390ktsj
RHASH_ARRAY_{LEN,BOUND}_{MASK,SHIFT} have been renamed to RHASH_AR_TABLE_{SIZE,BOUND}_{MASK,SHIFT}. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30support theap for T_HASH. [Feature #14989]ko1
* hash.c, internal.h: support theap for small Hash. Introduce RHASH_ARRAY (li_table) besides st_table and small Hash (<=8 entries) are managed by an array data structure. This array data can be managed by theap. If st_table is needed, then converting array data to st_table data. For st_table using code, we prepare "stlike" APIs which accepts hash value and are very similar to st_ APIs. This work is based on the GSoC achievement by tacinight <[email protected]> and refined by ko1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-10.gdbinit: startup without shell for macOS Sierra and laternobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-14.gdbinit: expand RBASIC macro for old gdb on macnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-13add "print_flags" gdb command.ko1
* .gdbinit (print_flags): added to show raw FLAGS info for objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-29Unused macro and fieldyui-knk
* node.h (nd_cnt, struct RNode): nd_cnt has been unused since r60239, and also cnt field. * .gdbinit (nd_cnt): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-29Unused macroyui-knk
* node.h (nd_noex): nd_noex has been unused since r24128. * .gdbinit (nd_noex): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-29Unused macroyui-knk
* node.h (nd_frml): nd_frml has been unused since r34134. * .gdbinit (nd_frml): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-29Unused macroyui-knk
* node.h (nd_argc): nd_argc has been unused since r24128. * .gdbinit (nd_argc): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-28Unused macro and fieldyui-knk
* node.h (nd_cfnc, struct RNode): nd_cfnc has been unused since r49938, and also cfunc field. * .gdbinit (nd_cfnc): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-10.gdbinit (print_lineno): support a succinct bitvector implementation [ci skip]ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09.gdbinit (print_lineno): follow up changes in r61534, r61536ktsj
insns_info was refactored. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18.gdbinit: fix print_pathobjktsj
$str is not C string but RString. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18.gdbinit: follow up changes in r60726ktsj
rb_iseq_constant_body::line_info_size and line_info_table have been renamed to insns_info_size, insns_info. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-08fixup r60440 [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-29.gdbinit: follow up changes in r60440ktsj
ruby_current_vm has been renamed to ruby_current_vm_ptr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-26Use rb_execution_context_t instead of rb_thread_tko1
to represent execution context [Feature #14038] * vm_core.h (rb_thread_t): rb_thread_t::ec is now a pointer. There are many code using `th` to represent execution context (such as cfp, VM stack and so on). To access `ec`, they need to use `th->ec->...` (adding one indirection) so that we need to replace them by passing `ec` instead of `th`. * vm_core.h (GET_EC()): introduced to access current ec. Also remove `ruby_current_thread` global variable. * cont.c (rb_context_t): introduce rb_context_t::thread_ptr instead of rb_context_t::thread_value. * cont.c (ec_set_vm_stack): added to update vm_stack explicitly. * cont.c (ec_switch): added to switch ec explicitly. * cont.c (rb_fiber_close): added to terminate fibers explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24debug.c: imemo_masknobu
* .gdbinit (rp, rp_imemo, rb_ps_thread): update imemo_mask. * debug.c (ruby_dummy_gdb_enums): include imemo_types. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-08.gdbinit: newline at rp_id [ci skip]nobu
* .gdbinit (rp_id): add a newline. * .gdbinit (print_id): should not print a newline here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-06.gdbinit: print_id in rp_id [ci skip]nobu
* .gdbinit (rp_id): use print_id instead of calling lookup_id_str() in a debugger context. * symbol.c (ID_ENTRY_UNIT): made visible to debuggers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12output some strings without quotesnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-11Follow latest VM changesnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-17.gdbinit: fix nd_treenobu
* .gdbinit (nd_tree): use rb_str_tmp_new to get rid of `__extension__'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-09rb_execution_context_t: move stack, stack_size and cfp from rb_thread_tnormal
The goal is to reduce rb_context_t and rb_fiber_t size by removing the need to store the entire rb_thread_t in there. [ruby-core:81045] Work-in-progress: soon, we will move more fields here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18.gdbinit: suppress gdb message [ci skip]nobu
* .gdbinit (rp): check number of instance variables to get rid of "Invalid number 0 of repetitions." message at an empty object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18.gdbinit: RArray in history [ci skip]nobu
* .gdbinit (rp): put the contents of RArray in value history, for later use. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-25.gdbinit: rp_bignumnobu
* .gdbinit (rp_bignum): print bignum from higher digits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e