From 304f18ae16912be803cdb088d29383e88efee078 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 8 Jun 2024 15:04:28 -0700 Subject: [PATCH] gdb vs 'gi' I was trying to examine gi.invent (via print ((struct instance_globals_i *)&gi).invent don't ask...) and gdb gave me very confusing rejections that don't occur with other g.variables. It turned out that gdb was treating 'gi' as a type rather than as a variable reference. I suspect it was because Qt was included so linking used C++ mode, and C++ handles struct names differently from C. Anyway, renaming 'struct gi' to 'struct glyphinfo' made the mystery problem go away. --- include/wintype.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wintype.h b/include/wintype.h index ee72bd6e0..e455eae91 100644 --- a/include/wintype.h +++ b/include/wintype.h @@ -1,4 +1,4 @@ -/* NetHack 3.7 wintype.h $NHDT-Date: 1700470031 2023/11/20 08:47:11 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.46 $ */ +/* NetHack 3.7 wintype.h $NHDT-Date: 1717880364 2024/06/08 20:59:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.52 $ */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ @@ -96,7 +96,7 @@ typedef struct glyph_map_entry { g_info initialization in display.c nul_glyphinfo initialization in display.c */ -typedef struct gi { +typedef struct glyphinfo { int glyph; /* the display entity */ int ttychar; uint32 framecolor;