Mercurial > emacs
comparison src/.gdbinit @ 112085:19ad0830069c
* src/.gdbinit (xgetptr): Fix the union+lsb case.
(xbacktrace): Fix the union case.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 27 Dec 2010 10:27:52 -0500 |
parents | dd4b6b2fe706 |
children | 40af77a50adc 376148b31b5e |
comparison
equal
deleted
inserted
replaced
112084:47eeace758ba | 112085:19ad0830069c |
---|---|
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 |
47 | 47 |
48 # Use $bugfix so that the value isn't a constant. | 48 # Use $bugfix so that the value isn't a constant. |
49 # Using a constant runs into GDB bugs sometimes. | 49 # Using a constant runs into GDB bugs sometimes. |
50 define xgetptr | 50 define xgetptr |
51 set $bugfix = $arg0 | 51 set $bugfix = $arg0 |
52 set $ptr = (gdb_use_union ? $bugfix.u.val : $bugfix & $valmask) | gdb_data_seg_bits | 52 set $ptr = (gdb_use_union ? (gdb_use_lsb ? $bugfix.u.val << gdb_gctypebits : $bugfix.u.val) : $bugfix & $valmask) | gdb_data_seg_bits |
53 end | 53 end |
54 | 54 |
55 define xgetint | 55 define xgetint |
56 set $bugfix = $arg0 | 56 set $bugfix = $arg0 |
57 set $int = gdb_use_union ? $bugfix.s.val : (gdb_use_lsb ? $bugfix : $bugfix << gdb_gctypebits) >> gdb_gctypebits | 57 set $int = gdb_use_union ? $bugfix.s.val : (gdb_use_lsb ? $bugfix : $bugfix << gdb_gctypebits) >> gdb_gctypebits |
1128 xgettype (*$bt->function) | 1128 xgettype (*$bt->function) |
1129 if $type == Lisp_Symbol | 1129 if $type == Lisp_Symbol |
1130 xprintsym (*$bt->function) | 1130 xprintsym (*$bt->function) |
1131 printf " (0x%x)\n", $bt->args | 1131 printf " (0x%x)\n", $bt->args |
1132 else | 1132 else |
1133 printf "0x%x ", *$bt->function | 1133 xgetptr *$bt->function |
1134 printf "0x%x ", $ptr | |
1134 if $type == Lisp_Vectorlike | 1135 if $type == Lisp_Vectorlike |
1135 xgetptr (*$bt->function) | 1136 xgetptr (*$bt->function) |
1136 set $size = ((struct Lisp_Vector *) $ptr)->size | 1137 set $size = ((struct Lisp_Vector *) $ptr)->size |
1137 output ($size & PVEC_FLAG) ? (enum pvec_type) ($size & PVEC_TYPE_MASK) : $size & ~gdb_array_mark_flag | 1138 output ($size & PVEC_FLAG) ? (enum pvec_type) ($size & PVEC_TYPE_MASK) : $size & ~gdb_array_mark_flag |
1138 else | 1139 else |