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: Wed, 18 Oct 2023 15:37:30 +0200 Message-ID: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@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="6943"; 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 Wed Oct 18 15:38:50 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 1qt6l8-0001c7-Fr for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Oct 2023 15:38:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qt6l1-0007js-DP; Wed, 18 Oct 2023 09:38:43 -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 1qt6ku-0007cX-IW for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2023 09:38:40 -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 1qt6ku-000687-9a for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2023 09:38:36 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qt6lK-0000Fo-8c for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2023 09:39:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Oct 2023 13:39: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.1697636287633 (code B ref 66604); Wed, 18 Oct 2023 13:39:02 +0000 Original-Received: (at 66604) by debbugs.gnu.org; 18 Oct 2023 13:38:07 +0000 Original-Received: from localhost ([127.0.0.1]:33475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt6kQ-0000A8-KD for submit@debbugs.gnu.org; Wed, 18 Oct 2023 09:38:06 -0400 Original-Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]:47194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt6kP-00009W-0M for 66604@debbugs.gnu.org; Wed, 18 Oct 2023 09:38:05 -0400 Original-Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-5079f6efd64so6045089e87.2 for <66604@debbugs.gnu.org>; Wed, 18 Oct 2023 06:37:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697636252; x=1698241052; darn=debbugs.gnu.org; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=t9gY58s1LK6FqvcneNmDvVYFA627J6ZV999W17ncHq8=; b=iEpwtsUAmPkELNaxAcczgB7LkzQpnw1fAr9dGDwRE2krqNXX9TDGWeMhhtuxcHWsZ5 OC/7vd/DkZgRepAvhYwufYZBVhaMXzfCMh7QZMIV9L38+Vzj1+m8hazy2PG+Uzanl7iw Cl3ThDT7fg0S3fqJcWctZKPRijrIC1ciH2jSOeoYaqOMmQS/+dEDeUJkR46JmM+gupC2 muLRxkGfPTPtrmv3id1mQJAlOdzyea0k1ZRS2tAe+JISdxQkU9KWa4nWF2kjk4vNaRrP fel/gh5ZBlXGY91R+VHxi5hlrX7b9joS3W9toz4zgY1B2oIMQfyl/Q59Omn4GHQHTypG JTVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697636252; x=1698241052; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t9gY58s1LK6FqvcneNmDvVYFA627J6ZV999W17ncHq8=; b=gGTLLQr8dByFPHHM/e0grNvtW//jeOJhr2EFnYozBJYeyA0llyapwyOSsMNUxT8E/r gf6/hxECzJboKGLWwP7aWN0UEUFY+S6uAeOe408WOnkeMEUfcHVNmNR1wYJchSIJopn+ 8JBsRCyLkoPmd2ESgynWvww+qMjMVdjpwR+FDNpqACD3gFiWya75RnB3E/RcskkMOLBq 5V/YAkUopVDWHf08ObbhnZc3iYiqUlgOnwKXwmv3mqTjxPVbEOc4fjEQm8ehTeuUcmsW rTOc3wMr1Z9WdY7lABbd9QUVFRXeCIpx9XknrLhAcCMUrLhi4HOyJJMIFUwAOhUvcoDA Cjig== X-Gm-Message-State: AOJu0YwgfeLMR+or4z1CB8VqlBy4t5D1YED6OMQaQwd4lnXjrQueOiPe QqIMUoXhb5mUChlxt0kFnAc= X-Google-Smtp-Source: AGHT+IH51YODBsQWAkmrMT2SjKrLDHHLd+KMQsXc8l8+kE5pt3y0huWKIa6BH4BlmJsvgYaO7wprcQ== X-Received: by 2002:a05:6512:613:b0:507:9fc1:ca7e with SMTP id b19-20020a056512061300b005079fc1ca7emr3612067lfe.51.1697636252338; Wed, 18 Oct 2023 06:37:32 -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 n20-20020a05651203f400b00500829f7b2bsm696657lfq.250.2023.10.18.06.37.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Oct 2023 06:37:31 -0700 (PDT) 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:272655 Archived-At: Thank you! Maybe it's my old lldb version (lldb-1300.0.42.3, from = Apple), but: (lldb) script --language python -- def ff(): print("hello") completes without error but somehow isn't evaluated properly (or in = another namespace?) because: (lldb) script --language python -- ff() Traceback (most recent call last): File "", line 1, in NameError: name 'ff' is not defined In contrast, evaluating expressions: (lldb) script --language python -- abc =3D 123 (lldb) script --language python -- print(abc) 123 works as expected. This means that gud-lldb-def-python-completion-function doesn't define = gud_complete properly. However, if I change it to run in interactive = mode: (defvar gud-lldb-def-python-completion-function (concat - "script --language python -- " + "script --language python --\n" "def gud_complete(c): " "ci =3D lldb.debugger.GetCommandInterpreter(); " "sl =3D lldb.SBStringList(); " @@ -3948,7 +3948,8 @@ gud-lldb-def-python-completion-function "print('gud-completions: ('); " "[print(f'\"{sl.GetStringAtIndex(i)}\" ') " " for i in range(sl.GetSize())]; " - "print(')')") + "print(')')" + "\n\nexit()") "LLDB command to define a Python function for completion. Must be a single line.") then it works. (This means that it no longer needs to be a single line = and can use indentation and stuff.) Another thing that is a bit annoying with the new lldb support is that = every command sent to lldb is echoed: (lldb) b exec_byte_code b exec_byte_code <--- echo Breakpoint 1: where =3D emacs`exec_byte_code ... Surely that wasn't intended?