From: Helmut Eller <eller.helmut@gmail.com>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 15101@debbugs.gnu.org
Subject: bug#15101: 24.3.50; debugger-eval-expression broken
Date: Fri, 16 Aug 2013 19:03:35 +0200 [thread overview]
Message-ID: <m2siy9k1p4.fsf@gmail.com> (raw)
In-Reply-To: <jwvmwohipu9.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 16 Aug 2013 12:14:23 -0400")
On Fri, Aug 16 2013, Stefan Monnier wrote:
>> If we go to the line "foo(10)" I would expect that n is 10. With your
>> definition n is 11. I would argue that your version is confusing.
>
> I think the problem comes from the fact that contrary to traditional
> debuggers, we don't have the "line-number info".
>
> In a traditional debugger, you'd have "foo(10) at foo.el:25", pointing
> out exactly where you are inside `foo'. Whereas in Elisp backtraces you
> only have "the expression that was being evaluated", so "foo(10)"
> doesn't tell you where you were inside `foo', instead it tells you that
> you were somewhere where a call to `(foo 10) was made.
In this example, there are two positions of interest:
1. for the newest stack frame, the one that looks like foo(0), the
"instruction pointer" would be at the callsite for debug.
2. for all other stack frames of the form foo(X) the instruction
pointer would be at the same location: the (recursive) callsite for
foo.
Are there any other places that foo(X) could possibly denote? I think
not. So, what value has n at position 1?
>
>> Can you give an example of what would be weird with this change:
> [...]
>> - (condition-case nil (1+ (debugger-frame-number 'skip-base))
>> + (condition-case nil (debugger-frame-number 'skip-base)
>
> I started with this, but found it very weird for example with things like
>
> (let ((x (toto)) (y (titi))) (tata))
>
> where you'd naturally expect to be able to find the value of `x' or `y',
> but that's only true if the debugger was called from `tata'. If instead
> the debugger was called from within `toto' or `titi', `x' and `y' aren't
> bound yet.
The 1+ doesn't solve/change that problem, does it?
Helmut
next prev parent reply other threads:[~2013-08-16 17:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-15 11:39 bug#15101: 24.3.50; debugger-eval-expression broken Helmut Eller
2013-08-15 14:45 ` Stefan Monnier
2013-08-15 15:06 ` Drew Adams
2013-08-15 16:37 ` Stefan Monnier
2013-08-15 17:03 ` Drew Adams
2013-08-15 17:16 ` Helmut Eller
2013-08-15 20:30 ` Stefan Monnier
2013-08-16 5:27 ` Helmut Eller
2013-08-16 16:14 ` Stefan Monnier
2013-08-16 17:03 ` Helmut Eller [this message]
2013-08-15 17:21 ` Stefan Monnier
2013-08-15 17:47 ` Drew Adams
2013-08-15 20:27 ` Stefan Monnier
2013-08-15 21:12 ` Drew Adams
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=m2siy9k1p4.fsf@gmail.com \
--to=eller.helmut@gmail.com \
--cc=15101@debbugs.gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/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).