all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
Cc: emacs-devel@gnu.org
Subject: Re: Debugging Emacs with gdba
Date: Sat, 19 Nov 2005 11:46:32 +1300	[thread overview]
Message-ID: <17278.22984.984458.436182@kahikatea.snap.net.nz> (raw)
In-Reply-To: <u3blu5bzg.fsf@gnu.org>

 > > 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 */

  reply	other threads:[~2005-11-18 22:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-18  3:36 Debugging Emacs with gdba Nick Roberts
2005-11-18 13:20 ` Eli Zaretskii
2005-11-18 22:46   ` Nick Roberts [this message]
2005-11-19 10:40     ` Eli Zaretskii
2005-11-19 23:25     ` Richard M. Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17278.22984.984458.436182@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.