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#66604: [PATCH] Gud LLDB completions Date: Thu, 19 Oct 2023 14:29:26 +0200 Message-ID: References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> <586BC992-4776-4C8B-9700-821FF04A1046@gmail.com> <27BF071E-2E0D-49F9-B595-E8A560436C50@gmail.com> <2577C531-285B-49CC-BFAA-3D3A3A0B986D@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="16851"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66604@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 Thu Oct 19 14:30:58 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 1qtSAz-0004G7-Kb for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Oct 2023 14:30:57 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtSAu-0001BJ-10; Thu, 19 Oct 2023 08:30: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 1qtSAe-0000mi-9Y for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 08:30:36 -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 1qtSAd-0006DO-UG for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 08:30:35 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qtSB4-0008MF-36 for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 08:31: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: Thu, 19 Oct 2023 12:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66604-submit@debbugs.gnu.org id=B66604.169771860431981 (code B ref 66604); Thu, 19 Oct 2023 12:31:02 +0000 Original-Received: (at 66604) by debbugs.gnu.org; 19 Oct 2023 12:30:04 +0000 Original-Received: from localhost ([127.0.0.1]:36037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtSA8-0008Jl-7j for submit@debbugs.gnu.org; Thu, 19 Oct 2023 08:30:04 -0400 Original-Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]:60839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtSA3-0008In-RP for 66604@debbugs.gnu.org; Thu, 19 Oct 2023 08:30:03 -0400 Original-Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-5079eed8bfbso8371159e87.1 for <66604@debbugs.gnu.org>; Thu, 19 Oct 2023 05:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697718567; x=1698323367; 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=WIhGVbxhfL3n84JOgPioyxVY6geE6W9QxlwPYC7R7HA=; b=YMwTQKSmf3PkcJjGw8p6NQhn/XAKSIRt8zdwanGutFAatBj8YMtxXsQ6x+lLME7xWP CYptMWhTauu0sx/wT0SlNFkMJ9uSsjWgz0tKiYmFTnMb7DqKLIvNybIvttQIAGCPCtlD 89ElvtT10YK8vS0ImIY3B4NupGsrDO3Lh59ApkuTAnzwSZ8OSR002mWovknwzlzSRE0z /Ib131e4S1c8qTmH/tBMDHfmdUYeeY7XWgzBdB+Iyf08s1wyYYPCKtdM+F+wpvZWPhqH vxKb+Ydh8P6CbUMyyChC2dpPexI/RPgFwLifvLjm3hriuMKx7SFEpqXaymp0tAaZ10RL gvJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697718567; x=1698323367; 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=WIhGVbxhfL3n84JOgPioyxVY6geE6W9QxlwPYC7R7HA=; b=Lo0jxsUfehmWcNWDQOJE3UEPIYVWk14XD0jzseR5H6zvR0X3ppgWqTN6nwVmj4MoKT YSVZU1BOHokxQg5deZlydubPopWP4Xmrw+/TDxJhvksli/ue8Oha6UVNzWs+chOsqlHp gcsXYjhaXQt6MsmtKupbQqMKAlxNdi21u0ZS/Py5u92b53/h+FLl72m12t0kdeuyGJRl A5sErQinEpK6maqPM+TdIhOxI9x1O5EGKzedmEoPInGHW4GYgz1GkMDQPdRfGvCewIjk PXjkeua4hMsHinnsmsU5Pwfgb8b8HbzA7epYSwkJE6V9lADahdL9AU0Vw77X5rWWZ+B2 voJw== X-Gm-Message-State: AOJu0Yy3c72loJZCNvP0SZ4wRxq0utBNs02KCwfEAG+YhdRzxzAH1Ivv PeCsV62fS2LXk0W/VTm6xlc= X-Google-Smtp-Source: AGHT+IH7By70HooxeqMj4IQ36Y31Uh6XzCsE8ucCU0HqO/p2g7e+H5+GR8BM+L2J7b7SKReRC02Hjw== X-Received: by 2002:a05:6512:475:b0:507:976d:89aa with SMTP id x21-20020a056512047500b00507976d89aamr1495409lfd.67.1697718566948; Thu, 19 Oct 2023 05:29:26 -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 b1-20020a056512070100b00507a4661f71sm1080572lfs.218.2023.10.19.05.29.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Oct 2023 05:29:26 -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:272731 Archived-At: 19 okt. 2023 kl. 13.50 skrev Gerd M=C3=B6llmann = : >> script --language python -- print('Gud initialized') >>=20 >> is apparently sent twice. Perhaps something simpler can be sent, and >> only once? >=20 > Hm, I'm sending it once Sorry, you are perfectly right. The code is (gud-basic-call "script --language python -- print('Gud = initialized')") (gud-basic-call "script --language python -- print('Gud = initialized.')")) so you are actually sending two slightly different commands. >> 2. Sometimes there's an extra (second) space after the (lldb) prompt, >> typically after stopping. No idea where that comes from. >=20 > Hm, I don't think I see that here. Is it immediately after the stop, = or > does it come later? Just after the stop. Transcript (with line numbers for reference): 01|(lldb) b exec_byte_code 02|Breakpoint 2: where =3D emacs`exec_byte_code + 20 at = bytecode.c:476:33, address =3D 0x000000010b389b84 03|(lldb) c 04|Process 13507 resuming 05|(lldb) emacs was compiled with optimization - stepping may behave = oddly; variables may not be available. 06|(lldb) Process 13507 stopped 07|* thread #1, queue =3D 'com.apple.main-thread', stop reason =3D = breakpoint 2.1 08| gud-info: (gud-lldb-stop :file = ////Users/mattias/emacs/src/bytecode.c/// :line 476 :column 33) 09|Target 0: (emacs) stopped. 10|(lldb) In lines 5 and 6, an (lldb) prompt is printed although no input takes = place there. No such prompts are seen when lldb runs in a terminal. Line 6 also prefixes "Process" with an extra space which isn't present = when running in a terminal either. > It's a bit overkill ATM, but you must admit that it's elegant :-). Overkill is the least of it. Just you wait until someone makes you debug = some crafted source code that causes your Emacs to evaluate arbitrary = Lisp expressions! In general: 1. Don't use `eval` for parsing data. 2. Don't use `eval`.