unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Oleh Krehel <ohwoeowho@gmail.com>
Cc: eggert@cs.ucla.edu, emacs-devel@gnu.org
Subject: Re: Is it time to remove INTERNAL_FIELD?
Date: Thu, 23 Apr 2015 14:17:01 +0300	[thread overview]
Message-ID: <83pp6v14cy.fsf@gnu.org> (raw)
In-Reply-To: <878udjun89.fsf@gmail.com>

> From: Oleh Krehel <ohwoeowho@gmail.com>
> Cc: Paul Eggert <eggert@cs.ucla.edu>,  emacs-devel@gnu.org
> Date: Thu, 23 Apr 2015 12:56:38 +0200
> 
> I don't know what to do with src/.gdbinit though.

Any reference to SOMETHING_ there should be replaced with SOMETHING
now.  Otherwise GDB will say there's no field named SOMETHING_ in
such-and-such struct.  E.g., try this:

 $ cd src
 $ gdb ./emacs
 (gdb) break set_cursor_from_row
 (gdb) r -Q
 Breakpoint 3, set_cursor_from_row (w=0x17ceae8 <dumped_data+2395368>,
    row=0x52740b8, matrix=0x5273be8, delta=0, delta_bytes=0, dy=0, dvpos=0)
    at xdisp.c:14185
 14185     struct glyph *glyph = row->glyphs[TEXT_AREA];
 (gdb) p w->contents
 $2 = 16446781
 (gdb) xbuffer
 $3 = (struct buffer *) 0xfaf538
 (unsigned char *) 0xfb8a80 " *Echo Area 1*"
                            ^^^^^^^^^^^^^^^^
The highlighted part access the buffer name via the name_ field.
After your change, you will see something like this instead:

  (gdb) xbuffer
  $2 = (struct buffer *) 0xfaf538
  There is no member named name_.

More generally, src/.gdbinit defines additional commands for GDB that
are useful for debugging Emacs, and in particular there are commands
there to display Lisp objects in human-readable format, like the
'xbuffer' command I used above.  So any changes in struct field names
should be reflected there, or else those commands will become broken.



  reply	other threads:[~2015-04-23 11:17 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-23  9:55 Is it time to remove INTERNAL_FIELD? Oleh Krehel
2015-04-23 10:08 ` Paul Eggert
2015-04-23 10:10   ` Oleh Krehel
2015-04-23 10:17     ` Paul Eggert
2015-04-23 10:56       ` Eli Zaretskii
2015-04-23 10:56         ` Oleh Krehel
2015-04-23 11:17           ` Eli Zaretskii [this message]
2015-04-23 11:32             ` Oleh Krehel
2015-04-23 12:01               ` Eli Zaretskii
2015-04-23 12:05                 ` Oleh Krehel
2015-04-23 12:37                   ` Eli Zaretskii
2015-04-25 10:57                     ` Oleh Krehel
2015-04-25 11:28                       ` Eli Zaretskii
2015-04-25 14:28                         ` Stefan Monnier
2015-04-25 14:41                           ` Eli Zaretskii
2015-04-28  7:39                             ` Oleh Krehel
2015-04-28 13:20                               ` Stefan Monnier
2015-04-28 15:07                               ` Eli Zaretskii
2015-04-28 15:11                                 ` Oleh Krehel
2015-04-28 15:23                                   ` Eli Zaretskii
2015-04-28 18:58                                     ` Oleh Krehel
2015-04-28 19:21                                       ` Eli Zaretskii
2015-04-23 11:00       ` Eli Zaretskii
2015-04-23 13:24 ` Stefan Monnier
2015-04-23 13:30   ` Oleh Krehel
2015-04-23 13:53     ` Eli Zaretskii
2015-04-23 14:07       ` Oleh Krehel
2015-04-23 14:50         ` Nicolas Richard
2015-04-23 15:34           ` Eli Zaretskii
2015-04-24 10:44             ` Nicolas Richard
2015-04-23 15:29         ` Eli Zaretskii
2015-04-23 16:32           ` Oleh Krehel
2015-04-23 17:00             ` Eli Zaretskii
2015-04-23 17:09               ` Oleh Krehel
2015-04-23 17:29                 ` Eli Zaretskii
2015-04-23 17:14             ` Stefan Monnier
2015-04-23 17:31               ` Eli Zaretskii
2015-04-23 13:30 ` Stefan Monnier
2015-04-23 13:33   ` Oleh Krehel

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83pp6v14cy.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=ohwoeowho@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).