aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTom Tromey2018-02-07 21:26:53 -0700
committerTom Tromey2018-02-12 10:54:11 -0700
commitb3f45140ec441bf88fa25f4e615b18e076d51342 (patch)
tree215b2e1566704b2a84254463f720357dca2ecca0 /src
parent1590f8823d858b7bbad7f8a067fe356a19e1d5f8 (diff)
downloademacs-b3f45140ec441bf88fa25f4e615b18e076d51342.tar.gz
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.
Diffstat (limited to 'src')
-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
819 xgetptr $ 819 xgetptr $
820 print (struct Lisp_Vector *) $ptr 820 print (struct Lisp_Vector *) $ptr
821 output ($->contents[0])@($->header.size & 0xff) 821 output ($->contents[0])@($->header.size & 0xff)
822 echo \n
822end 823end
823document xcompiled 824document xcompiled
824Print $ as a compiled function pointer. 825Print $ as a compiled function pointer.
@@ -1270,6 +1271,12 @@ end
1270 1271
1271python 1272python
1272 1273
1274# Python 3 compatibility.
1275try:
1276 long
1277except:
1278 long = int
1279
1273# Omit pretty-printing in older (pre-7.3) GDBs that lack it. 1280# Omit pretty-printing in older (pre-7.3) GDBs that lack it.
1274if hasattr(gdb, 'printing'): 1281if hasattr(gdb, 'printing'):
1275 1282
@@ -1306,13 +1313,13 @@ if hasattr(gdb, 'printing'):
1306 # symbol table, guess reasonable defaults. 1313 # symbol table, guess reasonable defaults.
1307 sym = gdb.lookup_symbol ("EMACS_INT_WIDTH")[0] 1314 sym = gdb.lookup_symbol ("EMACS_INT_WIDTH")[0]
1308 if sym: 1315 if sym:
1309 EMACS_INT_WIDTH = int (sym.value ()) 1316 EMACS_INT_WIDTH = long (sym.value ())
1310 else: 1317 else:
1311 sym = gdb.lookup_symbol ("EMACS_INT")[0] 1318 sym = gdb.lookup_symbol ("EMACS_INT")[0]
1312 EMACS_INT_WIDTH = 8 * sym.type.sizeof 1319 EMACS_INT_WIDTH = 8 * sym.type.sizeof
1313 sym = gdb.lookup_symbol ("USE_LSB_TAG")[0] 1320 sym = gdb.lookup_symbol ("USE_LSB_TAG")[0]
1314 if sym: 1321 if sym:
1315 USE_LSB_TAG = int (sym.value ()) 1322 USE_LSB_TAG = long (sym.value ())
1316 else: 1323 else:
1317 USE_LSB_TAG = 1 1324 USE_LSB_TAG = 1
1318 1325
@@ -1334,7 +1341,7 @@ if hasattr(gdb, 'printing'):
1334 # integer. Also, val.cast (gdb.lookup.type ("EMACS_UINT")) 1341 # integer. Also, val.cast (gdb.lookup.type ("EMACS_UINT"))
1335 # would have problems with GDB 7.12.1; see 1342 # would have problems with GDB 7.12.1; see
1336 # <http://patchwork.sourceware.org/patch/11557/>. 1343 # <http://patchwork.sourceware.org/patch/11557/>.
1337 ival = int (val) 1344 ival = long (val)
1338 1345
1339 # For nil, yield "XIL(0)", which is easier to read than "XIL(0x0)". 1346 # For nil, yield "XIL(0)", which is easier to read than "XIL(0x0)".
1340 if not ival: 1347 if not ival: