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
```
After a0f12a0258 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.
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?
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.
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
* 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 <tacingiht@gmail.com> and refined by ko1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* .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
* 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
* 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
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
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
* .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
* .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
* .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
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
* .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
* .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
* .gdbinit (output_string): get rid of "Invalid number 0 of
repetitions" error on empty strings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* .gdbinit (rp, output_string, rp): show the contents after NUL
char.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* .gdbinit (rp): refine output of T_STRUCT and T_BIGNUM to show
all elements.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* .gdbinit (rp): improve T_OBJECT dump. show the contents of the
instance variables table.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e