From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: p.stephani2@gmail.com, emacs-devel@gnu.org
Subject: Re: Enabling --enable-check-lisp-object-type by default on x86 and AMD64
Date: Wed, 3 May 2017 11:08:23 -0700 [thread overview]
Message-ID: <777fd9a2-232a-e52c-0a51-3d287567fb2e@cs.ucla.edu> (raw)
In-Reply-To: <83shkmgfnh.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1107 bytes --]
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.
[-- Attachment #2: gdb-pretty.py --]
[-- Type: text/x-python, Size: 524 bytes --]
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)
next prev parent reply other threads:[~2017-05-03 18:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <m2shl134rd.fsf@gmail.com>
[not found] ` <83mvb8riq0.fsf@gnu.org>
[not found] ` <CAArVCkQoeBwHspkUUih_9EdwnBQ5HWaYHD87Rcyduc8DsooXRg@mail.gmail.com>
[not found] ` <83a878r2d0.fsf@gnu.org>
2017-05-01 11:32 ` Enabling --enable-check-lisp-object-type by default on x86 and AMD64 (was: Re: bug#26597: 25.1; Compilation error on master with --enable-check-lisp-object-type) Philipp Stephani
2017-05-02 22:14 ` Enabling --enable-check-lisp-object-type by default on x86 and AMD64 Paul Eggert
2017-05-03 2:38 ` Eli Zaretskii
2017-05-03 3:24 ` Paul Eggert
2017-05-03 14:48 ` Eli Zaretskii
2017-05-03 18:08 ` Paul Eggert [this message]
2017-05-03 18:22 ` Eli Zaretskii
2017-05-04 14:33 ` Eli Zaretskii
2017-05-05 23:23 ` Paul Eggert
2017-05-06 7:07 ` Eli Zaretskii
2017-05-06 23:23 ` Paul Eggert
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=777fd9a2-232a-e52c-0a51-3d287567fb2e@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=p.stephani2@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).