From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: The poor quality of Emacs's backtraces Date: Thu, 13 Jul 2023 16:57:52 +0200 Message-ID: <3D901B62-4826-4783-B684-968E6890E75A@gmail.com> References: Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26384"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jul 13 17:55:12 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qJyeu-0006bl-Ah for ged-emacs-devel@m.gmane-mx.org; Thu, 13 Jul 2023 17:55:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qJyeI-0005BP-Ct; Thu, 13 Jul 2023 11:54:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJxlW-0000Di-5u for emacs-devel@gnu.org; Thu, 13 Jul 2023 10:57:58 -0400 Original-Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qJxlU-000085-Ju for emacs-devel@gnu.org; Thu, 13 Jul 2023 10:57:57 -0400 Original-Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4fb960b7c9dso1498080e87.0 for ; Thu, 13 Jul 2023 07:57:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689260274; x=1691852274; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=rP1fHSCPuhm06QmNmME0PCT8dqy8nlv+UgfPMNsfK9U=; b=Q7QccjdZU4PY1PqjoFP+oTp1xhQ6cwvN1viufzQJAsBtwO0bYs/NdGxgUQc/hBQtjG mqlEkMIZTeRu8YkBhCdXqX8+QSlhGAW8UUnqe8hs/5ARKitjxCDQGalv8j/tBBbbQaI6 Mg7A6oGuia2y1GR/bwDH+X33eCBhJDGPMgIZsdemUiUPjISgtHsWAD4irJKn4j6AeqMP sFkR0VccdiPsqEYGC1uPiFVzYRXPLsL1QmxDePP/+fgXQ5RG4Aog+BVBNIMA1Wq4WJpo 0VErTkYsufT4hnkKENM3rkHIEfly5nlLusNmUv+XY4rOw+43AoL8LRdRdcCPmsLu6fPd zPzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689260274; x=1691852274; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=rP1fHSCPuhm06QmNmME0PCT8dqy8nlv+UgfPMNsfK9U=; b=N0FI6b/R4J3f8pryoxtGvGU5wvtkeFk71iun+waAUeM6PLtKo9Z3k4oQuFE4o1FcPD Uy5HlVisQUkrK+HhZk0swpqlPIAz6PM+QACM3mpSyMPfrHSni1A32xV7Ewf0jgZr9xrK fpsJjiO6eFB7sbiU3zoaJZkrAIRHaRjAVC0E11oAdMH492TVrdrikgb7fBaL4Rbe/u8e jS1L9vFTYafbZ9skxSba0hzG7IGjheWeLqgt72XkQs6hmX0wlpd/yiZPvPI6sMbNe9kZ tUfUqfZKBu9XNl1RffvlDvVC2ytJaPDn2nDo5qpKLLoksaGR2TELNUJw81tGyYJTJrSv 5lag== X-Gm-Message-State: ABy/qLaJcfCp7mj4LIyyuq9xT4w/7W8uDJCkfccXlf+Ivs3Ll2A9mDXD bhL5y4hWK00SDGj6UxpRf1+Y5Z7J6cE= X-Google-Smtp-Source: APBJJlFNm5jVah8Cc1eFXaGi304uz1cuatV34LWWhLwh//Rm65NUAmA7NMDOEMqU0ICu+we6sIf8fA== X-Received: by 2002:a05:6512:2396:b0:4fb:97d9:382b with SMTP id c22-20020a056512239600b004fb97d9382bmr1563853lfv.60.1689260273625; Thu, 13 Jul 2023 07:57:53 -0700 (PDT) Original-Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id h21-20020a197015000000b004fb76751156sm1154432lfc.157.2023.07.13.07.57.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jul 2023 07:57:53 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.15) Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=mattias.engdegard@gmail.com; helo=mail-lf1-x12d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 13 Jul 2023 11:54:32 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:307823 Archived-At: 13 juli 2023 kl. 15.35 skrev Alan Mackenzie : > (wrong-type-argument listp > #[257 "\300\211\2!\262\1\207" [yes-or-no-p] 4 > "\n\n(fn ARG124 &optional)" t]) > So, this says that _something_ wasn't a list, without telling me what = the > something was. Actually it does. It's the element after the type, in this case the = byte-compiled function #[257 ...]. > It says "wrong-type-argument", but doesn't say why it's wrong. It > doesn't disclose which primitive detected the fault, though Emacs = could > easily do this. Usually it's the topmost function in the traceback. If not, please report it as a bug. There's certainly work to be done. > test suite truncating every line at ~70 characters. (Why is this = done?) I agree, that's annoying. We have to truncate at some point or we'll be = treated to dumps of impractical size before we know it, but 70 chars is = pretty useless. > (The symbols in braces are an enhancement I'm currently working on to = give > more information for anonymous functions.) Keep us in touch, because it's very likely that some of us are working = on the same code, with similar but different goals. Don't go it alone. > It's worth pointing out that there doesn't seem to be a way to get = Emacs > to disassemble a function, only a symbol with a function value. Actually there is. Just use the function `disassemble`: (disassemble #[257 "\300\211\2!\262\1\207" [yes-or-no-p] 4 "\n\n(fn = ARG124 &optional)" t])