diff options
| author | Paul Eggert | 2017-08-28 08:38:05 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-08-28 08:38:29 -0700 |
| commit | b93a5f197e67f75f36f442060fe8fd72c6a8f888 (patch) | |
| tree | e591ab5068fc59c0d7773fc4cf8d4398aa28462e /src | |
| parent | 433cf5b2046f9b0a9f500dae1d072cc53f2a3c10 (diff) | |
| download | emacs-b93a5f197e67f75f36f442060fe8fd72c6a8f888.tar.gz emacs-b93a5f197e67f75f36f442060fe8fd72c6a8f888.zip | |
Don’t assume -g3 in .gdbinit
* src/.gdbinit (EMACS_INT_WIDTH, USE_LSB_TAG):
Use reasonable defaults if not in the symbol table.
Diffstat (limited to 'src')
| -rw-r--r-- | src/.gdbinit | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/.gdbinit b/src/.gdbinit index b5a974bb38d..21cdca5b2c0 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -1303,8 +1303,21 @@ if hasattr(gdb, 'printing'): | |||
| 1303 | 1303 | ||
| 1304 | # This implementation should work regardless of C compiler, and | 1304 | # This implementation should work regardless of C compiler, and |
| 1305 | # it should not attempt to run any code in the inferior. | 1305 | # it should not attempt to run any code in the inferior. |
| 1306 | EMACS_INT_WIDTH = int(gdb.lookup_symbol("EMACS_INT_WIDTH")[0].value()) | 1306 | |
| 1307 | USE_LSB_TAG = int(gdb.lookup_symbol("USE_LSB_TAG")[0].value()) | 1307 | # If the macros EMACS_INT_WIDTH and USE_LSB_TAG are not in the |
| 1308 | # symbol table, guess reasonable defaults. | ||
| 1309 | sym = gdb.lookup_symbol ("EMACS_INT_WIDTH")[0] | ||
| 1310 | if sym: | ||
| 1311 | EMACS_INT_WIDTH = int (sym.value ()) | ||
| 1312 | else: | ||
| 1313 | sym = gdb.lookup_symbol ("EMACS_INT")[0] | ||
| 1314 | EMACS_INT_WIDTH = 8 * sym.type.sizeof | ||
| 1315 | sym = gdb.lookup_symbol ("USE_LSB_TAG")[0] | ||
| 1316 | if sym: | ||
| 1317 | USE_LSB_TAG = int (sym.value ()) | ||
| 1318 | else: | ||
| 1319 | USE_LSB_TAG = 1 | ||
| 1320 | |||
| 1308 | GCTYPEBITS = 3 | 1321 | GCTYPEBITS = 3 |
| 1309 | VALBITS = EMACS_INT_WIDTH - GCTYPEBITS | 1322 | VALBITS = EMACS_INT_WIDTH - GCTYPEBITS |
| 1310 | Lisp_Int0 = 2 | 1323 | Lisp_Int0 = 2 |