unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Sean Whitton <spwhitton@spwhitton.name>
To: 53058@debbugs.gnu.org
Subject: bug#53058: etc/DEBUG could say more about --enable-check-lisp-object-type
Date: Thu, 06 Jan 2022 11:20:19 -0700	[thread overview]
Message-ID: <87lezsd8v0.fsf@melete.silentflame.com> (raw)
In-Reply-To: <83v8yy9ybv.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-etc-DEBUG-Say-more-about-enable-check-lisp-object-ty.patch --]
[-- Type: text/x-patch, Size: 2139 bytes --]

From eaf40f04614063010e60d14c9ba8ba48e4b842bc Mon Sep 17 00:00:00 2001
From: Sean Whitton <spwhitton@spwhitton.name>
Date: Thu, 6 Jan 2022 11:17:44 -0700
Subject: [PATCH] etc/DEBUG: Say more about --enable-check-lisp-object-type

* etc/DEBUG: Explain how --enable-check-lisp-object-type can obstruct
certain debugging strategies.  Don't claim that this switch has no
effect on debugging with GDB.
---
 etc/DEBUG | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/etc/DEBUG b/etc/DEBUG
index dd33b42f19..6d0e27cbce 100644
--- a/etc/DEBUG
+++ b/etc/DEBUG
@@ -28,12 +28,21 @@ exceptionally hard.
 Older versions of GCC may need more than just the -g3 flag.  For more,
 search for "analyze failed assertions" below.
 
-The 2 --enable-* switches are optional.  They don't have any effect on
-debugging with GDB, but will compile additional code that might catch
-the problem you are debugging much earlier, in the form of assertion
-violation.  The --enable-checking option also enables additional
-functionality useful for debugging display problems; see more about
-this below under "Debugging Emacs redisplay problems".
+The 2 --enable-* switches are optional.  They compile additional code
+that might catch the problem you are debugging much earlier, in the
+form of assertion violation.  The --enable-checking option also
+enables additional functionality useful for debugging display
+problems; see more about this below under "Debugging Emacs redisplay
+problems".
+
+You should be aware that the --enable-check-lisp-object-type option
+changes Lisp objects from scalar values into structs, and this can
+obstruct certain debugging strategies.  In particular, asking GDB to
+compare Lisp objects might not work.  For example, consider this
+attempt to conditionalize a break point: "condition 2 NILP (foo)".  In
+this case you are requesting that GDB make the comparison "foo ==
+Qnil", and you might need to recompile without
+--enable-check-lisp-object-type for that to work.
 
 Emacs needs not be installed to be debugged, you can debug the binary
 created in the 'src' directory.
-- 
2.30.2


  parent reply	other threads:[~2022-01-06 18:20 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-30  5:28 bug#52888: 29.0.50; font_{delete_unmatched,score} do not handle nil FONT_WEIGHT_INDEX Sean Whitton
2021-12-30  7:33 ` Eli Zaretskii
2021-12-30 17:13   ` Sean Whitton
2021-12-30 18:39     ` Eli Zaretskii
2022-01-01  0:30       ` Sean Whitton
2022-01-01  2:35         ` Sean Whitton
2022-01-01  7:15           ` Eli Zaretskii
2022-01-01 22:31             ` Sean Whitton
2022-01-03  2:04               ` Sean Whitton
2022-01-05  2:10             ` Sean Whitton
2022-01-05 12:37               ` Eli Zaretskii
2022-01-05 13:55                 ` Robert Pluim
2022-01-05 14:08                   ` Eli Zaretskii
2022-01-06  5:41                 ` Sean Whitton
2022-01-06 12:29                   ` Eli Zaretskii
2022-01-06 18:10                     ` Sean Whitton
2022-01-12 14:56                       ` Eli Zaretskii
2022-01-12 21:41                         ` Sean Whitton
2022-01-13  6:52                           ` Eli Zaretskii
2022-01-01  6:56         ` Eli Zaretskii
     [not found]           ` <87pmpbm8j2.fsf@melete.silentflame.com>
     [not found]             ` <83v8z2eizk.fsf@gnu.org>
     [not found]               ` <87pmp9wyo3.fsf@melete.silentflame.com>
     [not found]                 ` <83r19pc8ax.fsf@gnu.org>
     [not found]                   ` <87v8yzb1v7.fsf@melete.silentflame.com>
     [not found]                     ` <83v8yy9ybv.fsf@gnu.org>
2022-01-06 18:20                       ` Sean Whitton [this message]
2022-01-06 20:11                         ` bug#53058: etc/DEBUG could say more about --enable-check-lisp-object-type Eli Zaretskii
2022-01-06 23:46                           ` Sean Whitton
2022-01-07  6:58                             ` Eli Zaretskii
2022-01-07 20:41                               ` Sean Whitton
2022-01-08  6:55                                 ` Eli Zaretskii
2022-02-03  0:19                                   ` Sean Whitton
2022-02-03  7:28                                     ` Eli Zaretskii
2022-01-13 11:54 ` bug#52888: André Silva
2022-01-13 16:40   ` bug#52888: Eli Zaretskii
     [not found]     ` <CANfyKeBjec0z2c33Fph1=ESr-4ACH0BNKXq_wW-Vtr6sEfJ_VA@mail.gmail.com>
2022-01-13 18:13       ` bug#52888: Eli Zaretskii
     [not found]         ` <CANfyKeD2-sP4tO0dH0rbjbyD+rR+ahiDgBn+Pnx89EG1iKqiYg@mail.gmail.com>
2022-01-13 19:49           ` bug#52888: Eli Zaretskii

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=87lezsd8v0.fsf@melete.silentflame.com \
    --to=spwhitton@spwhitton.name \
    --cc=53058@debbugs.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 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).