changeset 5641:f4d74be74462

Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches message <CAHCOHQ=RdYDu_K6ONqXxDEO0sLFe2_egftpfFEU=C6cVaDcsjw@mail.gmail.com>.
author Jerry James <james@xemacs.org>
date Wed, 11 Jan 2012 16:38:50 -0700
parents e6b5c49f9e13
children 5bda701e9e7c
files src/.gdbinit.in.in src/ChangeLog
diffstat 2 files changed, 32 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/.gdbinit.in.in	Sun Jan 08 22:29:06 2012 -0500
+++ b/src/.gdbinit.in.in	Wed Jan 11 16:38:50 2012 -0700
@@ -309,7 +309,19 @@
   else
   if $lrecord_type == lrecord_type_symbol
     pptype Lisp_Symbol
+#ifdef NEW_GC
+    set $val = ((Lisp_String *)$type_ptr->name)->data_object
+    decode_object $val
+    if $lrecord_type == lrecord_type_string_indirect_data
+      printf "Symbol name: %s\n", ((Lisp_String_Indirect_Data *)$val)->data
+    else
+    if $lrecord_type == lrecord_type_string_direct_data
+      printf "Symbol name: %s\n", ((Lisp_String_Direct_Data *)$val)->data
+    end
+    end
+#else
     printf "Symbol name: %s\n", ((Lisp_String *)$type_ptr->name)->data_
+#endif
   else
   if $lrecord_type == lrecord_type_vector
     pptype Lisp_Vector
@@ -391,11 +403,6 @@
   if $lrecord_type == lrecord_type_keymap
     pptype Lisp_Keymap
   else
-#ifndef NEW_GC
-  if $lrecord_type == lrecord_type_lcrecord_list
-    pstructtype lcrecord_list
-  else
-#endif
   if $lrecord_type == lrecord_type_ldap
     pptype Lisp_LDAP
   else
@@ -459,19 +466,32 @@
   if $lrecord_type == lrecord_type_fc_config
     pstructtype fc_config
   else
+#ifndef NEW_GC
+  if $lrecord_type == lrecord_type_lcrecord_list
+    pstructtype lcrecord_list
+  else
+  if $lrecord_type == lrecord_type_string_direct_data
+    pptype Lisp_String_Direct_Data
+  else
+  if $lrecord_type == lrecord_type_string_indirect_data
+    pptype Lisp_String_Indirect_Data
+  else
+#endif
     echo Unknown Lisp Object type\n
     print $lrecord_type
     print $arg0
   ## Barf, gag, retch
   end
-  end 
+#ifndef NEW_GC
+  end
+  end
+  end
+#endif
   end
   end
   end
   end
-#ifndef NEW_GC
   end
-#endif
   end
   end
   end
--- a/src/ChangeLog	Sun Jan 08 22:29:06 2012 -0500
+++ b/src/ChangeLog	Wed Jan 11 16:38:50 2012 -0700
@@ -75,6 +75,10 @@
 
 2011-12-28  Jerry James  <james@xemacs.org>
 
+	* .gdbinit.in.in: fix symbol and string printing with pobj and NEW_GC.
+
+2011-12-28  Jerry James  <james@xemacs.org>
+
 	* lisp-disunion.h (make_fixnum): avoid losing bits off the left end
 	if the value is of large magnitude and narrow type.
 	(make_char_1): ditto.