From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#66604: [PATCH] Gud LLDB completions Date: Thu, 19 Oct 2023 15:08:55 +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 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="2149"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 66604@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 19 15:11:53 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 1qtSob-0000Pn-GA for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Oct 2023 15:11:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtSmj-0004ZQ-AB; Thu, 19 Oct 2023 09:09:57 -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 1qtSmP-0004Lq-4D for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 09:09:47 -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 1qtSmN-0007Dr-9E for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 09:09:35 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qtSmn-0003kS-QP for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 09:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Oct 2023 13:10:01 +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.169772097314365 (code B ref 66604); Thu, 19 Oct 2023 13:10:01 +0000 Original-Received: (at 66604) by debbugs.gnu.org; 19 Oct 2023 13:09:33 +0000 Original-Received: from localhost ([127.0.0.1]:36086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtSmL-0003jd-4Z for submit@debbugs.gnu.org; Thu, 19 Oct 2023 09:09:33 -0400 Original-Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:45234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtSmI-0003jN-S3 for 66604@debbugs.gnu.org; Thu, 19 Oct 2023 09:09:32 -0400 Original-Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-53d9f001b35so13420972a12.2 for <66604@debbugs.gnu.org>; Thu, 19 Oct 2023 06:09:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697720938; x=1698325738; darn=debbugs.gnu.org; h=content-transfer-encoding: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=wBqIQsJNahzN3CoQmxs6NXTG6zW4WpVgoXfyTDjyfuc=; b=Z6FnVT/na5DIMnWNVUmO0tcgefrDNwPALo3a7T9ADeS6EJlBTDiESVK7b+DlpRMOGr VCo7747gaq0SvL9nP05L0QVLnlZHvz8qXa7YnBhErdiZqaTTq2vCjVjtpBNXmqfIML8r s+cU/v2vR0trftXECCwwwHYg4vvvah6nMtRGPwOAoy8FGx4T4fs/+mTZbBhSUSYaPOFe h06ed4GNoNFESewgbrK1HHheiRELFxOCWem5LdQYswG1MLqVs2FAhSkPcWO9cVGmJypg igqurxw+gIKCk6gzqKCkNtZEekXeM3BExoAdQluHbhCGrPv9hhRbJHWnGXz82B3+TCPp js2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697720938; x=1698325738; h=content-transfer-encoding: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=wBqIQsJNahzN3CoQmxs6NXTG6zW4WpVgoXfyTDjyfuc=; b=uLWcranFYS/ks0mrrCrGTEPJsSRE/py7yOO7uCvEtEymisKOunm7S6XG46WekN7VOs 91Um3wpJqqqdCrJGCmhW/9p4elzbEwjV+/lfuJHkCcJ5cjsSuVc2Z2pObnBvYl5WYzKV WUVnl5VRXuGdfOiZwsVG171a2jeYu0GUju4U4gaYKOP1byb6dHzE0ZY1HP+VrVTDi5/2 e0toZuqpsU0YQkWbhEKLdDpa6juFyMiHDNaKRmFo+8+wG/x5heQXctLSvgj3yI8vAT4J /gFw3OHcRBFyXiDVfiY6IC6KT2swmeKnP9b+/9lMNo96osss9dBj21msaWEYnCaqbCHN wcXw== X-Gm-Message-State: AOJu0Yxmd8AMkoXncyPQ0G9QKV73jAsOao7IFMosZFv0CZnpF1ViYjBk CS0AwJBVqeD7pAW+hWWKoXeUO4reF9s= X-Google-Smtp-Source: AGHT+IHdVQQas2iuaMZwnoVNO0woVuj25z5iJtPmlkNPTV2vrQ7T+WWyoo1V46VoK/y8uPDyS4zs+g== X-Received: by 2002:a17:907:31c6:b0:9a1:af6f:e373 with SMTP id xf6-20020a17090731c600b009a1af6fe373mr1821859ejb.42.1697720937731; Thu, 19 Oct 2023 06:08:57 -0700 (PDT) Original-Received: from Pro.fritz.box (p4fe3abd8.dip0.t-ipconnect.de. [79.227.171.216]) by smtp.gmail.com with ESMTPSA id 9-20020a170906024900b009b2b9af0784sm3502549ejl.110.2023.10.19.06.08.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 06:08:57 -0700 (PDT) In-Reply-To: ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Thu, 19 Oct 2023 14:29:26 +0200") 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:272736 Archived-At: Mattias Engdeg=C3=A5rd writes: > 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. Fixed, apparently I can't smerge. >>> 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 oddl= y; variables may not be available. > 06|(lldb) Process 13507 stopped > 07|* thread #1, queue =3D 'com.apple.main-thread', stop reason =3D breakp= oint 2.1 > 08| gud-info: (gud-lldb-stop :file ////Users/mattias/emacs/src/bytecod= e.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. I don't really know, but the only thing interacting with the lldb process in addition to what is done "normally" is completion. Could you please set completion-at-point-functions to nil in the lldb buffer, and see if that's also happening then? > >> 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`. 3. Don't use CL. I'll have a look tomorrow.