comparison src/.gdbinit @ 112098:40af77a50adc

Merge changes from emacs-23 branch
author Chong Yidong <cyd@stupidchicken.com>
date Sun, 02 Jan 2011 15:28:40 -0500
parents 5c986eef8f0d 19ad0830069c
children 417b1e4d63cd
comparison
equal deleted inserted replaced
112045:52100bac91db 112098:40af77a50adc
1 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 1 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
2 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 2 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
3 # Free Software Foundation, Inc. 3 # Free Software Foundation, Inc.
4 # 4 #
5 # This file is part of GNU Emacs. 5 # This file is part of GNU Emacs.
6 # 6 #
7 # GNU Emacs is free software; you can redistribute it and/or modify 7 # GNU Emacs is free software; you can redistribute it and/or modify
49 49
50 # Use $bugfix so that the value isn't a constant. 50 # Use $bugfix so that the value isn't a constant.
51 # Using a constant runs into GDB bugs sometimes. 51 # Using a constant runs into GDB bugs sometimes.
52 define xgetptr 52 define xgetptr
53 set $bugfix = $arg0 53 set $bugfix = $arg0
54 set $ptr = (gdb_use_union ? $bugfix.u.val : $bugfix & $valmask) | gdb_data_seg_bits 54 set $ptr = (gdb_use_union ? (gdb_use_lsb ? $bugfix.u.val << gdb_gctypebits : $bugfix.u.val) : $bugfix & $valmask) | gdb_data_seg_bits
55 end 55 end
56 56
57 define xgetint 57 define xgetint
58 set $bugfix = $arg0 58 set $bugfix = $arg0
59 set $int = gdb_use_union ? $bugfix.s.val : (gdb_use_lsb ? $bugfix : $bugfix << gdb_gctypebits) >> gdb_gctypebits 59 set $int = gdb_use_union ? $bugfix.s.val : (gdb_use_lsb ? $bugfix : $bugfix << gdb_gctypebits) >> gdb_gctypebits
1225 xgettype (*$bt->function) 1225 xgettype (*$bt->function)
1226 if $type == Lisp_Symbol 1226 if $type == Lisp_Symbol
1227 xprintsym (*$bt->function) 1227 xprintsym (*$bt->function)
1228 printf " (0x%x)\n", $bt->args 1228 printf " (0x%x)\n", $bt->args
1229 else 1229 else
1230 printf "0x%x ", *$bt->function 1230 xgetptr *$bt->function
1231 printf "0x%x ", $ptr
1231 if $type == Lisp_Vectorlike 1232 if $type == Lisp_Vectorlike
1232 xgetptr (*$bt->function) 1233 xgetptr (*$bt->function)
1233 set $size = ((struct Lisp_Vector *) $ptr)->size 1234 set $size = ((struct Lisp_Vector *) $ptr)->size
1234 output ($size & PVEC_FLAG) ? (enum pvec_type) ($size & PVEC_TYPE_MASK) : $size & ~gdb_array_mark_flag 1235 output ($size & PVEC_FLAG) ? (enum pvec_type) ($size & PVEC_TYPE_MASK) : $size & ~gdb_array_mark_flag
1235 else 1236 else