Subject: Re: bug#12036: 24.1.50; xvectype and xpr broken by change in PVEC_TYPE_MASK when macro information not available

From: Eli Zaretskii <[email-masked]>
Date: Thu, 26 Jul 2012 23:10:19 +0300

> Date: Thu, 26 Jul 2012 11:46:08 -0700
> From: Paul Eggert <[email-masked]>
> CC: [email-masked]
> 
> >   (gdb) xtype
> >   Lisp_Vectorlike
> >   No enum type named pvec_type.
> 
> I expect that I don't have this problem because the bug has been fixed
> in my tools (GCC 4.7.1 + GDB 7.4.1).  I tried to work around the problem
> by putting this line into lisp.h:
> 
> PUBLISH_TO_GDB ((enum pvec_type) 0);  /* This also publishes PVEC_*.  */
> 
> but I can't easily test this, since my tools don't have the problem.
> Could you please try it?  And if it doesn't work, could you
> please try adding lines like this:
> 
> PUBLISH_TO_GDB (PVEC_TYPE_MASK);
> 
> for values like PVEC_TYPE_MASK that do not otherwise work for you?

Unfortunately, with my ancient version of GCC, I don't even get past
CHECK_LISP_OBJECT_TYPE in xgetptr:

  .gdbinit:1197: Error in sourced command file:
  No symbol "CHECK_LISP_OBJECT_TYPE" in current context.

Looks like PUBLISH_TO_GDB is not doing the trick here.

Anyway, with tricky macros such as PUBLISH_TO_GDB, I'd think that
going back to using variables whose type is the enum would be better,
don't you think?  We could modify PUBLISH_TO_GDB to do that.