From: Robert Weiner <rsw@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Need to get Lisp backtrace when error is in C code
Date: Tue, 3 Oct 2017 14:02:28 -0400 [thread overview]
Message-ID: <CA+OMD9iCkzd3eM_5PkOuY__upisQxMuceB34yCzBRBFcjGO5_A@mail.gmail.com> (raw)
In-Reply-To: <jwv60bww2fj.fsf-monnier+gmane.emacs.devel@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1219 bytes --]
On Tue, Oct 3, 2017 at 1:50 PM, Stefan Monnier <monnier@iro.umontreal.ca>
wrote:
> > 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.
>
Even just showing the Lisp backtrace by itself with some note that
the error was raised in C code would narrow down the location tremendously
I think.
> 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.
>
A full solution would be a big win.
Bob
[-- Attachment #2: Type: text/html, Size: 3196 bytes --]
next prev parent reply other threads:[~2017-10-03 18:02 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
2017-10-03 18:02 ` Robert Weiner [this message]
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=CA+OMD9iCkzd3eM_5PkOuY__upisQxMuceB34yCzBRBFcjGO5_A@mail.gmail.com \
--to=rsw@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=rswgnu@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 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.