From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#66575: [PATCH] Gud lldb support Date: Tue, 17 Oct 2023 11:00:35 +0200 Message-ID: <19FFB7CA-6501-4E62-9EC6-D5F2DB680D70@gmail.com> References: <7A4E9221-C0A4-4A98-A80A-5FD58C95C014@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40774"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66575@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 17 11:02:00 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qsfxf-000AN0-4G for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Oct 2023 11:01:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsfxY-0005pP-AL; Tue, 17 Oct 2023 05:01:52 -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 1qsfxK-0005jz-Bn for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2023 05:01:43 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qsfxJ-0003bc-AO for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2023 05:01:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qsfxi-0006Tw-I2 for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2023 05:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Oct 2023 09:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66575 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66575-submit@debbugs.gnu.org id=B66575.169753327124614 (code B ref 66575); Tue, 17 Oct 2023 09:02:02 +0000 Original-Received: (at 66575) by debbugs.gnu.org; 17 Oct 2023 09:01:11 +0000 Original-Received: from localhost ([127.0.0.1]:58575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsfwt-0006Ov-3m for submit@debbugs.gnu.org; Tue, 17 Oct 2023 05:01:11 -0400 Original-Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]:45383) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsfwq-0006OT-M1 for 66575@debbugs.gnu.org; Tue, 17 Oct 2023 05:01:09 -0400 Original-Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2c5039d4e88so59918831fa.3 for <66575@debbugs.gnu.org>; Tue, 17 Oct 2023 02:00:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697533237; x=1698138037; darn=debbugs.gnu.org; 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=91G+BMn/mhp/hhHp2vD3rEQvQbMRH9RPxkNdDnUsb+o=; b=bcrIYKWS9oB0M3HmjNTWyLxDgkWh3EInhCUh0ZW1J8ygcXG3ReceqvbOClXKFd6Lnj x1m3GEZj045QQsDrrkBDVwISHGmM+0ZWqpdUdmsvqvtniDxHy2WqvsH6ail/Gr6y3DpT XNjZiGTprRDRleifSbGBdoSzxlTxgt8hcOV2jfN5/nxeHdFWqF7urSxQTo6IyAznbius Pg8stYzA2PpRRS/F9p41MCNvol3jINJii49A/feD+D3kXCOc/4BKfDq6Y361QzgmojFE 86poXiPnW+ZkojzjFpLrEPhJCzRw2jnkYkonl59H+R2rkR0rGRZck7IwVkG2fDJkno3u L5hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697533237; x=1698138037; 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=91G+BMn/mhp/hhHp2vD3rEQvQbMRH9RPxkNdDnUsb+o=; b=bM0G8RYclnthNFL2c9sT5R8KZzUVtnASQwVj8zW9NDvK6EGXaH3YSbylLCa+BU96oo /Aepd3EjVJBr1N2HVEUAjBzKzXYWUCBJrKvv4nYhRtMxdcaGPYiDt7+1HZM1UmGVja9Z XLAnhKqfxUbVbegMgLYLIA5n21Rrkwpxs7AB1/OG2XZSrZDq6Pz4i+wegBtELUK/M1On FFlSuc17y7L/ZA4YBzb9L6nJm4Fd/+URZQYoVTKlaaeJimuiRcOvZv+bKPo52H1B4xsN 9FnlnbPHGt0PdWjmkC4sbbMh44sr2NemiYJA6PsDsPwbPrfnwkuFIEyyp9I7SnhucYdR Xw8Q== X-Gm-Message-State: AOJu0YwVxaO85Axd+ycYfK8ySTVORfMxZsDHmpt8/vOfTD3KZ1tQfQ5q x9kR45NEh9jh3BqcYBVOgt9w5TAHp43G6Q== X-Google-Smtp-Source: AGHT+IG6wazEJsazdcB4QTRLRrSSiAZwZBTuUWfcEcRr0ybxABWTst/0TSEcvobMSVtDqsJtrXi+4w== X-Received: by 2002:ac2:5049:0:b0:505:6eef:cf2d with SMTP id a9-20020ac25049000000b005056eefcf2dmr1163332lfm.17.1697533237127; Tue, 17 Oct 2023 02:00:37 -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 v10-20020a056512348a00b00505a20d070asm193100lfr.78.2023.10.17.02.00.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Oct 2023 02:00:36 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.15) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272599 Archived-At: 16 okt. 2023 kl. 16.09 skrev Gerd M=C3=B6llmann = : >> So what is the currently blessed way to communicate with LLDB? >=20 > Don't really know, I'm afraid. Maybe it's worth a try anyway, since lldb-mi still seems maintained as a = separate tool. (But don't let it hold up your contribution -- it's useful on its own.) >> If th=C3=B1e file name can have an absolute directory part, then it = may run >> into trouble on Windows (C:\Some\Dir\File.c). >=20 > I guess I'll leave that as an exercise for someone having Windows :-). I don't, but we could try to be nice anyway. What about replacing (group (1+ (not ":"))) with something like (group (opt (opt "\\\\?\\") ; Windows fun (in "a-zA-Z") ":") ; floppy letter (1+ (not ":"))) and ignore NTFS Alternate Data Streams, as we ignore the possibility of = colons in file names on other systems? Onto your most recent patch -- looks fine in general, only a few notes: > * Editing Changes in Emacs 30.1 > =20 > ++++ > +** New command 'lldb'. The text can be rearranged later on but this entry probably belongs = under 'Changes in Specialized Modes and Packages'. > +Run the LLDB debugger, analogous to the 'gud-gdb' command. Note that > +might want to add these settings to your .lldbinit file, to reduce = the Missing 'you' in the second sentence? > +output in the LLDB output when stepping through source files. > + > +settings set stop-line-count-before 0 > +settings set stop-line-count-after 0 Indent these lines by 4 spaces (NEWS has its own formatting rules). But shouldn't your new code issue these commands to lldb automatically? = The user might not always run lldb under Emacs. > + ;; First line is the print command itself. > + (unless (string-match (regexp-quote (gud-tooltip-print-command "")) Isn't this just (string-search ...) ? Or did you want a more precise = match, in which case it probably should be anchored in some way and not = just a substring search? > +# This is for M-x lldb: don't show source lines when stopping. > +settings set stop-line-count-before 0 > +settings set stop-line-count-after 0 As mentioned above, I'd hope we could do without this.