From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Enabling --enable-check-lisp-object-type by default on x86 and AMD64 Date: Wed, 3 May 2017 11:08:23 -0700 Organization: UCLA Computer Science Department Message-ID: <777fd9a2-232a-e52c-0a51-3d287567fb2e@cs.ucla.edu> References: <83mvb8riq0.fsf@gnu.org> <83a878r2d0.fsf@gnu.org> <60379b71-bd6a-5f6f-dec1-523d6f4b2016@cs.ucla.edu> <83vapihdgs.fsf@gnu.org> <83shkmgfnh.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------C06DA8643F81AD12592F22DE" X-Trace: blaine.gmane.org 1493834968 24175 195.159.176.226 (3 May 2017 18:09:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 3 May 2017 18:09:28 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 Cc: p.stephani2@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 03 20:09:22 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5yiH-00065m-5i for ged-emacs-devel@m.gmane.org; Wed, 03 May 2017 20:09:21 +0200 Original-Received: from localhost ([::1]:38081 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5yiJ-0005fi-Lz for ged-emacs-devel@m.gmane.org; Wed, 03 May 2017 14:09:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5yhV-0005dy-Ff for emacs-devel@gnu.org; Wed, 03 May 2017 14:08:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d5yhU-0005qJ-K8 for emacs-devel@gnu.org; Wed, 03 May 2017 14:08:33 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:45420) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d5yhP-0005oo-1Z; Wed, 03 May 2017 14:08:27 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4BFDA16006B; Wed, 3 May 2017 11:08:25 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id izkXnwTNKdOb; Wed, 3 May 2017 11:08:24 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 78D96160076; Wed, 3 May 2017 11:08:24 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id iwKiW71Kj1Cc; Wed, 3 May 2017 11:08:24 -0700 (PDT) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 17AE016006B; Wed, 3 May 2017 11:08:24 -0700 (PDT) In-Reply-To: <83shkmgfnh.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:214546 Archived-At: This is a multi-part message in MIME format. --------------C06DA8643F81AD12592F22DE Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 05/03/2017 07:48 AM, Eli Zaretskii wrote: >> Would it help to add a line "set print frame-arguments all" to >> src/.gdbinit? > Only partially. People who report backtraces seldom bother to start > GDB from the Emacs's src directory, let alone source .gdbinit by hand. > Moreover, latest versions of GDB refuse to auto-load .gdbinit files > from random directories, unless you put some magic in your ~/.gdbinit > (which most people don't). This problem is not new. It should be OK to continue ask developers to source .gdbinit, to compile with -O0, etc. If we can't assume that, the backtrace is already problematic, and the recent change doesn't make it much worse. > this setting doesn't affect only > Lisp_Object, it affects any non-scalar arguments, so it has > non-trivial downsides of its own (which I guess is why it is not the > default). True. How about using GDB pretty-printers instead? E.g., add something like the attached file as src/gdb-pretty.py, and add the line "source gdb-pretty.py" to src/.gdbinit. That way, only Lisp_Object values are affected, rather than all structs. --------------C06DA8643F81AD12592F22DE Content-Type: text/x-python; name="gdb-pretty.py" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gdb-pretty.py" import gdb import gdb.printing class Lisp_Object_Printer: def __init__(self, val): self.val = val def to_string(self): return str (self.val["i"]) + "L" def build_pretty_printer (): pp = gdb.printing.RegexpCollectionPrettyPrinter ("Emacs") pp.add_printer ('Lisp_Object', '^Lisp_Object$', Lisp_Object_Printer) return pp gdb.printing.register_pretty_printer (gdb.current_objfile (), build_pretty_printer (), 1) --------------C06DA8643F81AD12592F22DE--