From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Is it time to remove INTERNAL_FIELD? Date: Thu, 23 Apr 2015 14:17:01 +0300 Message-ID: <83pp6v14cy.fsf@gnu.org> References: <87lhhjuq26.fsf@gmail.com> <5538C48F.2020005@cs.ucla.edu> <87fv7rupcc.fsf@gmail.com> <5538C6C0.2000609@cs.ucla.edu> <83sibr15ac.fsf@gnu.org> <878udjun89.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1429787841 8311 80.91.229.3 (23 Apr 2015 11:17:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Apr 2015 11:17:21 +0000 (UTC) Cc: eggert@cs.ucla.edu, emacs-devel@gnu.org To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 23 13:17:13 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YlF83-0001R3-Lo for ged-emacs-devel@m.gmane.org; Thu, 23 Apr 2015 13:17:11 +0200 Original-Received: from localhost ([::1]:39509 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlF82-0007N1-Vj for ged-emacs-devel@m.gmane.org; Thu, 23 Apr 2015 07:17:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlF7z-0007Mk-Lw for emacs-devel@gnu.org; Thu, 23 Apr 2015 07:17:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlF7t-0004Ct-W4 for emacs-devel@gnu.org; Thu, 23 Apr 2015 07:17:07 -0400 Original-Received: from mtaout26.012.net.il ([80.179.55.182]:58414) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlF7t-0004Ce-Nl for emacs-devel@gnu.org; Thu, 23 Apr 2015 07:17:01 -0400 Original-Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NN900400BENDE00@mtaout26.012.net.il> for emacs-devel@gnu.org; Thu, 23 Apr 2015 14:18:35 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NN900POXBEZ0G30@mtaout26.012.net.il>; Thu, 23 Apr 2015 14:18:35 +0300 (IDT) In-reply-to: <878udjun89.fsf@gmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:185803 Archived-At: > From: Oleh Krehel > Cc: Paul Eggert , 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 , 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.