GNU bug report logs - #53058
etc/DEBUG could say more about --enable-check-lisp-object-type

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Thu, 6 Jan 2022 18:21:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53058 in the body.
You can then email your comments to 53058 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#53058; Package emacs. (Thu, 06 Jan 2022 18:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sean Whitton <spwhitton <at> spwhitton.name>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 06 Jan 2022 18:21:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: bug-gnu-emacs <at> gnu.org
Subject: etc/DEBUG could say more about --enable-check-lisp-object-type
Date: Thu, 06 Jan 2022 11:20:19 -0700
[Message part 1 (text/plain, inline)]
Hello,

On Wed 05 Jan 2022 at 02:11PM +02, Eli Zaretskii wrote:

> Comparisons with structures, like foo == Qnil, aren't guaranteed to
> work in GDB.  --enable-check-lisp-object-type makes Lisp objects be
> structures rather than simple scalar values.

Thanks -- how about the attached?

-- 
Sean Whitton
[0001-etc-DEBUG-Say-more-about-enable-check-lisp-object-ty.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53058; Package emacs. (Thu, 06 Jan 2022 20:12:01 GMT) Full text and rfc822 format available.

Message #8 received at 53058 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 53058 <at> debbugs.gnu.org
Subject: Re: bug#53058: etc/DEBUG could say more about
 --enable-check-lisp-object-type
Date: Thu, 06 Jan 2022 22:11:15 +0200
> From: Sean Whitton <spwhitton <at> spwhitton.name>
> Date: Thu, 06 Jan 2022 11:20:19 -0700
> 
> > Comparisons with structures, like foo == Qnil, aren't guaranteed to
> > work in GDB.  --enable-check-lisp-object-type makes Lisp objects be
> > structures rather than simple scalar values.
> 
> Thanks -- how about the attached?

Thanks, but the text there is inaccurate: NILP should still work with
structures, only == comparison probably won't.

I'm actually not sure we should describe such subtleties in etc/DEBUG.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53058; Package emacs. (Thu, 06 Jan 2022 23:47:01 GMT) Full text and rfc822 format available.

Message #11 received at 53058 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 53058 <at> debbugs.gnu.org
Subject: Re: bug#53058: etc/DEBUG could say more about
 --enable-check-lisp-object-type
Date: Thu, 06 Jan 2022 16:46:24 -0700
Hello,

On Thu 06 Jan 2022 at 10:11PM +02, Eli Zaretskii wrote:

>> From: Sean Whitton <spwhitton <at> spwhitton.name>
>> Date: Thu, 06 Jan 2022 11:20:19 -0700
>>
>> > Comparisons with structures, like foo == Qnil, aren't guaranteed to
>> > work in GDB.  --enable-check-lisp-object-type makes Lisp objects be
>> > structures rather than simple scalar values.
>>
>> Thanks -- how about the attached?
>
> Thanks, but the text there is inaccurate: NILP should still work with
> structures, only == comparison probably won't.
>
> I'm actually not sure we should describe such subtleties in etc/DEBUG.

Fair -- what do you think about just saying that certain gdb features
might not work, so one thing that you can try is to drop the flag?  The
claim that it doesn't affect debugging at all is what threw me off
recently, so that's the thing I'd really like to improve, I guess.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53058; Package emacs. (Fri, 07 Jan 2022 06:59:01 GMT) Full text and rfc822 format available.

Message #14 received at 53058 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 53058 <at> debbugs.gnu.org
Subject: Re: bug#53058: etc/DEBUG could say more about
 --enable-check-lisp-object-type
Date: Fri, 07 Jan 2022 08:58:40 +0200
> From: Sean Whitton <spwhitton <at> spwhitton.name>
> Cc: 53058 <at> debbugs.gnu.org
> Date: Thu, 06 Jan 2022 16:46:24 -0700
> 
> Hello,
> 
> On Thu 06 Jan 2022 at 10:11PM +02, Eli Zaretskii wrote:
> 
> >> From: Sean Whitton <spwhitton <at> spwhitton.name>
> >> Date: Thu, 06 Jan 2022 11:20:19 -0700
> >>
> >> > Comparisons with structures, like foo == Qnil, aren't guaranteed to
> >> > work in GDB.  --enable-check-lisp-object-type makes Lisp objects be
> >> > structures rather than simple scalar values.
> >>
> >> Thanks -- how about the attached?
> >
> > Thanks, but the text there is inaccurate: NILP should still work with
> > structures, only == comparison probably won't.
> >
> > I'm actually not sure we should describe such subtleties in etc/DEBUG.
> 
> Fair -- what do you think about just saying that certain gdb features
> might not work, so one thing that you can try is to drop the flag?  The
> claim that it doesn't affect debugging at all is what threw me off
> recently, so that's the thing I'd really like to improve, I guess.

But it really doesn't affect the debugging.  You just need to
understand what it does, and if we describe this in etc/DEBUG, we'd
need to describe gobs of other similar factoids about the various
build options.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53058; Package emacs. (Fri, 07 Jan 2022 20:43:01 GMT) Full text and rfc822 format available.

Message #17 received at 53058 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 53058 <at> debbugs.gnu.org
Subject: Re: bug#53058: etc/DEBUG could say more about
 --enable-check-lisp-object-type
Date: Fri, 07 Jan 2022 13:41:52 -0700
Hello,

On Fri 07 Jan 2022 at 08:58AM +02, Eli Zaretskii wrote:

> But it really doesn't affect the debugging.  You just need to
> understand what it does, and if we describe this in etc/DEBUG, we'd
> need to describe gobs of other similar factoids about the various
> build options.

Well, it doesn't affect the debugging in the way that the CFLAGS
discussed there do, sure, but from a less experienced gdb user's point
of view, it does indeed affect the debugging.  In my case, I encountered
a problem setting a conditional break point, and I wouldn't have even
considered revisiting that flag because I had just read text which I
took to be telling me that the flag wasn't connected with the way gdb
works.  I had to wait for your input to learn that it is connected, in a
relevant sense.

To me, conditionalising break points is a fundamental debugging action,
something that a beginner is likely to want to do.  And it's Emacs, so
chances are those conditions will involve Lisp objects.  So having
instructions aimed at someone just getting started telling you to use a
flag which makes that basic debugging action much less likely to work
seems worth improving.  Do you have any other ideas as to how that could
be done?

Thanks.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53058; Package emacs. (Sat, 08 Jan 2022 06:56:01 GMT) Full text and rfc822 format available.

Message #20 received at 53058 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 53058 <at> debbugs.gnu.org
Subject: Re: bug#53058: etc/DEBUG could say more about
 --enable-check-lisp-object-type
Date: Sat, 08 Jan 2022 08:55:18 +0200
> From: Sean Whitton <spwhitton <at> spwhitton.name>
> Cc: 53058 <at> debbugs.gnu.org
> Date: Fri, 07 Jan 2022 13:41:52 -0700
> 
> To me, conditionalising break points is a fundamental debugging action,
> something that a beginner is likely to want to do.  And it's Emacs, so
> chances are those conditions will involve Lisp objects.  So having
> instructions aimed at someone just getting started telling you to use a
> flag which makes that basic debugging action much less likely to work
> seems worth improving.  Do you have any other ideas as to how that could
> be done?

The reasons for the problem in your case is not known: NILP should
have worked, as did the comparison with Qnil.  Until we understand why
those didn't work, I don't see how we can say anything in etc/DEBUG
that would both be useful and important/general enough to have there.

My best advice is to try to understand why those conditions didn't
work on your system.  Maybe someone here knowns, or maybe you should
ask on the GDB mailing list (gdb <at> sourceware.org).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53058; Package emacs. (Thu, 03 Feb 2022 00:20:02 GMT) Full text and rfc822 format available.

Message #23 received at 53058 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 53058 <at> debbugs.gnu.org
Subject: Re: bug#53058: etc/DEBUG could say more about
 --enable-check-lisp-object-type
Date: Wed, 02 Feb 2022 17:19:04 -0700
Hello,

On Sat 08 Jan 2022 at 08:55am +02, Eli Zaretskii wrote:

> The reasons for the problem in your case is not known: NILP should
> have worked, as did the comparison with Qnil.  Until we understand why
> those didn't work, I don't see how we can say anything in etc/DEBUG
> that would both be useful and important/general enough to have there.
>
> My best advice is to try to understand why those conditions didn't
> work on your system.  Maybe someone here knowns, or maybe you should
> ask on the GDB mailing list (gdb <at> sourceware.org).

If I understand you correctly: we don't yet know exactly what was going
wrong on my machine when I tried to set the conditional break point, so
we lack a concrete case in which --enable-check-lisp-object-type
affected debugging with GDB, and we are thus not in a position to assert
in etc/DEBUG that --enable-check-lisp-object-type has the potential to
have an effect on debugging with gdb?

When you wrote that comparisons with structs are not guaranteed to work
with gdb, you were /not/ going as far as saying that comparisons with
structs are never expected to work (because that would imply that
--enable-check-lisp-object-type would often lead to issues when
debugging)?

If this summary is right, I think this bug should be closed.

Thanks.

-- 
Sean Whitton




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 03 Feb 2022 07:29:02 GMT) Full text and rfc822 format available.

