[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Debugging Emacs with gdba
From: |
Nick Roberts |
Subject: |
Re: Debugging Emacs with gdba |
Date: |
Sat, 19 Nov 2005 11:46:32 +1300 |
> > When the cursor is over a value in the speedbar, the tooltip now displays
> > the data type. Unfortunately for lisp objects it displays "int". It
> > would be nice if it displayed Lisp_Object. I don't know how to get it to
> > do this, though.
>
> Does your debug info format support macro expansion? If it does, you
> could try using the `macro *' commands in GDB to display Lisp_Object.
In fact by using a macro for Lisp_Object, the information is lost. If I
make the change below, it works. I think this change is right, in any
case. If Lisp_Object is a union, its done this way. And it's generally
useful. Debugging with GDB from the command line, if you are unsure what
a variable is representing, you can type:
(gdb) whatis new
type = Lisp_Object
instead of getting
(gdb) whatis new
type = int
Is it OK to install this patch?
Nick
*** lisp.h 16 Nov 2005 08:02:46 +1300 1.545
--- lisp.h 19 Nov 2005 11:28:51 +1300
***************
*** 253,259 ****
/* If union type is not wanted, define Lisp_Object as just a number. */
#ifdef NO_UNION_TYPE
! #define Lisp_Object EMACS_INT
#define LISP_MAKE_RVALUE(o) (0+(o))
#endif /* NO_UNION_TYPE */
--- 253,259 ----
/* If union type is not wanted, define Lisp_Object as just a number. */
#ifdef NO_UNION_TYPE
! typedef EMACS_INT Lisp_Object;
#define LISP_MAKE_RVALUE(o) (0+(o))
#endif /* NO_UNION_TYPE */