emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GDB and compiler-operations (was: Lisp_Marker size on 32bit systems)


From: Stefan Monnier
Subject: GDB and compiler-operations (was: Lisp_Marker size on 32bit systems)
Date: Fri, 07 Sep 2018 10:12:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> sizeof (ptrdiff_t) = 4
> sizeof (union vectorlike_header) = 4
> offsetof (struct Lisp_Vector, contents) = 4
> offsetof (struct Lisp_Sub_Char_Table, depth) == 4
> offsetof (struct Lisp_Sub_Char_Table, contents) == 12

BTW, after too many years learning to only use C functions and variables
in GDB (and not macros, CPP constants, or other compile-time-only
thingies), I only recently started to extend my GDB world.

Along the way I discovered that while `sizeof` works great, `offsetof`
gives me an error:

    No symbol "offsetof" in current context.

any idea why this is (and how to fix it)?


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]