APPROVE COMMIT
NOTE: This patch has been committed.
This has been biting me for a long time. The Right Thing to do would be to
fix GDB instead, but I’m certainly not going to get to that, and as far as I
can see we’re certainly not going to change these values within XEmacs.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1244992102 -3600
# Node ID e9ccbc62f7e75ac885fb50bf5bcd65533791bc17
# Parent 48b45a6069619c377f5a212ff1d4ab6f19a94b64
Don't rely on GDB understanding the Lisp_Type_{Record,Char} enums, gdbinit.in
2009-06-14 Aidan Kehoe <kehoea(a)parhasard.net>
* gdbinit.in:
Supply variables for the Lisp_Type_Record, Lisp_Type_Char
type information, for the sake of various versions of GDB that
can't take them from the enum vals in the executable. Use those
variables instead of the enums.
diff -r 48b45a606961 -r e9ccbc62f7e7 etc/ChangeLog
--- a/etc/ChangeLog Sun Jun 14 15:07:13 2009 +0100
+++ b/etc/ChangeLog Sun Jun 14 16:08:22 2009 +0100
@@ -1,3 +1,11 @@
+2009-06-14 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * gdbinit.in:
+ Supply variables for the Lisp_Type_Record, Lisp_Type_Char
+ type information, for the sake of various versions of GDB that
+ can't take them from the enum vals in the executable. Use those
+ variables instead of the enums.
+
2009-05-18 Stephen J. Turnbull <stephen(a)xemacs.org>
* XEmacs 21.5.29 "garbanzo" is released.
diff -r 48b45a606961 -r e9ccbc62f7e7 etc/gdbinit.in
--- a/etc/gdbinit.in Sun Jun 14 15:07:13 2009 +0100
+++ b/etc/gdbinit.in Sun Jun 14 16:08:22 2009 +0100
@@ -71,6 +71,8 @@
#endif
set $Lisp_Type_Int = -2
+set $Lisp_Type_Record = 0
+set $Lisp_Type_Char = 2
define decode_object
set $obj = (unsigned long) $arg0
@@ -80,7 +82,7 @@
set $type = $Lisp_Type_Int
else
set $type = $obj & dbg_typemask
- if $type == Lisp_Type_Char
+ if $type == $Lisp_Type_Char
set $val = ($obj & dbg_valmask) >> dbg_gctypebits
else
## It's a record pointer
@@ -88,7 +90,7 @@
end
end
- if $type == Lisp_Type_Record
+ if $type == $Lisp_Type_Record
set $lheader = ((struct lrecord_header *) $val)
set $lrecord_type = ($lheader->type)
set $imp = ((struct lrecord_implementation *) lrecord_implementations_table[(int)
$lrecord_type])
@@ -115,7 +117,7 @@
if $type == $Lisp_Type_Int
echo int\n
else
- if $type == Lisp_Type_Char
+ if $type == $Lisp_Type_Char
echo char\n
else
printf "record type: %s\n", $imp->name
@@ -264,7 +266,7 @@
if $type == $Lisp_Type_Int
printf "Integer: %d\n", $val
else
- if $type == Lisp_Type_Char
+ if $type == $Lisp_Type_Char
if $val > 32 && $val < 128
printf "Char: %c\n", $val
else
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghe, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches