From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: Need to get Lisp backtrace when error is in C code
Date: Tue, 03 Oct 2017 13:50:27 -0400 [thread overview]
Message-ID: <jwv60bww2fj.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: CA+OMD9jCE2W9Yg_mJwrLF7wuVzrdt0+UF4cMNHT-=ZQsPXE8vw@mail.gmail.com
> Personally, for errors like this, I would typically include the function
> name reference so that the location is obvious and users without debug
> symbols in their Emacs could still report a more useful error.
> Is this doable? A good idea?
I think it's desirable, yes. The problem is how to do it.
I guess we could try to replace `Ferror` with a C macro that pushes some
caller-info onto the Lisp backtrace before signaling the error (a bit
like we currently push some pseudo-function onto that stack trace
during garbage collection and redisplay). It won't handle the cases
where we call `Fsignal` instead, nor the cases where we call some
generic C function which then calls Ferror, so to make it really work
well, it'll require more manual work to place the caller-info at the
"right" spot.
Stefan
next prev parent reply other threads:[~2017-10-03 17:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-03 16:43 Need to get Lisp backtrace when error is in C code Robert Weiner
2017-10-03 17:01 ` Eli Zaretskii
2017-10-03 17:50 ` Stefan Monnier [this message]
2017-10-03 18:02 ` Robert Weiner
2017-10-03 19:30 ` Stefan Monnier
2017-10-03 20:58 ` Robert Weiner
2017-10-04 3:25 ` Stefan Monnier
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=jwv60bww2fj.fsf-monnier+gmane.emacs.devel@gnu.org \
--to=monnier@iro.umontreal.ca \
--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.