Notification sent to Sean Whitton <spwhitton <at> spwhitton.name>:
bug acknowledged by developer. (Thu, 03 Feb 2022 07:29:02 GMT) Full text and rfc822 format available.

Message #28 received at 53058-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 53058-done <at> debbugs.gnu.org
Subject: Re: bug#53058: etc/DEBUG could say more about
 --enable-check-lisp-object-type
Date: Thu, 03 Feb 2022 09:28:49 +0200
> From: Sean Whitton <spwhitton <at> spwhitton.name>
> Cc: 53058 <at> debbugs.gnu.org
> Date: Wed, 02 Feb 2022 17:19:04 -0700
> 
> Hello,
> 
> On Sat 08 Jan 2022 at 08:55am +02, Eli Zaretskii wrote:
> 
> > The reasons for the problem in your case is not known: NILP should
> > have worked, as did the comparison with Qnil.  Until we understand why
> > those didn't work, I don't see how we can say anything in etc/DEBUG
> > that would both be useful and important/general enough to have there.
> >
> > My best advice is to try to understand why those conditions didn't
> > work on your system.  Maybe someone here knowns, or maybe you should
> > ask on the GDB mailing list (gdb <at> sourceware.org).
> 
> If I understand you correctly: we don't yet know exactly what was going
> wrong on my machine when I tried to set the conditional break point, so
> we lack a concrete case in which --enable-check-lisp-object-type
> affected debugging with GDB, and we are thus not in a position to assert
> in etc/DEBUG that --enable-check-lisp-object-type has the potential to
> have an effect on debugging with gdb?

Yes.

> When you wrote that comparisons with structs are not guaranteed to work
> with gdb, you were /not/ going as far as saying that comparisons with
> structs are never expected to work (because that would imply that
> --enable-check-lisp-object-type would often lead to issues when
> debugging)?

Yes.

> If this summary is right, I think this bug should be closed.

OK, closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 03 Mar 2022 12:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 48 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.