From cf07311b884db06d8b313c057f4832d5693ac2b5 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 27 Dec 2010 10:27:52 -0500 Subject: [PATCH] * src/.gdbinit (xgetptr): Fix the union+lsb case. (xbacktrace): Fix the union case. --- src/.gdbinit | 7 ++++--- src/ChangeLog | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/.gdbinit b/src/.gdbinit index e8a64f5dfe4..f81b99d4f3f 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -1,5 +1,5 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. # # This file is part of GNU Emacs. @@ -49,7 +49,7 @@ handle SIGALRM ignore # Using a constant runs into GDB bugs sometimes. define xgetptr set $bugfix = $arg0 - set $ptr = (gdb_use_union ? $bugfix.u.val : $bugfix & $valmask) | gdb_data_seg_bits + set $ptr = (gdb_use_union ? (gdb_use_lsb ? $bugfix.u.val << gdb_gctypebits : $bugfix.u.val) : $bugfix & $valmask) | gdb_data_seg_bits end define xgetint @@ -1130,7 +1130,8 @@ define xbacktrace xprintsym (*$bt->function) printf " (0x%x)\n", $bt->args else - printf "0x%x ", *$bt->function + xgetptr *$bt->function + printf "0x%x ", $ptr if $type == Lisp_Vectorlike xgetptr (*$bt->function) set $size = ((struct Lisp_Vector *) $ptr)->size diff --git a/src/ChangeLog b/src/ChangeLog index 3478a0cb653..b4bafbce1b3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-12-27 Stefan Monnier + + * .gdbinit (xgetptr): Fix the union+lsb case. + (xbacktrace): Fix the union case. + 2010-12-26 Stefan Monnier * window.c (Fmove_to_window_line): Avoid abort when called in a buffer -- 2.39.2