Mercurial > hg > xemacs-beta
changeset 4643:e9ccbc62f7e7
Don't rely on GDB understanding the Lisp_Type_{Record,Char} enums, gdbinit.in
2009-06-14 Aidan Kehoe <kehoea@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.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 14 Jun 2009 16:08:22 +0100 |
parents | 48b45a606961 |
children | b0ae008bf1a0 |
files | etc/ChangeLog etc/gdbinit.in |
diffstat | 2 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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@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@xemacs.org> * XEmacs 21.5.29 "garbanzo" is released.
--- 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