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?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD Date: Sun, 14 Jul 2024 09:08:55 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19506"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Emacs Devel , Helmut Eller To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 14 09:09:38 2024 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 1sStMX-0004yW-QH for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Jul 2024 09:09:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sStLz-0001m6-41; Sun, 14 Jul 2024 03:09:03 -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 1sStLx-0001lx-DZ for emacs-devel@gnu.org; Sun, 14 Jul 2024 03:09:01 -0400 Original-Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sStLv-0001IP-N9 for emacs-devel@gnu.org; Sun, 14 Jul 2024 03:09:01 -0400 Original-Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-52e9c6b5a62so3448824e87.0 for ; Sun, 14 Jul 2024 00:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720940937; x=1721545737; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=OfyIJOawr0VoIlxpf7qwM9xHCVrL3OT55+NexEmYCmg=; b=Spn8RwrsilzpdqKorx3cV9ijj2WXBuxcPkipYeCHLwyUUKBkTKbQal/MVSCk5aRLpF yb9K79635/YXobHELuNP1jXpOP1U4J1xitzVVFw3Ka9Hg/hcUzfNlm9p4WAl7AIDpSQ8 LwdOJQab0UunZL3wtVfIGhKzM4etPNXkx0/ioB1M7QM2zI2RlNMT41/c/9vhXYtDVrVa uN9QIqSGxX43B8fkobysXuuZlgICzmEOKWZl0qxnSLdIKe4cYtSjCOPNQlLgsGO45jjY 0MpwPgffXX4OUmvr98xptxZp6yToG/6TFjKqueMYYVk7CrbzzTtzqCshbcRe/d8DpcPu BWxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720940937; x=1721545737; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=OfyIJOawr0VoIlxpf7qwM9xHCVrL3OT55+NexEmYCmg=; b=ssrwFpZA4pK/OXh8EN4p4VznEOg8eApe38J7KSLrcq+zaKjPiyTUwrbA2MQX/OR+14 gibXdRxzARbhoYXpqqNRvzGCQtXiQlpWZEgmvvmLQk8q1/+SBPrqnAg4pX3XV0YQ7ZWT 2oPy7VAc8vwXm7eiNQ6e0lN0fh3Gd1tvrZHwbk275gJc1YrjXFO5Uff6q6zC2dKEJjVP IBhlbtvK+ZUcwYkQoIG1vFjYlq5nxaIKsRsao2sRsKpGAIu/HpZ79GgQLCfZkeG4B/cR pYK2W1CV4CZ5vXtrfPjKUCFXWtykXUqC89eYU0sedbSwnWb/FxEa7eAvbNFSCVODhJ8T BQaQ== X-Gm-Message-State: AOJu0YxmCalmIRree4ufiZSiYSHf8stWjM4QzJ3nA393w1hRSm9KS4y3 uijwscFE7gn1tJw1bWvEqkpG/Xk5OIxn7lIQqhXUYTvxnocWp3/9 X-Google-Smtp-Source: AGHT+IFPS8wrELYOpRnrpJPGBz3F+q53EkoBbjVx/W7djSXMdxk5Qi4qlihbaPAnjrpfWfEZwfqYJA== X-Received: by 2002:a05:6512:3190:b0:52e:9d2c:1c86 with SMTP id 2adb3069b0e04-52eb99919d4mr11371993e87.14.1720940937257; Sun, 14 Jul 2024 00:08:57 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a395.dip0.t-ipconnect.de. [79.227.163.149]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427a0fa55afsm70307775e9.16.2024.07.14.00.08.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jul 2024 00:08:56 -0700 (PDT) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Sun, 14 Jul 2024 09:00:08 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::134; envelope-from=gerd.moellmann@gmail.com; helo=mail-lf1-x134.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 autolearn=ham autolearn_force=no X-Spam_action: no action 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:321631 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Gerd M=C3=B6llmann writes: > Yes, no GDB for macOS/arm64. I mean LLDB is okay for the usual > debugging, but in this case hm. But I don't know if GDB would do better, > either. BTW, I'm using the attached hack for LLDB debugging. It makes source buffers read-only so that one can use single-key commands and such. FWIW. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=lldbx.el Content-Transfer-Encoding: quoted-printable Content-Description: lldbx.el ;;; -*- lexical-binding: t; symbol-packages: t -*- ;; Copyright (C) 2024 Gerd M=C3=B6llmann ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions are ;; met: ;; ;; 1. Redistributions of source code must retain the above copyright ;; notice, this list of conditions and the following disclaimer. ;; ;; 2. Redistributions in binary form must reproduce the above copyright ;; notice, this list of conditions and the following disclaimer in the ;; documentation and/or other materials provided with the ;; distribution. ;; ;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ;; IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ;; TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ;; PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ;; HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ;; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ;; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ;; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ;; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;; Additional support for working with LLDB. Source files being ;; debugged are real-only, and commands are invoked with ;; single-letter keys, or with a transient. ;; - display / undisplay (require 'gud) (require 'transient) (defun lldbx-quit () "Disable LLDBX mode in all buffers of the same session." (interactive) (let ((gud-buf gud-comint-buffer)) (dolist (buf (buffer-list)) (with-current-buffer buf (when (and (eq gud-comint-buffer gud-buf) (bound-and-true-p lldbx-mode)) (lldbx-mode -1)))))) (defun lldbx-goto-lldb () "Switch to the buffer running LLDB in left side window." (interactive) (display-buffer gud-comint-buffer '(nil (inhibit-same-window . t)))) ;; Repeat-mode will offer to repeat gut-* commands, which is not ;; helpful. Use our own symbols without the repeat property. (defalias 'lldbx-continue 'gud-cont) (defalias 'lldbx-finish 'gud-finish) (defalias 'lldbx-run-to-here 'gud-until) (defalias 'lldbx-nexti 'gud-nexti) (defalias 'lldbx-stepi 'gud-stepi) (defalias 'lldbx-next 'gud-next) (defalias 'lldbx-step 'gud-step) (defalias 'lldbx-set-breakpoint 'gud-break) (defalias 'lldbx-delete-breakpoint 'gud-remove) (defalias 'lldbx-down 'gud-down) (defalias 'lldbx-up 'gud-up) (defalias 'lldbx-pstar 'gud-pstar) (defalias 'lldbx-print 'gud-print) (defalias 'lldbx-print-lisp-object 'gud-pv) (defalias 'lldbx-run 'gud-run) ;;; Some additional commands for LLDB. (gud-def lldbx-backtrace "bt %p" nil) (gud-def lldbx-xbacktrace "xbacktrace" nil) (gud-def lldbx-frame "f %p" nil) (gud-def lldbx-list-breakpoints "break list" nil) (gud-def lldbx-kill-process "process kill" nil) (gud-def lldbx-vars "var" nil) (gud-def lldbx-set-temporary-breakpoint "_regexp-tbreak %f:%l" nil) (defun lldbx-command (cmd) "Run an LLDB command read from the minibuffer." (interactive "MLLDB command: ") (gud-basic-call cmd)) (transient-define-prefix lldbx-transient () "Gud commands plus extras for LLDB." [:level 1 ["Run" ("c" "Continue" lldbx-continue) ("f" "Finish" lldbx-finish) ("h" "Goto here" lldbx-run-to-here) ("in" "Next instr" lldbx-nexti) ("is" "Step instr" lldbx-stepi) ("n" "Next" lldbx-next) ("s" "Step" lldbx-step)] ["Breakpoint" ("bb" "Set" lldbx-set-breakpoint) ("bd" "Delete" lldbx-delete-breakpoint) ("bl" "List" lldbx-list-breakpoints) ("bt" "Set temporary" lldbx-set-temporary-breakpoint)] ["Frame" ("t" "Backtrace" lldbx-backtrace) ("d" "Down" lldbx-down) ("g" "Goto frame>" lldbx-frame) ("u" "Up" lldbx-up) ("x" "xbacktrace" lldbx-xbacktrace)] ["Print" ("*" "Print *expr" lldbx-pstar) ("p" "Print expr" lldbx-print) ("v" "Variables" lldbx-vars) ("o" "Print Lisp var" lldbx-print-lisp-object)] ["Misc" ("k" "Kill process" lldbx-kill-process) ("l" "Goto LLDB buffer" lldbx-goto-lldb) ("y" "Run any command" lldbx-command) ("q" "Quit LLDBX" lldbx-quit) ("r" "Run process" lldbx-run)]]) (define-minor-mode lldbx-mode "Minor mode for read-only source buffers in LLDB." :lighter " =E2=9A=A0=EF=B8=8F" :keymap '((" " . lldbx-command) ("?" . lldbx-transient) ("*" . lldbx-pstar) ("0" . digit-argument) ("1" . digit-argument) ("2" . digit-argument) ("3" . digit-argument) ("4" . digit-argument) ("5" . digit-argument) ("6" . digit-argument) ("7" . digit-argument) ("8" . digit-argument) ("9" . digit-argument) ("bb" . lldbx-set-breakpoint) ("bd" . lldbx-delete-breakpoint) ("bl" . lldbx-list-breakpoints) ("bt" . lldbx-set-temporary-breakpoint) ("c" . lldbx-continue) ("d" . lldbx-down) ("f" . lldbx-finish) ("h" . lldbx-run-to-here) ("in" . lldbx-nexti) ("is" . lldbx-stepi) ("k" . lldbx-kill-process) ("l" . lldbx-goto-lldb) ("g" . lldbx-frame) ("n" . lldbx-next) ("o" . lldbx-print-lisp-object) ("p" . lldbx-print) ("q" . lldbx-quit) ("r" . lldbx-run) ("s" . lldbx-step) ("t" . lldbx-backtrace) ("u" . lldbx-up) ("v" . lldbx-vars) ("x" . lldbx-xbacktrace) ("y" . lldbx-command)) (setq buffer-read-only (not (null lldbx-mode)))) ;; Adtivate the mode when Gud finds files. (defun lldbx-find-file (orig-fun &rest args) (let ((buf (apply orig-fun args))) (when buf (with-current-buffer buf (unless lldbx-mode (lldbx-mode 1)))) buf)) ;; Deactivate the mode when LLDB finishes (defun lldbx-reset (orig-fun &rest args) (let ((val (apply orig-fun args))) (lldbx-quit) val)) ;; Make Gud reuse windows. (defun lldbx-display-line (orig-fun &rest args) (let* ((true-file (car args)) (buf (with-current-buffer gud-comint-buffer (gud-find-file true-file)))) (when (and buf (null (get-buffer-window buf)) (not (eq (current-buffer) gud-comint-buffer))) ;; The file is not yet displayed in a window. Make it so that it ;; is displayed in the selected window, so that Gud can find it. ;; Do this only if we are not in the Gud buffer itself. (set-window-buffer nil buf))) (apply orig-fun args)) (advice-add 'gud-find-file :around #'lldbx-find-file) (advice-add 'gud-reset :around #'lldbx-reset) (advice-add 'gud-display-line :around #'lldbx-display-line) ;; Gud doesn't like read-only prompts, which should be fixed, but I ;; don't want to spend time on that. (add-hook 'lldb-mode-hook #'(lambda () (setq-local comint-prompt-read-only nil))) (provide 'lldbx) --=-=-=--