[前][次][番号順一覧][スレッド一覧]

ruby-changes:72991

From: nick <ko1@a...>
Date: Sat, 20 Aug 2022 12:24:49 +0900 (JST)
Subject: [ruby-changes:72991] 01e8d393bc (master): Fix gdb incompatibilies in rp_class, rb_ps_vm

https://git.ruby-lang.org/ruby.git/commit/?id=01e8d393bc

From 01e8d393bc06d8658ce04a042766cc8c0b5c108b Mon Sep 17 00:00:00 2001
From: nick evans <nicholas.evans@g...>
Date: Sun, 3 Apr 2022 09:54:18 -0400
Subject: Fix gdb incompatibilies in rp_class, rb_ps_vm

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?
---
 .gdbinit | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/.gdbinit b/.gdbinit
index 8979e8b47c..34d044caf6 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -544,13 +544,13 @@ end https://github.com/ruby/ruby/blob/trunk/.gdbinit#L544
 
 define rp_class
   printf "(struct RClass *) %p", (void*)$arg0
-  if ((struct RClass *)($arg0))->ptr.origin_ != $arg0
-    printf " -> %p", ((struct RClass *)($arg0))->ptr.origin_
+  if RCLASS_ORIGIN((struct RClass *)($arg0)) != $arg0
+    printf " -> %p", RCLASS_ORIGIN((struct RClass *)($arg0))
   end
   printf "\n"
   rb_classname $arg0
   print/x *(struct RClass *)($arg0)
-  print *((struct RClass *)($arg0))->ptr
+  print *RCLASS_EXT((struct RClass *)($arg0))
 end
 document rp_class
   Print the content of a Class/Module.
@@ -979,8 +979,8 @@ end https://github.com/ruby/ruby/blob/trunk/.gdbinit#L979
 
 define rb_ps_vm
   print $ps_vm = (rb_vm_t*)$arg0
-  set $ps_thread_ln = $ps_vm->living_threads.n.next
-  set $ps_thread_ln_last = $ps_vm->living_threads.n.prev
+  set $ps_thread_ln      = $ps_vm->ractor.main_ractor.threads.set.n.next
+  set $ps_thread_ln_last = $ps_vm->ractor.main_ractor.threads.set.n.prev
   while 1
     set $ps_thread_th = (rb_thread_t *)$ps_thread_ln
     set $ps_thread = (VALUE)($ps_thread_th->self)
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]