summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-02-07 21:26:53 -0700
committerTom Tromey <tom@tromey.com>2018-02-12 10:54:11 -0700
commitb3f45140ec441bf88fa25f4e615b18e076d51342 (patch)
tree215b2e1566704b2a84254463f720357dca2ecca0
parent1590f8823d858b7bbad7f8a067fe356a19e1d5f8 (diff)
downloademacs-b3f45140ec441bf88fa25f4e615b18e076d51342.tar.gz
emacs-b3f45140ec441bf88fa25f4e615b18e076d51342.tar.bz2
emacs-b3f45140ec441bf88fa25f4e615b18e076d51342.zip
Minor fixes to .gdbinit
* src/.gdbinit (xcompiled): Emit a final newline. (python): Define "long" if not already defined. Use casts to long, not int.
-rw-r--r--src/.gdbinit13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/.gdbinit b/src/.gdbinit
index a5411e66d56..9fdcaf86611 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -819,6 +819,7 @@ define xcompiled
xgetptr $
print (struct Lisp_Vector *) $ptr
output ($->contents[0])@($->header.size & 0xff)
+ echo \n
end
document xcompiled
Print $ as a compiled function pointer.
@@ -1270,6 +1271,12 @@ end
python
+# Python 3 compatibility.
+try:
+ long
+except:
+ long = int
+
# Omit pretty-printing in older (pre-7.3) GDBs that lack it.
if hasattr(gdb, 'printing'):
@@ -1306,13 +1313,13 @@ if hasattr(gdb, 'printing'):
# symbol table, guess reasonable defaults.
sym = gdb.lookup_symbol ("EMACS_INT_WIDTH")[0]
if sym:
- EMACS_INT_WIDTH = int (sym.value ())
+ EMACS_INT_WIDTH = long (sym.value ())
else:
sym = gdb.lookup_symbol ("EMACS_INT")[0]
EMACS_INT_WIDTH = 8 * sym.type.sizeof
sym = gdb.lookup_symbol ("USE_LSB_TAG")[0]
if sym:
- USE_LSB_TAG = int (sym.value ())
+ USE_LSB_TAG = long (sym.value ())
else:
USE_LSB_TAG = 1
@@ -1334,7 +1341,7 @@ if hasattr(gdb, 'printing'):
# integer. Also, val.cast (gdb.lookup.type ("EMACS_UINT"))
# would have problems with GDB 7.12.1; see
# <http://patchwork.sourceware.org/patch/11557/>.
- ival = int (val)
+ ival = long (val)
# For nil, yield "XIL(0)", which is easier to read than "XIL(0x0)".
if not ival: