From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 18 07:26:10 2023 Received: (at submit) by debbugs.gnu.org; 18 Oct 2023 11:26:10 +0000 Received: from localhost ([127.0.0.1]:33351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt4gj-0007XQ-Uu for submit@debbugs.gnu.org; Wed, 18 Oct 2023 07:26:10 -0400 Received: from lists.gnu.org ([2001:470:142::17]:56580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt4gg-0007Wj-J6 for submit@debbugs.gnu.org; Wed, 18 Oct 2023 07:26:08 -0400 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 1qt4g8-0000rm-4v for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2023 07:25:32 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qt4g5-0005Dd-4k for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2023 07:25:31 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-53db360294fso11786687a12.3 for ; Wed, 18 Oct 2023 04:25:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697628326; x=1698233126; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=s8LCg7E8LTBByyBsvdGBNWTDC+lrfySyM2z8IBoBF5g=; b=Ei3Z4HMqQ7RPrg4nEPwdcFtbBKs48eqQ0W/ypTr9/uH53/z/Qrukhgan2bXxkgE6Lb d82iHXVbggDJwmy0bITnaJfs8BRMJHYfcx0YCigViFxNARVo3Pz5GT5/ZNixXNcpN9sz 539fzurIJuB6FvS2lUXLgVSBoiH9jhwRC43s0eG+T64ilEuJNv1UT9TQD4fAEuiwOLwp QovrstZN2EtfUj9adR3GW00+c6M8neUH6huRvJpdNwKNN5CEYIUwMQLNsqE92ZIbiSoS mrkq3sT70jS4oOrDQPcAyCpj688VUSQt6Lhar+KHlw//0mCIGj8PZVelqJGlrKwynpvv yyyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697628326; x=1698233126; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=s8LCg7E8LTBByyBsvdGBNWTDC+lrfySyM2z8IBoBF5g=; b=nVYwe8QTy4u8o2hrcKGzN7zBacE+fKC5Gw2golrytH8iM0pWAQETjQeGujGj/+63yV /DJnzJD7eJHi73+qQhfqTweSFwoz+fT/4jMX2B2AfOWzxFEyJEiO2rSUkS3zSKyhplhw BrJOrZrPVY3l1UdD6gh3V1nQIw6U5dSAd6BNQtsEL6JGfoTRT8qik31XEUpIj2zZKPIc b41ZWxh7UfJySy4UYxuBT42Yp/NsnOUVCElDLGl/rOjPKuu2nVXvZtHWVY37mz/oX0+O rEmX8CmmBX1uB0Cz3akD3lpxxlgbuLZJmDKXJUMaFpxJuTluSACDSMgkynqqf5LjkaE1 cXRA== X-Gm-Message-State: AOJu0Ywfrx9kcFofrdEyayBNfbybMPIQH4vOKBaJ5MoyJnGySPHy3O/p 34Y4jfkXgNMP169r60J02RIEY84o0qc= X-Google-Smtp-Source: AGHT+IG0nNZS3vGY950ZflCWHfnxt8Q+A99Q0OQZLmO9jzlI59GbjPARLlARWlJI9msfFCPigxVuNQ== X-Received: by 2002:a50:cd95:0:b0:53d:b7e7:301b with SMTP id p21-20020a50cd95000000b0053db7e7301bmr3957298edi.24.1697628326364; Wed, 18 Oct 2023 04:25:26 -0700 (PDT) Received: from Mini.fritz.box (p4fe3a178.dip0.t-ipconnect.de. [79.227.161.120]) by smtp.gmail.com with ESMTPSA id t29-20020a50ab5d000000b0053ed70ebd7csm2694070edc.31.2023.10.18.04.25.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 04:25:25 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: bug-gnu-emacs@gnu.org Subject: [PATCH] Gud LLDB completions Date: Wed, 18 Oct 2023 13:25:24 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x52b.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-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Tags: patch This is my first version of lldb command completions, which turned out to be a lot more fiddly than I initially thought. Comments welcome :-). --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Gud-LLDB-completions.patch >From 6f3b987ebbf8eeabd054c967e673899d3da203dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerd=20M=C3=B6llmann?= Date: Wed, 18 Oct 2023 09:24:45 +0200 Subject: [PATCH] Gud LLDB completions * etc/emacs_lldb.py: Remove xcomplete. * lisp/progmodes/gud.el: Implement lldb command completions. --- etc/emacs_lldb.py | 30 --------------- lisp/progmodes/gud.el | 87 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 85 insertions(+), 32 deletions(-) diff --git a/etc/emacs_lldb.py b/etc/emacs_lldb.py index f2c7a7987c7..fa8d95d7b5b 100644 --- a/etc/emacs_lldb.py +++ b/etc/emacs_lldb.py @@ -203,35 +203,6 @@ def xdebug_print(debugger, command, result, internal_dict): """Print Lisp_Objects using safe_debug_print()""" debugger.HandleCommand(f"expr safe_debug_print({command})") -# According to SBCommanInterpreter.cpp, the return value of -# HandleCompletions is as follows: -# -# Index 1 to the end contain all the completions. -# -# At index 0: -# -# If all completions have a common prefix, this is the shortest -# completion, with the common prefix removed from it. -# -# If it is the completion for a whole word, a space is added at the -# end. -# -# So, the prefix is what could be added to make the command partially -# complete. -# -# If there is no common prefix, index 0 has an empty string "". - -def xcomplete(debugger, command, result, internal_dict): - """Print completions for COMMAND.""" - interpreter = debugger.GetCommandInterpreter() - string_list = lldb.SBStringList() - interpreter.HandleCompletion(command, len(command), len(command), - -1, string_list) - list = "" - for i in range(string_list.GetSize()): - list += '"' + string_list.GetStringAtIndex(i) + '" ' - result.AppendMessage("(" + list + ")") - ######################################################################## # Formatters @@ -336,7 +307,6 @@ def enable_type_category(debugger, category): def __lldb_init_module(debugger, internal_dict): define_command(debugger, xbacktrace) define_command(debugger, xdebug_print) - define_command(debugger, xcomplete) define_type_summary(debugger, "Lisp_Object", type_summary_Lisp_Object) define_type_synthetic(debugger, "Lisp_Object", Lisp_Object_Provider) enable_type_category(debugger, "Emacs") diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index ea5a3580629..a9c1c25a505 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3850,7 +3850,7 @@ gud-tooltip-tips ;; 'gud-lldb-history' and 'gud-gud-lldb-command-name' are required -;; because gud-symbol uses their values if they are present. Their +;; because 'gud-symbol' uses their values if they are present. Their ;; names are deduced from the minor-mode name. (defvar gud-lldb-history nil) @@ -3859,7 +3859,7 @@ gud-gud-lldb-command-name :type 'string) (defun gud-lldb-marker-filter (string) - "Deduce interesting stuff from output STRING." + "Deduce interesting stuff from process output STRING." (cond (;; Process 72668 stopped ;; * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 ;; frame #0: ...) at emacs.c:1310:9 [opt] @@ -3879,6 +3879,83 @@ gud-lldb-marker-filter (setq gud-overlay-arrow-position nil))) string) +;; According to SBCommanInterpreter.cpp, the return value of +;; HandleCompletions is as follows: +;; +;; Index 1 to the end contain all the completions. +;; +;; At index 0: +;; +;; If all completions have a common prefix, this is the shortest +;; completion, with the common prefix removed from it. +;; +;; If it is the completion for a whole word, a space is added at the +;; end. +;; +;; So, the prefix is what could be added to make the command partially +;; complete. +;; +;; If there is no common prefix, index 0 has an empty string "". + +(defun gud-lldb-fetch-completions () + "Return the data to complete the LLDB command before point." + (let* ((process (get-buffer-process gud-comint-buffer)) + (start (process-mark process)) + (end (point)) + (to-complete (buffer-substring-no-properties start end)) + (output-buffer (get-buffer-create "*lldb-completions*"))) + ;; Send the completion command with output to our buffer + (with-current-buffer output-buffer + (erase-buffer)) + (comint-redirect-send-command-to-process + (format "script --language python -- gud_complete('%s')" + to-complete) + output-buffer process nil t) + ;; Wait for output + (unwind-protect + (while (not comint-redirect-completed) + (accept-process-output process)) + (comint-redirect-cleanup)) + ;; Process the completion output. + (with-current-buffer output-buffer + (goto-char (point-min)) + (when (search-forward "gud-completions:" nil t) + (read (current-buffer)))))) + +(defun gud-lldb-completions (_context _command) + "Completion table for LLDB commands." + (gud-gdb-completions-1 (gud-lldb-fetch-completions))) + +(defun gud-lldb-completion-at-point () + "Return the data to complete the LLDB command before point." + (let* ((end (point)) + (line-start (comint-line-beginning-position)) + (start (save-excursion + (skip-chars-backward "^ " line-start) + (point)))) + (list (copy-marker start t) end + (completion-table-dynamic + (apply-partially #'gud-lldb-completions + (buffer-substring line-start start)))))) + +(defvar gud-lldb-def-python-completion-function + (concat + "script --language python -- " + "def gud_complete(c): " + "ci = lldb.debugger.GetCommandInterpreter(); " + "sl = lldb.SBStringList(); " + "ci.HandleCompletion(c, len(c), len(c),-1, sl); " + "print('gud-completions: ('); " + "[print(f'\"{sl.GetStringAtIndex(i)}\" ') " + " for i in range(sl.GetSize())]; " + "print(')')") + "LLDB command to define a Python function for completion. +Must be a single line.") + +(defun gud-lldb-initialize () + "Initialize the LLDB process as needed for this debug session." + (gud-basic-call gud-lldb-def-python-completion-function)) + ;;;###autoload (defun lldb (command-line) "Run lldb passing it COMMAND-LINE as arguments. @@ -3979,11 +4056,17 @@ lldb nil "Run the program.") + (add-hook 'completion-at-point-functions + #'gud-lldb-completion-at-point + nil 'local) + (keymap-local-set "" #'completion-at-point) + (gud-set-repeat-map-property 'gud-gdb-repeat-map) (setq comint-prompt-regexp (rx line-start "(lldb)" (0+ blank))) (setq paragraph-start comint-prompt-regexp) (setq gud-running nil) (setq gud-filter-pending-text nil) + (gud-lldb-initialize) (run-hooks 'lldb-mode-hook)) (provide 'gud) -- 2.42.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 18 09:38:07 2023 Received: (at 66604) by debbugs.gnu.org; 18 Oct 2023 13:38:07 +0000 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 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 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) 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) From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: bug#66604: [PATCH] Gud LLDB completions Message-Id: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> Date: Wed, 18 Oct 2023 15:37:30 +0200 To: =?utf-8?Q?Gerd_M=C3=B6llmann?= X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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? From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 18 10:43:39 2023 Received: (at 66604) by debbugs.gnu.org; 18 Oct 2023 14:43:39 +0000 Received: from localhost ([127.0.0.1]:34405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt7lp-0002YI-4q for submit@debbugs.gnu.org; Wed, 18 Oct 2023 10:43:39 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:53493) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt7lZ-0002Xj-B0 for 66604@debbugs.gnu.org; Wed, 18 Oct 2023 10:43:36 -0400 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-9c2a0725825so588014366b.2 for <66604@debbugs.gnu.org>; Wed, 18 Oct 2023 07:42:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697640169; x=1698244969; darn=debbugs.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=uLqR6FmoD2RowdM+wui9RWNCZcwICoyVqeyfbgjnGVQ=; b=bIq/HGS0S1uoEGW653m8MjJpYdm21mqhLDlWigp1O8aVYW9DocsNhB81xeqHRUs9RT Bdr7EAmsYJTVNMNVkfylhmDI+MCAq1A7sWhkMuYwNy/ytrlo5dKJJwtlBgOvdE445EIG 3RCNjSO5hsb5nqqS4ZK8KKUc6f3T1Gg4AGcZzEQzkWjRiBA1WzbUNY34Ea9dqXUlZEL0 docVE3EBs0ILriOZSiu/3L8WXZ73rIC2LhAN7DJu/27ASkRZkaRTnA35Dbhw7/QF6GdN C1yB2olApOe+Rl5D5Rk7pz4qkdL+Dpv96hUXx4qrcHJOkweO989GkpzqMaqcAx5EkwJZ LO2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697640169; x=1698244969; 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=uLqR6FmoD2RowdM+wui9RWNCZcwICoyVqeyfbgjnGVQ=; b=Lbxc9ba3xNgEA/2DZJa819VKD0kVfwrTsepcqHqPEWX4+OP+55sRRpqzkgW+R8uusH 8Z6pabWrG0mEfubZZ1EhwfumnfiWXThtzTREt/hUBZV9MnZ8rIjVpuvPN0pcBstev08y 4K7slsmbGhhADUjk49T6hW5AU0Qp1LRXjqnk6k8w3otIHn5H7NZBu2MGpF9BKFI1roBL cNTetrNegvt8L4SOZZovXuUiOmYtrsE4mGJ8W7Mbb+jR/mCGpKFglAJlMzewwo/jZtpw +tzUY1eRD6fVOOt28uebjUgj7HIuTDl/ovV4viKR5GKba+N1TDJWys5ugwZXtB55UFk6 Bkwg== X-Gm-Message-State: AOJu0Ywg+0TSUEaiciOp5Bzw8CiavQ3DkofrCXa7C+F2XEcatNx3dKUP QwyYBZuVw01cU3msOtvf0Ca/ts+Kk3c= X-Google-Smtp-Source: AGHT+IF/peVAZ3nLFKnzGTSk4C/hh05atY/YRxEppSaoJgKXF5lpkNqyaPwCxGKkAlOm076nxIa3zQ== X-Received: by 2002:a17:906:9c83:b0:9be:b668:5700 with SMTP id fj3-20020a1709069c8300b009beb6685700mr4022450ejc.58.1697640168163; Wed, 18 Oct 2023 07:42:48 -0700 (PDT) Received: from Mini.fritz.box (p4fe3a178.dip0.t-ipconnect.de. [79.227.161.120]) by smtp.gmail.com with ESMTPSA id hg17-20020a1709072cd100b00992e265495csm1787332ejc.212.2023.10.18.07.42.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 07:42:47 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Wed, 18 Oct 2023 15:37:30 +0200") References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> Date: Wed, 18 Oct 2023 16:42:46 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mattias Engdeg=C3=A5rd writes: > then it works. (This means that it no longer needs to be a single line > and can use indentation and stuff.) Thanks for looking at this! Your solution works here, too, with lldb 17. What a fiddly mess. The last lines in the LLDB buffer then look like exit() ... >>> (lldb) So, in the attached patch, I've sent something in addition after that, to make it look a bit prettier. > Another thing that is a bit annoying with the new lldb support is that ev= ery 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? Should be fixed in the attached patch. If I guess that right, it's comint that echoes. I have that turned off globally here for M-x shell. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Gud-LLDB-completions-bug-66604.patch Content-Description: patch v2 >From e1ef4ddd5952f5e25851bc6f5fba1ce8f9d498fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerd=20M=C3=B6llmann?= Date: Wed, 18 Oct 2023 09:24:45 +0200 Subject: [PATCH] Gud LLDB completions (bug#66604) * etc/emacs_lldb.py: Remove xcomplete. * lisp/progmodes/gud.el: Implement lldb command completions. --- etc/emacs_lldb.py | 30 -------------- lisp/progmodes/gud.el | 91 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 89 insertions(+), 32 deletions(-) diff --git a/etc/emacs_lldb.py b/etc/emacs_lldb.py index f2c7a7987c7..fa8d95d7b5b 100644 --- a/etc/emacs_lldb.py +++ b/etc/emacs_lldb.py @@ -203,35 +203,6 @@ def xdebug_print(debugger, command, result, internal_dict): """Print Lisp_Objects using safe_debug_print()""" debugger.HandleCommand(f"expr safe_debug_print({command})") -# According to SBCommanInterpreter.cpp, the return value of -# HandleCompletions is as follows: -# -# Index 1 to the end contain all the completions. -# -# At index 0: -# -# If all completions have a common prefix, this is the shortest -# completion, with the common prefix removed from it. -# -# If it is the completion for a whole word, a space is added at the -# end. -# -# So, the prefix is what could be added to make the command partially -# complete. -# -# If there is no common prefix, index 0 has an empty string "". - -def xcomplete(debugger, command, result, internal_dict): - """Print completions for COMMAND.""" - interpreter = debugger.GetCommandInterpreter() - string_list = lldb.SBStringList() - interpreter.HandleCompletion(command, len(command), len(command), - -1, string_list) - list = "" - for i in range(string_list.GetSize()): - list += '"' + string_list.GetStringAtIndex(i) + '" ' - result.AppendMessage("(" + list + ")") - ######################################################################## # Formatters @@ -336,7 +307,6 @@ def enable_type_category(debugger, category): def __lldb_init_module(debugger, internal_dict): define_command(debugger, xbacktrace) define_command(debugger, xdebug_print) - define_command(debugger, xcomplete) define_type_summary(debugger, "Lisp_Object", type_summary_Lisp_Object) define_type_synthetic(debugger, "Lisp_Object", Lisp_Object_Provider) enable_type_category(debugger, "Emacs") diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index ea5a3580629..3a694642e48 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3850,7 +3850,7 @@ gud-tooltip-tips ;; 'gud-lldb-history' and 'gud-gud-lldb-command-name' are required -;; because gud-symbol uses their values if they are present. Their +;; because 'gud-symbol' uses their values if they are present. Their ;; names are deduced from the minor-mode name. (defvar gud-lldb-history nil) @@ -3859,7 +3859,7 @@ gud-gud-lldb-command-name :type 'string) (defun gud-lldb-marker-filter (string) - "Deduce interesting stuff from output STRING." + "Deduce interesting stuff from process output STRING." (cond (;; Process 72668 stopped ;; * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 ;; frame #0: ...) at emacs.c:1310:9 [opt] @@ -3879,6 +3879,86 @@ gud-lldb-marker-filter (setq gud-overlay-arrow-position nil))) string) +;; According to SBCommanInterpreter.cpp, the return value of +;; HandleCompletions is as follows: +;; +;; Index 1 to the end contain all the completions. +;; +;; At index 0: +;; +;; If all completions have a common prefix, this is the shortest +;; completion, with the common prefix removed from it. +;; +;; If it is the completion for a whole word, a space is added at the +;; end. +;; +;; So, the prefix is what could be added to make the command partially +;; complete. +;; +;; If there is no common prefix, index 0 has an empty string "". + +(defun gud-lldb-fetch-completions () + "Return the data to complete the LLDB command before point." + (let* ((process (get-buffer-process gud-comint-buffer)) + (start (process-mark process)) + (end (point)) + (to-complete (buffer-substring-no-properties start end)) + (output-buffer (get-buffer-create "*lldb-completions*"))) + ;; Send the completion command with output to our buffer + (with-current-buffer output-buffer + (erase-buffer)) + (comint-redirect-send-command-to-process + (format "script --language python -- gud_complete('%s')" + to-complete) + output-buffer process nil t) + ;; Wait for output + (unwind-protect + (while (not comint-redirect-completed) + (accept-process-output process)) + (comint-redirect-cleanup)) + ;; Process the completion output. + (with-current-buffer output-buffer + (goto-char (point-min)) + (when (search-forward "gud-completions:" nil t) + (read (current-buffer)))))) + +(defun gud-lldb-completions (_context _command) + "Completion table for LLDB commands." + (gud-gdb-completions-1 (gud-lldb-fetch-completions))) + +(defun gud-lldb-completion-at-point () + "Return the data to complete the LLDB command before point." + (let* ((end (point)) + (line-start (comint-line-beginning-position)) + (start (save-excursion + (skip-chars-backward "^ " line-start) + (point)))) + (list (copy-marker start t) end + (completion-table-dynamic + (apply-partially #'gud-lldb-completions + (buffer-substring line-start start)))))) + +(defvar gud-lldb-def-python-completion-function + (concat + "script --language python --\n" + "def gud_complete(c): " + "ci = lldb.debugger.GetCommandInterpreter(); " + "sl = lldb.SBStringList(); " + "ci.HandleCompletion(c, len(c), len(c),-1, sl); " + "print('gud-completions: ('); " + "[print(f'\"{sl.GetStringAtIndex(i)}\" ') " + " for i in range(sl.GetSize())]; " + "print(')')" + "\n\nexit()") + "LLDB command to define a Python function for completion. +Note that this is sensitive to LLDB versions. The current +form seems to work with LLDB versions 14, and 17.") + +(defun gud-lldb-initialize () + "Initialize the LLDB process as needed for this debug session." + (gud-basic-call gud-lldb-def-python-completion-function) + (gud-basic-call "script --language python -- print('Gud initialized')")) + ;;;###autoload (defun lldb (command-line) "Run lldb passing it COMMAND-LINE as arguments. @@ -3979,11 +4059,18 @@ lldb nil "Run the program.") + (add-hook 'completion-at-point-functions + #'gud-lldb-completion-at-point + nil 'local) + (keymap-local-set "" #'completion-at-point) + (gud-set-repeat-map-property 'gud-gdb-repeat-map) (setq comint-prompt-regexp (rx line-start "(lldb)" (0+ blank))) + (setq comint-process-echoes t) (setq paragraph-start comint-prompt-regexp) (setq gud-running nil) (setq gud-filter-pending-text nil) + (gud-lldb-initialize) (run-hooks 'lldb-mode-hook)) (provide 'gud) -- 2.42.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 18 11:14:57 2023 Received: (at 66604) by debbugs.gnu.org; 18 Oct 2023 15:14:57 +0000 Received: from localhost ([127.0.0.1]:34453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt8G9-0003rz-6G for submit@debbugs.gnu.org; Wed, 18 Oct 2023 11:14:57 -0400 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]:61459) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt8G5-0003rk-2G for 66604@debbugs.gnu.org; Wed, 18 Oct 2023 11:14:55 -0400 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2b9c907bc68so90775501fa.2 for <66604@debbugs.gnu.org>; Wed, 18 Oct 2023 08:14:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697642061; x=1698246861; 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=kjFBdph6szbsysiAp4Qdlw1uh6ihcFkRK8RkRutbwtU=; b=WVbsuFgb8ksdWFBZpHr/7aC03bsZq29uUWvxcaUQHZQhR9XOPeVi1DjXPh9Lcg/VJp 6bEU7/KNfZ39YvLny6C8SEcaxzSDSH3PQKqXy+Lk0mOY2UnhMudTgWtZ8+ejLVm9Q5Df ftGjxn+CrodyWaOR9xrLRGXUtH+vfIRvbUEEfHZd01C+L7rQOsz4VZpURnlmm/z4ZqHo LZjEons6KtkuaBTv2iMAGc/ZOPS8+cCK/QIwamR9OLi7Jenahv7/oJz2IXA7UD8dLN1/ 7X9B5a24ICOXmtKCMkZ+1/2GV5wF7s//Pj8zQIV49xnb5T/nOJ4hQM8Q6iDZrR3LizzR gDyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697642061; x=1698246861; 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=kjFBdph6szbsysiAp4Qdlw1uh6ihcFkRK8RkRutbwtU=; b=ka9Gfoy29UgMFoDE2k7blaPC1VubzAbcNQrAywvuQItHOeNkR6XSQFDwOOGhqJcEto n9u2MwreVPbF22acMAc83o9dMpADtVmvjc2zY55FFZfMnx2nhUQFrkqR8uvIhWAspUfP HzfPt4oYlHO2mUijAeTtXRAEV92roj1EraCMYQfuu6dCG2xjMbuCR8BkJYxlI5Ds9snd GxxhCCsDvhLY9hJEqhNj7NJKh3d3QOn7GktdP8Zy6uWIytYm0fC4fyfkt7708H2uuWdA zG1rO/nAloIsZppfOfRXS6kQyVEvSPpUfGT26XpMQ/KvB7ifz90vaMdZ7xiReRHPcUqg E1Vw== X-Gm-Message-State: AOJu0Yz4IFzuT0cfbKz0qqpk9kSYcOVpOyTCYnRJ34guHzRxfDNxgjYH +BuPXemBnJiPlh0PSBw2hxA= X-Google-Smtp-Source: AGHT+IHN2+e/u2re1sTYQ70Hd1WuCFkSOtiD6tbPNUB+N0k3MaHHw4WZvsKilDpjkrbZ6gTPtmfXDw== X-Received: by 2002:ac2:4911:0:b0:507:9a06:7dbe with SMTP id n17-20020ac24911000000b005079a067dbemr4050477lfi.21.1697642060512; Wed, 18 Oct 2023 08:14:20 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id k10-20020ac257ca000000b00500a4679148sm734589lfo.20.2023.10.18.08.14.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Oct 2023 08:14:19 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#66604: [PATCH] Gud LLDB completions From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Wed, 18 Oct 2023 17:14:19 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> To: =?utf-8?Q?Gerd_M=C3=B6llmann?= X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 18 okt. 2023 kl. 16.42 skrev Gerd M=C3=B6llmann = : > So, in the attached patch, I've sent something in addition after that, > to make it look a bit prettier. Thank you, it works all right. > Should be fixed in the attached patch. This too. By the way, I can confirm that changing default-directory (M-x cd) in = the *gud* buffer to where the source is located allows Emacs to find the = source of the current frame. Changing frame-format is probably the way = forward here. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 18 11:23:47 2023 Received: (at 66604) by debbugs.gnu.org; 18 Oct 2023 15:23:47 +0000 Received: from localhost ([127.0.0.1]:34485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt8Og-0004AC-SL for submit@debbugs.gnu.org; Wed, 18 Oct 2023 11:23:47 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]:50297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt8Oe-00049s-EH for 66604@debbugs.gnu.org; Wed, 18 Oct 2023 11:23:45 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-9b1ebc80d0aso1095905066b.0 for <66604@debbugs.gnu.org>; Wed, 18 Oct 2023 08:23:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697642592; x=1698247392; 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=T86YjL1YaLACkPCp2Ab9jeZb+hrRt1MjLjlYkHBfrR8=; b=KViEoRCcCQQqLNFkRnuNBI0bWNHwDfW85xfpALjP29KZrUS8/tuHcWAnDouT8PbWQJ NZpUNXzxBuawttO63Vp/JOEPjf3ZN9zQSFTbwEz6io5SBYAITScbCZB93ZzQA1ze1nPZ aHteuOYSBcKk6yi4ZH42A9co3vyuplWovvTZ1i2OqWuGAX0P+wJ9esJZlnn0kYzAksqR LxAoLvbW9+7Fp8U/PLve09C1BVv8s3o4S/M41aUZI9/34tnOKfFyPwRip9TCMufNJsPn x1n9H7LkZnktZavInb5yJQi6Nb9kPaxz8vDVOFma6mshhU3I6aerK6AU+aXlpTzBaknL /XgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697642592; x=1698247392; 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=T86YjL1YaLACkPCp2Ab9jeZb+hrRt1MjLjlYkHBfrR8=; b=WjtoPnQPlRmbrYS3Z9OL6//O4P9Ilt8xfT5GcyvZ3YWhsBO4rsykmiCCNYQLtUkkp2 uhfF1FF1AmAWtPz72lmNrcVEaCSyOeKToRwtdcbaVYWJQ7wJ742i4xR9XIiY+Vg3DJNx yG9GGdU9gbR4g7aS6h26LNvEiAq2JQDLqsIz5L/vwb+qXSUijpYUSFUtJRhzAX1Lekk4 ijTTB8T28LHK6rTgA37tuQUIO/CFpc/OQA3loVaosvH8FpT0mUuP9Yeotb6pVrzbohxZ uxNJAmEfUVv+IXvXLa66kEQOKoRZNqOCW/IsaStzENsbekJTZh1LJy/+fG+qpgdaEkRJ iDMg== X-Gm-Message-State: AOJu0YzorGmgRjY/s4jD4gNP89MC71S2huHpyv7yxvnRR8906d/1uFMI jm8c/32o85ooyJkz8xtH7oIyl0GS2rE= X-Google-Smtp-Source: AGHT+IEtTfaOxFwc6kT0VTrWCV40AXmMd0Vq04VtnuD0hQNimttsBfS6x2KUBfj2xudNB1hg/En7JQ== X-Received: by 2002:a17:907:9715:b0:9c4:344e:b496 with SMTP id jg21-20020a170907971500b009c4344eb496mr4130674ejc.11.1697642591855; Wed, 18 Oct 2023 08:23:11 -0700 (PDT) Received: from Mini.fritz.box (p4fe3a178.dip0.t-ipconnect.de. [79.227.161.120]) by smtp.gmail.com with ESMTPSA id 9-20020a170906024900b009b2b9af0784sm1876595ejl.110.2023.10.18.08.23.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 08:23:11 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Wed, 18 Oct 2023 17:14:19 +0200") References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> Date: Wed, 18 Oct 2023 17:23:10 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 18 okt. 2023 kl. 16.42 skrev Gerd M=C3=B6llmann : > >> So, in the attached patch, I've sent something in addition after that, >> to make it look a bit prettier. > > Thank you, it works all right. > >> Should be fixed in the attached patch. > > This too. Does the attached also work? It would have the advantage of being more readable. The Python part. > > By the way, I can confirm that changing default-directory (M-x cd) in > the *gud* buffer to where the source is located allows Emacs to find > the source of the current frame. Changing frame-format is probably the > way forward here. Good to know. Thanks! From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 18 11:24:44 2023 Received: (at 66604) by debbugs.gnu.org; 18 Oct 2023 15:24:44 +0000 Received: from localhost ([127.0.0.1]:34489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt8Pc-0004CA-81 for submit@debbugs.gnu.org; Wed, 18 Oct 2023 11:24:44 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:61544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt8Pa-0004Bs-3j for 66604@debbugs.gnu.org; Wed, 18 Oct 2023 11:24:42 -0400 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-523100882f2so11566635a12.2 for <66604@debbugs.gnu.org>; Wed, 18 Oct 2023 08:24:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697642649; x=1698247449; darn=debbugs.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=4R4uKJZToZ0pc3Ow90TzeyrZLsMH8MHakmNKSBAvv7c=; b=EpwzaziYk2KALKT3GF5anjVLE6gBzLyEPchD/kpFe2KZlqk7xQhh3AwCeFnvVBbaW6 OU3jOi9pAEqeqeFOcskLuP7sEQSexkY6AzwTO2UIYeKt3e/5TuoXGuUMaX6cx7XwK6um A/AgM7G97dno56d+NJ7VgHc9/S7+p3qQdVhhnMneLOBRUJTo85pvKyGFF+6kL4ZJK9jA fQXyvbKtJpjyJje24qKowWmW+lYBySw84f5rwvD8svcVWcvjbhAyljDWhqEXHxvTob5L zBDjWcqu6X+eO/r6ZOgN6TcQWYSYOSNVo3GWgmgjch8v8koBwI3EXqCtCZ/QQadoPeV5 pSwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697642649; x=1698247449; 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=4R4uKJZToZ0pc3Ow90TzeyrZLsMH8MHakmNKSBAvv7c=; b=NQ1Puji+yli/2lSaoSzCtR10XnkMlEyp/QaEnE9pgh6GAf8t8l2qDFrms/ztsFgsUf ceQAL9ttzJEaCDSkvq6PUknqSzhBe7MvFJ41BBCMqUo3D5iFnehxk0I84OI3qVlj3jf3 OK+7q6KUcdSbAvQTgKsg1x83nMYg4bwMP8NIsKd4VN2copnd9SKIdg2RXAG+AhQApo6R agwzyOCfWEpb8J8ZHFEIP+0Z1ZucWhalTKz+9f8ABFCXxzXdFnR3oi4J2CIP5cNCIN0t 0xPbPXqMqgE1NtjMw9Gd34GuTakbUhsQ1Ww6O4baZl0zCiZJ5AQ0YJeJnHe7wdhN5jeS Y4HA== X-Gm-Message-State: AOJu0YzDouVdoJbnj2SuxWiOa/IepsdWpZJ/3E2+I1LL8slwUbSwOa/E 66UlRqj5g2YWRLV57FbxLbuaY6SP7ew= X-Google-Smtp-Source: AGHT+IFYUqLmNNuXnqAXw4YbzMGenh9+NcDkrbvjfi2Ie6+2KIcjbXpu8HmT3ZbE/1N29OxNuLQMCw== X-Received: by 2002:a17:906:dac4:b0:9a1:c659:7c56 with SMTP id xi4-20020a170906dac400b009a1c6597c56mr4527969ejb.22.1697642648664; Wed, 18 Oct 2023 08:24:08 -0700 (PDT) Received: from Mini.fritz.box (p4fe3a178.dip0.t-ipconnect.de. [79.227.161.120]) by smtp.gmail.com with ESMTPSA id b5-20020a1709062b4500b0099297782aa9sm1875207ejg.49.2023.10.18.08.24.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 08:24:08 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Wed, 18 Oct 2023 17:14:19 +0200") References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> Date: Wed, 18 Oct 2023 17:24:07 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mattias Engdeg=C3=A5rd writes: > 18 okt. 2023 kl. 16.42 skrev Gerd M=C3=B6llmann : > >> So, in the attached patch, I've sent something in addition after that, >> to make it look a bit prettier. > > Thank you, it works all right. > >> Should be fixed in the attached patch. > > This too. > > By the way, I can confirm that changing default-directory (M-x cd) in > the *gud* buffer to where the source is located allows Emacs to find > the source of the current frame. Changing frame-format is probably the > way forward here. And the attachment forgotten, of course --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Gud-LLDB-completions-bug-66604.patch Content-Description: patch v3 >From c8e335ede44ffa1f7f65ba141cbf9866b2db83c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerd=20M=C3=B6llmann?= Date: Wed, 18 Oct 2023 09:24:45 +0200 Subject: [PATCH] Gud LLDB completions (bug#66604) * etc/emacs_lldb.py: Remove xcomplete. * lisp/progmodes/gud.el: Implement lldb command completions. --- etc/emacs_lldb.py | 30 -------------- lisp/progmodes/gud.el | 94 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 91 insertions(+), 33 deletions(-) diff --git a/etc/emacs_lldb.py b/etc/emacs_lldb.py index f2c7a7987c7..fa8d95d7b5b 100644 --- a/etc/emacs_lldb.py +++ b/etc/emacs_lldb.py @@ -203,35 +203,6 @@ def xdebug_print(debugger, command, result, internal_dict): """Print Lisp_Objects using safe_debug_print()""" debugger.HandleCommand(f"expr safe_debug_print({command})") -# According to SBCommanInterpreter.cpp, the return value of -# HandleCompletions is as follows: -# -# Index 1 to the end contain all the completions. -# -# At index 0: -# -# If all completions have a common prefix, this is the shortest -# completion, with the common prefix removed from it. -# -# If it is the completion for a whole word, a space is added at the -# end. -# -# So, the prefix is what could be added to make the command partially -# complete. -# -# If there is no common prefix, index 0 has an empty string "". - -def xcomplete(debugger, command, result, internal_dict): - """Print completions for COMMAND.""" - interpreter = debugger.GetCommandInterpreter() - string_list = lldb.SBStringList() - interpreter.HandleCompletion(command, len(command), len(command), - -1, string_list) - list = "" - for i in range(string_list.GetSize()): - list += '"' + string_list.GetStringAtIndex(i) + '" ' - result.AppendMessage("(" + list + ")") - ######################################################################## # Formatters @@ -336,7 +307,6 @@ def enable_type_category(debugger, category): def __lldb_init_module(debugger, internal_dict): define_command(debugger, xbacktrace) define_command(debugger, xdebug_print) - define_command(debugger, xcomplete) define_type_summary(debugger, "Lisp_Object", type_summary_Lisp_Object) define_type_synthetic(debugger, "Lisp_Object", Lisp_Object_Provider) enable_type_category(debugger, "Emacs") diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index ea5a3580629..71adbcf1599 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3850,7 +3850,7 @@ gud-tooltip-tips ;; 'gud-lldb-history' and 'gud-gud-lldb-command-name' are required -;; because gud-symbol uses their values if they are present. Their +;; because 'gud-symbol' uses their values if they are present. Their ;; names are deduced from the minor-mode name. (defvar gud-lldb-history nil) @@ -3859,7 +3859,7 @@ gud-gud-lldb-command-name :type 'string) (defun gud-lldb-marker-filter (string) - "Deduce interesting stuff from output STRING." + "Deduce interesting stuff from process output STRING." (cond (;; Process 72668 stopped ;; * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 ;; frame #0: ...) at emacs.c:1310:9 [opt] @@ -3879,6 +3879,88 @@ gud-lldb-marker-filter (setq gud-overlay-arrow-position nil))) string) +;; According to SBCommanInterpreter.cpp, the return value of +;; HandleCompletions is as follows: +;; +;; Index 1 to the end contain all the completions. +;; +;; At index 0: +;; +;; If all completions have a common prefix, this is the shortest +;; completion, with the common prefix removed from it. +;; +;; If it is the completion for a whole word, a space is added at the +;; end. +;; +;; So, the prefix is what could be added to make the command partially +;; complete. +;; +;; If there is no common prefix, index 0 has an empty string "". + +(defun gud-lldb-fetch-completions () + "Return the data to complete the LLDB command before point." + (let* ((process (get-buffer-process gud-comint-buffer)) + (start (process-mark process)) + (end (point)) + (to-complete (buffer-substring-no-properties start end)) + (output-buffer (get-buffer-create "*lldb-completions*"))) + ;; Send the completion command with output to our buffer + (with-current-buffer output-buffer + (erase-buffer)) + (comint-redirect-send-command-to-process + (format "script --language python -- gud_complete('%s')" + to-complete) + output-buffer process nil t) + ;; Wait for output + (unwind-protect + (while (not comint-redirect-completed) + (accept-process-output process)) + (comint-redirect-cleanup)) + ;; Process the completion output. + (with-current-buffer output-buffer + (goto-char (point-min)) + (when (search-forward "gud-completions:" nil t) + (read (current-buffer)))))) + +(defun gud-lldb-completions (_context _command) + "Completion table for LLDB commands." + (gud-gdb-completions-1 (gud-lldb-fetch-completions))) + +(defun gud-lldb-completion-at-point () + "Return the data to complete the LLDB command before point." + (let* ((end (point)) + (line-start (comint-line-beginning-position)) + (start (save-excursion + (skip-chars-backward "^ " line-start) + (point)))) + (list (copy-marker start t) end + (completion-table-dynamic + (apply-partially #'gud-lldb-completions + (buffer-substring line-start start)))))) + +(defvar gud-lldb-def-python-completion-function + " +def gud_complete(s): + interpreter = lldb.debugger.GetCommandInterpreter() + string_list = lldb.SBStringList() + interpreter.HandleCompletion(s, len(s), len(s), -1, string_list) + print('gud-completions: (') + for i in range(string_list.GetSize()): + print(f'\"{string_list.GetStringAtIndex(i)}\" ') + print(')') +" + "LLDB command to define a Python function for completion.") + +(defun gud-lldb-send-python (python) + (gud-basic-call "script --language python --") + (mapc #'gud-basic-call (split-string python "\n")) + (gud-basic-call "exit()")) + +(defun gud-lldb-initialize () + "Initialize the LLDB process as needed for this debug session." + (gud-lldb-send-python gud-lldb-def-python-completion-function) + (gud-basic-call "script --language python -- print('Gud initialized')")) + ;;;###autoload (defun lldb (command-line) "Run lldb passing it COMMAND-LINE as arguments. @@ -3979,11 +4061,17 @@ lldb nil "Run the program.") + (add-hook 'completion-at-point-functions + #'gud-lldb-completion-at-point + nil 'local) + (keymap-local-set "" #'completion-at-point) + (gud-set-repeat-map-property 'gud-gdb-repeat-map) (setq comint-prompt-regexp (rx line-start "(lldb)" (0+ blank))) + (setq comint-process-echoes t) (setq paragraph-start comint-prompt-regexp) (setq gud-running nil) - (setq gud-filter-pending-text nil) + (gud-lldb-initialize) (run-hooks 'lldb-mode-hook)) (provide 'gud) -- 2.42.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 18 12:06:35 2023 Received: (at 66604) by debbugs.gnu.org; 18 Oct 2023 16:06:36 +0000 Received: from localhost ([127.0.0.1]:34549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt947-0008L6-La for submit@debbugs.gnu.org; Wed, 18 Oct 2023 12:06:35 -0400 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]:43431) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt941-0008Kk-O9 for 66604@debbugs.gnu.org; Wed, 18 Oct 2023 12:06:33 -0400 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2c51682fddeso48553861fa.1 for <66604@debbugs.gnu.org>; Wed, 18 Oct 2023 09:06:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697645157; x=1698249957; 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=B9lerwIE+XtDWVKTaa0hpgmBpUDCiQiaBiUrbiQWhIE=; b=R8MrrPtih2QDPXDdiDrmJMuzI2JsDLnqovt9JPs3tzK+4XfNFwrvYQ87eR+Ey6jAUm nUz9vRQtU1ZTPBkm1qw3GEfdXt5eaBjlAlh/cmrCVfXAEjrtrfTzva6OykY5fSxHQUL+ ACkDJYS7YNRS2pHFfQ+H6gVjumhydZi4cGXH7sCKRNQG689lyqNDRCYFBUFWz6ExH59S FJVsLP2+zyQo1oxhYzWlNQsztwyZxv+RsxxPXpYf8enhhNrKVL13+L8Op5OJ0DDcT0fT GGTKzFnyeX101FhdduMUvyJZVjKt1Gf6vzbvNLq0bOdQ3bFsIfCc8NWzgOKmNG3sNhsc 4adA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697645157; x=1698249957; 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=B9lerwIE+XtDWVKTaa0hpgmBpUDCiQiaBiUrbiQWhIE=; b=KCB9+moQKwZ7x/jKES9FeT8BwY3uRToGXDTvskgh9niQRlwxGQG/ga8uoh88QZfCO3 8ADwWUH/pppBF5XF90ZDw0+PYNg+075fi1Z8S5todKOO2ahDKA5GxK+4AvRl9lnKYZpj dA9FyERrk0GNv9+qruAKrd8wRMJiokK+IwdyX/Vt22rTSXvHmR0EV2+v/klogaiWeHM6 cbGDk9f/P1qWKaIbS3bgoyS5y2b3v1l+phUVxmK707fm62gW7TJS+5Cz0ojQNAD68OMx /HfhoPXPRuQh84VsA72r+HD5VBDbWOly30W9BiVpn0MR2AQ741QIosn7ruBXXmop48OS RIKg== X-Gm-Message-State: AOJu0Yy5vBhomKIYP4GYGw0AOTzeHfU6QEukUFKmVAloN1MQNiqinnQR wWYoimV4dTVjRaI+j66r+os= X-Google-Smtp-Source: AGHT+IGzECsfrKpWvm4POf4SR/Ts1hZjrdWV4i4tXbA9HhrOdsH2PjYJ0MKu/V1eb7bUshOkVch71A== X-Received: by 2002:a05:651c:4c8:b0:2c5:2357:c6a7 with SMTP id e8-20020a05651c04c800b002c52357c6a7mr2587033lji.17.1697645156947; Wed, 18 Oct 2023 09:05:56 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id w10-20020a2e998a000000b002c4faf47378sm760469lji.28.2023.10.18.09.05.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Oct 2023 09:05:56 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#66604: [PATCH] Gud LLDB completions From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Wed, 18 Oct 2023 18:05:55 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <586BC992-4776-4C8B-9700-821FF04A1046@gmail.com> References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> To: =?utf-8?Q?Gerd_M=C3=B6llmann?= X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 18 okt. 2023 kl. 17.23 skrev Gerd M=C3=B6llmann = : > Does the attached also work? It would have the advantage of being = more > readable. The Python part. Yes, it works. A minor request is that if there is only a single completion, then a = space should be added after completing the word. For example, (lldb) sett should add the 5 characters "ings " to the input. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 18 12:58:23 2023 Received: (at 66604) by debbugs.gnu.org; 18 Oct 2023 16:58:23 +0000 Received: from localhost ([127.0.0.1]:34574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt9sF-0001g0-1Q for submit@debbugs.gnu.org; Wed, 18 Oct 2023 12:58:23 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]:61454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt9sC-0001fO-2S for 66604@debbugs.gnu.org; Wed, 18 Oct 2023 12:58:21 -0400 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-99c1c66876aso1148418366b.2 for <66604@debbugs.gnu.org>; Wed, 18 Oct 2023 09:57:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697648266; x=1698253066; darn=debbugs.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=i5SgSraTtEGFl+syu7cdEu5MPmYg60dDmyUdZ9TteMU=; b=LK93ONeHzQc73nJro+4cRbmEoVN5jXB/75+hOT5Ax8st7LglfIji+zuY2tR4Rm/6Yx oZJx8CZypsEXcLn2bqa+GD0okuM7XCJ+drZfCpJRTEIaXF1KYvp0Kfr8tT0uzpr/pSjh uD/P1m4LDkphB35iQtQpDAnnSNR91vHmHSqWXdjBxeLuO+7yUiXV0hF1JM4JCFJlTp9i nzaF5+FfDfViv06f/ncHNDHNgS7pjfDQZMYTsc8XagjAbk5IO6aWtnU7mABnoIGAIwcI cleMsEwh735cxv5qilA3uMjPrZwce+lA3z5Of4V582aJ0uEUKsbdGX7A1As3ZIKbCzrA k6Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697648266; x=1698253066; 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=i5SgSraTtEGFl+syu7cdEu5MPmYg60dDmyUdZ9TteMU=; b=a7RWUAqVEePaB8mtUP/ev8/luoxGRl18gk5F0vmq/NkrnEqpAjrpBb6VFeTjSwvs9k SmiQc9IF6Xmn8/52V0QU/R4eE3WGPd3LmZMH5KwDqg12WcwxVofqE1QS7B4/fn9RWv/l L6a3fExU0Xg3Eext4lyez/+xJ+2JMXxV/T84cIVmBfa7BTZo8EtQ4bf8FhkADXG/zJAV 0a/IdNW0ER2WLYDquXcpIInIWJcCRGI9awObx4jPxG0dafdekFu4QPN1bB5/vJGKA8la d8IVxg98BPtENlWkkX2JEfNEZeNFQkbj2OQCZgRhuoZPa7UyGK+INk3KIwn6QVFpGoU/ x1yA== X-Gm-Message-State: AOJu0YxyL0ofaCotf+pQARMftplGwi944xQIzUKhu/poWq4O7rUnR4Nm 5vSRQfEn7OibhWOTzoiO9wu9wCVw9j8= X-Google-Smtp-Source: AGHT+IHUmE/0upgRFpenieZyKxwM2FV5yryVBceSAOVG6XSJdbrr/T8kdhnXsBSbfeB+MbFT1IaG5A== X-Received: by 2002:a17:907:25c1:b0:9be:ef46:6b9c with SMTP id ae1-20020a17090725c100b009beef466b9cmr4425571ejc.70.1697648266171; Wed, 18 Oct 2023 09:57:46 -0700 (PDT) Received: from Mini.fritz.box (p4fe3a178.dip0.t-ipconnect.de. [79.227.161.120]) by smtp.gmail.com with ESMTPSA id lf16-20020a170906ae5000b0099cd1c0cb21sm1988068ejb.129.2023.10.18.09.57.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 09:57:45 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: <586BC992-4776-4C8B-9700-821FF04A1046@gmail.com> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Wed, 18 Oct 2023 18:05:55 +0200") References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> <586BC992-4776-4C8B-9700-821FF04A1046@gmail.com> Date: Wed, 18 Oct 2023 18:57:44 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mattias Engdeg=C3=A5rd writes: > 18 okt. 2023 kl. 17.23 skrev Gerd M=C3=B6llmann : > >> Does the attached also work? It would have the advantage of being more >> readable. The Python part. > > Yes, it works. > A minor request is that if there is only a single completion, then a spac= e should be added after completing the word. For example, > > (lldb) sett > > should add the 5 characters "ings " to the input. Yeah, that's right. Could ypu please try the attached patch? This of works for me, but a bit unnerving its that Corfu pops up after tryping 3 character with a single candidate, but that's something I can live with, I guess. Maybe it's even normal, now that i think of it. What completion are you using? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Gud-LLDB-completions-bug-66604.patch Content-Description: patch adding space >From 36b4f27ee0a97880b9eb19c1f6f2c9f1f6b22437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerd=20M=C3=B6llmann?= Date: Wed, 18 Oct 2023 09:24:45 +0200 Subject: [PATCH] Gud LLDB completions (bug#66604) * etc/emacs_lldb.py: Remove xcomplete. * lisp/progmodes/gud.el: Implement lldb command completions. --- etc/emacs_lldb.py | 30 ------------- lisp/progmodes/gud.el | 97 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 94 insertions(+), 33 deletions(-) diff --git a/etc/emacs_lldb.py b/etc/emacs_lldb.py index f2c7a7987c7..fa8d95d7b5b 100644 --- a/etc/emacs_lldb.py +++ b/etc/emacs_lldb.py @@ -203,35 +203,6 @@ def xdebug_print(debugger, command, result, internal_dict): """Print Lisp_Objects using safe_debug_print()""" debugger.HandleCommand(f"expr safe_debug_print({command})") -# According to SBCommanInterpreter.cpp, the return value of -# HandleCompletions is as follows: -# -# Index 1 to the end contain all the completions. -# -# At index 0: -# -# If all completions have a common prefix, this is the shortest -# completion, with the common prefix removed from it. -# -# If it is the completion for a whole word, a space is added at the -# end. -# -# So, the prefix is what could be added to make the command partially -# complete. -# -# If there is no common prefix, index 0 has an empty string "". - -def xcomplete(debugger, command, result, internal_dict): - """Print completions for COMMAND.""" - interpreter = debugger.GetCommandInterpreter() - string_list = lldb.SBStringList() - interpreter.HandleCompletion(command, len(command), len(command), - -1, string_list) - list = "" - for i in range(string_list.GetSize()): - list += '"' + string_list.GetStringAtIndex(i) + '" ' - result.AppendMessage("(" + list + ")") - ######################################################################## # Formatters @@ -336,7 +307,6 @@ def enable_type_category(debugger, category): def __lldb_init_module(debugger, internal_dict): define_command(debugger, xbacktrace) define_command(debugger, xdebug_print) - define_command(debugger, xcomplete) define_type_summary(debugger, "Lisp_Object", type_summary_Lisp_Object) define_type_synthetic(debugger, "Lisp_Object", Lisp_Object_Provider) enable_type_category(debugger, "Emacs") diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index ea5a3580629..5470c0ef11f 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3850,7 +3850,7 @@ gud-tooltip-tips ;; 'gud-lldb-history' and 'gud-gud-lldb-command-name' are required -;; because gud-symbol uses their values if they are present. Their +;; because 'gud-symbol' uses their values if they are present. Their ;; names are deduced from the minor-mode name. (defvar gud-lldb-history nil) @@ -3859,7 +3859,7 @@ gud-gud-lldb-command-name :type 'string) (defun gud-lldb-marker-filter (string) - "Deduce interesting stuff from output STRING." + "Deduce interesting stuff from process output STRING." (cond (;; Process 72668 stopped ;; * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 ;; frame #0: ...) at emacs.c:1310:9 [opt] @@ -3879,6 +3879,91 @@ gud-lldb-marker-filter (setq gud-overlay-arrow-position nil))) string) +;; According to SBCommanInterpreter.cpp, the return value of +;; HandleCompletions is as follows: +;; +;; Index 1 to the end contain all the completions. +;; +;; At index 0: +;; +;; If all completions have a common prefix, this is the shortest +;; completion, with the common prefix removed from it. +;; +;; If it is the completion for a whole word, a space is added at the +;; end. +;; +;; So, the prefix is what could be added to make the command partially +;; complete. +;; +;; If there is no common prefix, index 0 has an empty string "". + +(defun gud-lldb-fetch-completions () + "Return the data to complete the LLDB command before point." + (let* ((process (get-buffer-process gud-comint-buffer)) + (start (process-mark process)) + (end (point)) + (to-complete (buffer-substring-no-properties start end)) + (output-buffer (get-buffer-create "*lldb-completions*"))) + ;; Send the completion command with output to our buffer + (with-current-buffer output-buffer + (erase-buffer)) + (comint-redirect-send-command-to-process + (format "script --language python -- gud_complete('%s')" + to-complete) + output-buffer process nil t) + ;; Wait for output + (unwind-protect + (while (not comint-redirect-completed) + (accept-process-output process)) + (comint-redirect-cleanup)) + ;; Process the completion output. + (with-current-buffer output-buffer + (goto-char (point-min)) + (when (search-forward "gud-completions:" nil t) + (let ((completions (read (current-buffer)))) + (if (string-suffix-p " " (car completions)) + (list (concat (cl-second completions) " ")) + (cdr completions))))))) + +(defun gud-lldb-completions (_context _command) + "Completion table for LLDB commands." + (gud-lldb-fetch-completions)) + +(defun gud-lldb-completion-at-point () + "Return the data to complete the LLDB command before point." + (let* ((end (point)) + (line-start (comint-line-beginning-position)) + (start (save-excursion + (skip-chars-backward "^ " line-start) + (point)))) + (list (copy-marker start t) end + (completion-table-dynamic + (apply-partially #'gud-lldb-completions + (buffer-substring line-start start)))))) + +(defvar gud-lldb-def-python-completion-function + " +def gud_complete(s): + interpreter = lldb.debugger.GetCommandInterpreter() + string_list = lldb.SBStringList() + interpreter.HandleCompletion(s, len(s), len(s), -1, string_list) + print('gud-completions: (') + for i in range(string_list.GetSize()): + print(f'\"{string_list.GetStringAtIndex(i)}\" ') + print(')') +" + "LLDB command to define a Python function for completion.") + +(defun gud-lldb-send-python (python) + (gud-basic-call "script --language python --") + (mapc #'gud-basic-call (split-string python "\n")) + (gud-basic-call "exit()")) + +(defun gud-lldb-initialize () + "Initialize the LLDB process as needed for this debug session." + (gud-lldb-send-python gud-lldb-def-python-completion-function) + (gud-basic-call "script --language python -- print('Gud initialized')")) + ;;;###autoload (defun lldb (command-line) "Run lldb passing it COMMAND-LINE as arguments. @@ -3979,11 +4064,17 @@ lldb nil "Run the program.") + (add-hook 'completion-at-point-functions + #'gud-lldb-completion-at-point + nil 'local) + (keymap-local-set "" #'completion-at-point) + (gud-set-repeat-map-property 'gud-gdb-repeat-map) (setq comint-prompt-regexp (rx line-start "(lldb)" (0+ blank))) + (setq comint-process-echoes t) (setq paragraph-start comint-prompt-regexp) (setq gud-running nil) - (setq gud-filter-pending-text nil) + (gud-lldb-initialize) (run-hooks 'lldb-mode-hook)) (provide 'gud) -- 2.42.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 18 14:55:58 2023 Received: (at 66604) by debbugs.gnu.org; 18 Oct 2023 18:55:58 +0000 Received: from localhost ([127.0.0.1]:34684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtBi2-0008AH-7H for submit@debbugs.gnu.org; Wed, 18 Oct 2023 14:55:58 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]:43231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtBhz-00089x-On for 66604@debbugs.gnu.org; Wed, 18 Oct 2023 14:55:56 -0400 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-53e16f076b3so17762a12.0 for <66604@debbugs.gnu.org>; Wed, 18 Oct 2023 11:55:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697655323; x=1698260123; 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=Z8+iCbBVxPIDLQsOmwKylAOrqJd8CX+kXvmeBUAqUhE=; b=cgkV4ydBryZXIighxLyGzLNtV61p9s9V5Vbj9Qxs+5jzr05rKiL/T3T8l9q9gz7vvz PeD6KNBdq34o2Aukci5N+dglow7c+XKcCPeWs/RqrB1c7qDE79e4JNfhv3qfW7XxU4Or H0MZaD7TOFrdYPnv7sPQeSY0PvyymxQFqJR3nbafBrlBv2M4EGaQ/wfgVwmdOHhoFFzj xjKZofZDGPqBYQDB7Uz+Z7sH4LQTkPgtri7Ru8b5HPWUyJMLOk8nyI5nYNBBsbc6Fyzd znJ2H4apmxangToJMzKxBwK5c1+Vq6mBBKicyGcfN1Q1xlCu1R4cUD6ouEZsX6wI33mL YMSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697655323; x=1698260123; 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=Z8+iCbBVxPIDLQsOmwKylAOrqJd8CX+kXvmeBUAqUhE=; b=TrtO8WTKa5H1TP7kFLGs4JHsZX/pEiUWkt4mR4KqneeIynb5V9skP2zecf4kQ5ZS4v QYdRz7C/HCd9/p8XXqNM8MKVffcQS7AEKP2s6QWO0yM9COMGEJWqcl5ZkEsGn3a57IpI hRwyQPjwSlAiEH6OtTx/ZaNVLPXffqJeQLYpJQ40gKnBqa07/rFY6WfUONFmQaNMqEQL i3fShzr15DJ21sVJ5ri/eptddNVJftio12IA24FWo+DvmNUmo0L1mxFOjMp5BegoK4KI pgM1hUSlegrXAKnsLKwxDFz7qhuZhHVS11fMCT3X6UIhQBUiLmV35zVBRuMcptg/DZfA ujPQ== X-Gm-Message-State: AOJu0Yw3PoZRj11aE2JvnTFM8mfEqp2RreWBaYfP8VIT1E2B/1T/lMRs VY+wq6gsA79FOdmBoj4qa2GLAA0WNUk= X-Google-Smtp-Source: AGHT+IGI/GZd/Mu79ju89YpI6+Mctgpdx3SoqePFYSmjssMHvJXi6oSKBowQgrU5FODFX5/jofAViA== X-Received: by 2002:a17:907:7215:b0:9a9:f042:deb9 with SMTP id dr21-20020a170907721500b009a9f042deb9mr207182ejc.19.1697655322925; Wed, 18 Oct 2023 11:55:22 -0700 (PDT) Received: from Mini.fritz.box (p4fe3a178.dip0.t-ipconnect.de. [79.227.161.120]) by smtp.gmail.com with ESMTPSA id bo16-20020a170906d05000b00977eec7b7e8sm2200615ejb.68.2023.10.18.11.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 11:55:22 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Wed, 18 Oct 2023 18:57:44 +0200") References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> <586BC992-4776-4C8B-9700-821FF04A1046@gmail.com> Date: Wed, 18 Oct 2023 20:55:20 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Gerd M=C3=B6llmann writes: > Mattias Engdeg=C3=A5rd writes: > >> 18 okt. 2023 kl. 17.23 skrev Gerd M=C3=B6llmann : >> >>> Does the attached also work? It would have the advantage of being more >>> readable. The Python part. >> >> Yes, it works. >> A minor request is that if there is only a single completion, then a spa= ce should be added after completing the word. For example, >> >> (lldb) sett >> >> should add the 5 characters "ings " to the input. > > Yeah, that's right. > > Could ypu please try the attached patch? This of works for me, but a > bit unnerving its that Corfu pops up after tryping 3 character with a > single candidate, but that's something I can live with, I guess. Maybe > it's even normal, now that i think of it. > > What completion are you using? Meanwhile I've cleaned this up, and committed it to master. Thanks to you again, Matthias! And closing... From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 18 14:56:04 2023 Received: (at control) by debbugs.gnu.org; 18 Oct 2023 18:56:04 +0000 Received: from localhost ([127.0.0.1]:34688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtBi8-0008Ax-Hu for submit@debbugs.gnu.org; Wed, 18 Oct 2023 14:56:04 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:55743) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtBi7-0008AG-8h for control@debbugs.gnu.org; Wed, 18 Oct 2023 14:56:03 -0400 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-99de884ad25so1157752466b.3 for ; Wed, 18 Oct 2023 11:55:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697655331; x=1698260131; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:subject:from:to:message-id :date:from:to:cc:subject:date:message-id:reply-to; bh=aeUHUv202n228g/yqSdUJZqRdeVEFQMmlUbtEZ7tVJc=; b=Tsc4ZhBTahMdscTKjoqOaeLuQ39XQbwMuqnDinPlpBt04BS0JspZ12LJ2J7ZoTHqvQ ofL1sWjNeTB74scyhTQUAXqnvON9eRGNIPUfVJ5f6Wu9+a48X5BOVpy9nMindaokd9IT ckgTG/SyqgqdLZtK93/gZN/uRGWsfZh6F7zjRHhE5MKw+H2eE6LWIAiLbU7CwmEvdLW/ m5ct5sgv41YI/9Wn2paFhv0zwtvh4LOVh9NHV9BLXW4GptVtyk1MA8cBGm60isES7nYr zbvH4f+9xLXTsNSUxgykSuwWK2122sx/Fvm5DiqS2c7ogQ12IwTNDzsvHk1ZI//off48 aFNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697655331; x=1698260131; h=content-transfer-encoding:mime-version:subject:from:to:message-id :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aeUHUv202n228g/yqSdUJZqRdeVEFQMmlUbtEZ7tVJc=; b=O2cYxSDAEd+BXI4djkkfzy91KcxFpDPzCRPitLZKsomIZ8bzG3M+/xQ3dDYhTI2inh 3itgCiiStciRuAKoqvASjm4/d29asTrIsa2OVbuoRg0mj/X47M9anN+60dQCA2rt/8oX epsIZRgnBiG/NT+4PCCBsWBk/frV1zJ2PZY/ye5Sx7nj+KaJ98IsC7b6zwZ3SliO2B5h QvwTBjWB++I5jry47OUYFLHWRRKWu9pLCHbdndBH//eE2dpp+KKZRdsOR2O+W2T8T791 6fSJeo34btikO9iy3xfpcSUfAzGHnh9iiBLuBy9mL0/oKpSPBgT7ZSEXL8sWNj0NyHR3 pd3Q== X-Gm-Message-State: AOJu0Yx51fQ/tAhQcBI4ycjQpWFsNf/TBy4Smqe+8bD/m4MuAnumiZXI p0P6Infq/u1+4ea3wO07H+4CMlfeWc8= X-Google-Smtp-Source: AGHT+IFPLZksdYqt+BFrmzY+FhKqyO7eJZ54S/PVpPhbmaAPwD43ueavukeUm0b6d3bCnfKK+l8/Qg== X-Received: by 2002:a17:907:968f:b0:9bd:a73a:7a0a with SMTP id hd15-20020a170907968f00b009bda73a7a0amr88884ejc.58.1697655331018; Wed, 18 Oct 2023 11:55:31 -0700 (PDT) Received: from Mini.fritz.box (p4fe3a178.dip0.t-ipconnect.de. [79.227.161.120]) by smtp.gmail.com with ESMTPSA id t12-20020a1709060c4c00b00997e00e78e6sm2183635ejf.112.2023.10.18.11.55.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 11:55:30 -0700 (PDT) Date: Wed, 18 Oct 2023 20:55:30 +0200 Message-Id: To: control@debbugs.gnu.org From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Subject: control message for bug #66604 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 66604 30.1 quit From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 02:31:42 2023 Received: (at 66604) by debbugs.gnu.org; 19 Oct 2023 06:31:42 +0000 Received: from localhost ([127.0.0.1]:35578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtMZK-00026d-5t for submit@debbugs.gnu.org; Thu, 19 Oct 2023 02:31:42 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:48166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtMZF-00026M-7Y for 66604@debbugs.gnu.org; Thu, 19 Oct 2023 02:31:41 -0400 Received: by mail-pf1-x443.google.com with SMTP id d2e1a72fcca58-6b5e6301a19so5192703b3a.0 for <66604@debbugs.gnu.org>; Wed, 18 Oct 2023 23:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697697065; x=1698301865; 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=cxmXjzDCnbSynVKmzemvIiglJslBhPJ1RZ+ZBjmDipI=; b=atRebSSkICu6ZinmUTENPuY+oBfMry2Jt5R2O8DxMNGpNZpCdUlxg3TlhTNwX3tZ2A 7TtWXtsUdAvCHsi4q+oL1kjvZ6VAirdQBXd9u9ZkexiN7y9U5cQMpnsyqy1HhGQDewcy iTRagsMjUtlw8Kxsv2M0yaTurUr20vHpEoaFwW249dGhNUO7nEHBJJHa9nx1KB2pl1cR Jj1fhru4LXvafBXL8bwqBYpiwEu6bczPVVkNcUxUXn4G65/Wqn+hI7K1WxzI1kJ1SNy7 am06Lr8qZ3CfG5Lb9ODz3Wi2NbR2ZP/gerBCUcjSgMbIMv93k7cLwVhRt7StIyUnEjov eUEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697697065; x=1698301865; 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=cxmXjzDCnbSynVKmzemvIiglJslBhPJ1RZ+ZBjmDipI=; b=rWBtBRU1dakPelkgpv6UgoGiPWXalWtU2HExiAhirjWQWzCiuFEZKr443+58MhMKD8 oj8QE/GrrI4RMAowS43SynfJHqvaJLEM5i/o9lizkxlODMF+PtnRvtbBjoRSAxqNUCgl 6NvPyW1b5v0nQ749VDoGhbD+koedwobq1WmYX4NMFNmGtyT+f2Ija8HAoxSTDczXp+MH ExcNlF1pzW78tfIdovorE2z0qSAw7Ht3E46mb4YA3cz4h77Xg1itYoUheBaNDHOSg81C GAVZRUWg2wrG3p09+dwiiXhSZzPiQVWuFemS310kN8ygW+yEHyvoWBYU+z0ggrinaWAE aH6Q== X-Gm-Message-State: AOJu0YxDzMTMLRf9pPYqgABBB/7FmdsH8cgo1l2UyGvsMEkiQjfpzZnZ imgVHLVzOX46KH5Lf4HUfS8821MAJoryog== X-Google-Smtp-Source: AGHT+IE1W427GY9m/A8IzvAQ17kCQwDFnZa4yjTqx3pYfxOOleexGJ4M/nRRaeyt7wvCaID73tmivw== X-Received: by 2002:a05:6a00:24c6:b0:693:3cbc:3d8e with SMTP id d6-20020a056a0024c600b006933cbc3d8emr1373001pfv.0.1697697064810; Wed, 18 Oct 2023 23:31:04 -0700 (PDT) Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id a129-20020a624d87000000b006906aaf1e4dsm4500704pfb.150.2023.10.18.23.31.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 23:31:04 -0700 (PDT) From: Visuwesh To: Gerd =?utf-8?Q?M=C3=B6llmann?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Wed, 18 Oct 2023 16:42:46 +0200") References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> Date: Thu, 19 Oct 2023 12:01:02 +0530 Message-ID: <87il735djt.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org, Mattias =?utf-8?Q?Engdeg=C3=A5rd?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) [=E0=AE=AA=E0=AF=81=E0=AE=A4=E0=AE=A9=E0=AF=8D =E0=AE=85=E0=AE=95=E0=AF=8D= =E0=AE=9F=E0=AF=8B=E0=AE=AA=E0=AE=B0=E0=AF=8D 18, 2023] Gerd M=C3=B6llmann = wrote: >> Another thing that is a bit annoying with the new lldb support is that e= very 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? > > Should be fixed in the attached patch. If I guess that right, it's > comint that echoes. I have that turned off globally here for M-x shell. IME, this issue is better solved by forcing the process to not use any line editing library such as readline. > (gud-set-repeat-map-property 'gud-gdb-repeat-map) > (setq comint-prompt-regexp (rx line-start "(lldb)" (0+ blank))) > + (setq comint-process-echoes t) As this can possibly lock Emacs in remote lldb sessions over TRAMP for the entire duration of no echo from process. A good way to check is to set that variable to t in a remote bash shell and say `sleep 10' and enjoy the locked up Emacs for 10 seconds. :-) This happens due to the use of accept-process-output to remove the echoed back input line IIRC. > (setq paragraph-start comint-prompt-regexp) > (setq gud-running nil) > (setq gud-filter-pending-text nil) > + (gud-lldb-initialize) > (run-hooks 'lldb-mode-hook)) >=20=20 > (provide 'gud) From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 02:56:43 2023 Received: (at 66604) by debbugs.gnu.org; 19 Oct 2023 06:56:43 +0000 Received: from localhost ([127.0.0.1]:35709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtMxW-0003A3-UD for submit@debbugs.gnu.org; Thu, 19 Oct 2023 02:56:43 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:45532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtMxU-00039p-Md for 66604@debbugs.gnu.org; Thu, 19 Oct 2023 02:56:41 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-9ba1eb73c27so1251110766b.3 for <66604@debbugs.gnu.org>; Wed, 18 Oct 2023 23:56:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697698568; x=1698303368; 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=0FlBuxRKy5bSXsCk8DxDUQKPv1vG0PeyYjLk7oHchEo=; b=jyQa0JOVqkC+/+jpAredyjscevVKIofGhRPmhm0HBHbc2ZQsXvXY1P8p9WEIbtuObn dXi9JoBgzbwJ/KWR5nwuFeM2acB1P0k8xtsMvIVElSsRc6IuHSK459LI5SBESnzTeVuF 0gfEzZtOf81MdC67eoW9ew6Dv0RkG0KtBYOiIjYc/V1vmZfDQFe+j/1gS01g0G7FUqHU M5c/WkSNNhmGf7PqKGIA8ud1OIkfdRpnmICN4y7DGw8nz5rrL2LcqEKMg9Ai+CBZ+Wwn eaHBgrBPybOWvueIcBcp+JKL7Wea1pza3Fl0h3BkzHXNWwp6pyCBiwLY9nVXid9XQm4q SquA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697698568; x=1698303368; 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=0FlBuxRKy5bSXsCk8DxDUQKPv1vG0PeyYjLk7oHchEo=; b=BtpwysKthCJqLR7tgFvxI1wDkOoeJg61Rd9CazcJz3mHws30f2/gC1E+AfSCwVa+mt pELxToVNDb1GIe6fZLtTTLi+WK1I0cUeFoABSygm3EBx/eqXszKTsjaMWrmMp0pr+R2j Pm0sENG1WbtqOkXRFktpNvQQAJgUcMNtoHDUGIPumPUIQw+B22Yl44FzI9QLt4OW3Jxl GTV4xwe6eTHPIN/dl9qam8NgKlC+3QYae1SEOdHpB0XEUyM8+dsYCXGxY798x3wE3N+r kot79L9why7rrGhkYK/l5Fezsr0Ar/h9aTuL/AEio0rMIEoTM+bjXsDWDlV13bWnirPQ hxdQ== X-Gm-Message-State: AOJu0YxTVkyZDZ3WJMkapD8MQyeX/bdEzgcha5IoJ+yNntIM6svAsP8i nWcjL764OYtgeMiKqb/rLYDMkotUjbo= X-Google-Smtp-Source: AGHT+IGUtofXWNdZWYfKGbXvGeDkhy8xGZ26vZUNfDoYI+o2kEm1V9Y1EMCHjvQ+onpPV56LH7ZJxQ== X-Received: by 2002:a17:906:99c5:b0:9be:39a4:b440 with SMTP id s5-20020a17090699c500b009be39a4b440mr1172599ejn.76.1697698567827; Wed, 18 Oct 2023 23:56:07 -0700 (PDT) Received: from Pro.fritz.box (p4fe3abd8.dip0.t-ipconnect.de. [79.227.171.216]) by smtp.gmail.com with ESMTPSA id og46-20020a1709071dee00b0099bc08862b6sm3065728ejc.171.2023.10.18.23.56.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 23:56:07 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Visuwesh Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: <87il735djt.fsf@gmail.com> (Visuwesh's message of "Thu, 19 Oct 2023 12:01:02 +0530") References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> <87il735djt.fsf@gmail.com> Date: Thu, 19 Oct 2023 08:56:06 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org, Mattias =?utf-8?Q?Engdeg=C3=A5rd?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Visuwesh writes: > [=E0=AE=AA=E0=AF=81=E0=AE=A4=E0=AE=A9=E0=AF=8D =E0=AE=85=E0=AE=95=E0=AF= =8D=E0=AE=9F=E0=AF=8B=E0=AE=AA=E0=AE=B0=E0=AF=8D 18, 2023] Gerd M=C3=B6llma= nn wrote: > >>> 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? >> >> Should be fixed in the attached patch. If I guess that right, it's >> comint that echoes. I have that turned off globally here for M-x shell. > > IME, this issue is better solved by forcing the process to not use any > line editing library such as readline. > >> (gud-set-repeat-map-property 'gud-gdb-repeat-map) >> (setq comint-prompt-regexp (rx line-start "(lldb)" (0+ blank))) >> + (setq comint-process-echoes t) > > As this can possibly lock Emacs in remote lldb sessions over TRAMP for > the entire duration of no echo from process. A good way to check is to > set that variable to t in a remote bash shell and say `sleep 10' and > enjoy the locked up Emacs for 10 seconds. :-) > This happens due to the use of accept-process-output to remove the > echoed back input line IIRC. > >> (setq paragraph-start comint-prompt-regexp) >> (setq gud-running nil) >> (setq gud-filter-pending-text nil) >> + (gud-lldb-initialize) >> (run-hooks 'lldb-mode-hook)) >>=20=20 >> (provide 'gud) Ok, patches welcome, so to say, since I have not idea how to make lldb not echo or not use its readline stuff, and so on. I'm more or less the opposite of an LLDB expert, I just need something that works on my M1 mac :-). From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 06:35:06 2023 Received: (at 66604) by debbugs.gnu.org; 19 Oct 2023 10:35:06 +0000 Received: from localhost ([127.0.0.1]:35903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtQMs-0007jA-E9 for submit@debbugs.gnu.org; Thu, 19 Oct 2023 06:35:06 -0400 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]:58529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtQMr-0007ic-1W for 66604@debbugs.gnu.org; Thu, 19 Oct 2023 06:35:05 -0400 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-507bd19eac8so4241500e87.0 for <66604@debbugs.gnu.org>; Thu, 19 Oct 2023 03:34:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697711672; x=1698316472; 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=XZ2WNd0HnHMY3rCIA4RMtMB3+0sxQQHNdnqhc2j7/FE=; b=Aqu7hzNodWkC0Ozt8/gB+VPO3vygBeJLRihOPTfc0u8bA4fLUaxRC6DpUHpouputtR yw50ISSmLSoKygjByAo5fXO5KzV91GnsDMuCnwv+eM39IEw2Tu/NEPyveyWHRES+SDpM ks+RH8poOyS0rSptLsxZvALJqs4HussYCiBhWtaxM/OMwnHAhI1eldx+G5baeLC+5HJ9 2hB2Ubg0r2zZkbBkfwWbWHToZ8W1wJuhaMN4IZY/6RdWdzyPev4OcrwMwQHssCJ2U42V LDCxRBmrXft/jACHMLMcKoidrK5G5cxj5kjE+pfGf51/zikH9VrSVIBeGIdSXbdiQXgI bQiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697711672; x=1698316472; 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=XZ2WNd0HnHMY3rCIA4RMtMB3+0sxQQHNdnqhc2j7/FE=; b=CMYN23P5eg3NzjaJKI6X+1ONEFzMUAESotv6JhZgfhoPeBYyJ0dMtu4nIn4i/r1P1R /pFzMz4krS+rtKPB9mMoJtOVHmW92je2U/y463UiFGquHbwsrb+ozV+FbDUNdUOIULdc Rd8dNUbdTeQkWhqJy4J44J1BkV5bHipmSpqGvWXMvPq7HAKm/Bus8oDm39ukX2eYiX6W mPNxuLR+s6opASOK1yalkC0nP+pJYfOdFmwZPGGJzYnDqWZoUAtSzD/2PHCUkTGtc+A0 jU1PFGe3n88WLpXSE+t1zRxErN3vMYbiuOG+ksVdr9mOSj/Q/lid0Uq3zgSYcOmySZkH qRCg== X-Gm-Message-State: AOJu0Yxl/PkZ0unYRdX6QkNaXjxQ35SlYzo1jOxo7VBtf2UBwP85wtxB 1Y+aUOjcqTFoom/17xaZABg= X-Google-Smtp-Source: AGHT+IGrymHq1gUCBNNJ8Loluxz+diwl7bKks2KlvFijgrzO2IXyfMdAMV+OR6s5l8rX86eaziMP7g== X-Received: by 2002:a19:7004:0:b0:500:c292:e44e with SMTP id h4-20020a197004000000b00500c292e44emr1075783lfc.54.1697711672145; Thu, 19 Oct 2023 03:34:32 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id a10-20020a056512020a00b00507a5f385f0sm1033455lfo.266.2023.10.19.03.34.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Oct 2023 03:34:31 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#66604: [PATCH] Gud LLDB completions From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Thu, 19 Oct 2023 12:34:30 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <27BF071E-2E0D-49F9-B595-E8A560436C50@gmail.com> References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> <586BC992-4776-4C8B-9700-821FF04A1046@gmail.com> To: =?utf-8?Q?Gerd_M=C3=B6llmann?= X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 18 okt. 2023 kl. 20.55 skrev Gerd M=C3=B6llmann = : > Meanwhile I've cleaned this up, and committed it to master. Thanks for the new feature! Completion works nicely now. It's definitely usable at this stage and belongs in the tree, but the = file.basename in the frame-format makes it a bit unfriendly to use for = any project where all source files aren't in the current directory (ie, = just about any project worth debugging). Please consider it a request = high on the wish list! From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 06:49:10 2023 Received: (at 66604) by debbugs.gnu.org; 19 Oct 2023 10:49:10 +0000 Received: from localhost ([127.0.0.1]:35912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtQaU-0008Ax-88 for submit@debbugs.gnu.org; Thu, 19 Oct 2023 06:49:10 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:60745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtQaP-00089q-NE for 66604@debbugs.gnu.org; Thu, 19 Oct 2023 06:49:08 -0400 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-53e84912038so8093789a12.1 for <66604@debbugs.gnu.org>; Thu, 19 Oct 2023 03:48:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697712512; x=1698317312; 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=jJgTbGAl46wFxj3O3QFqvw7WOxZXe74jild4m+m8BC0=; b=arA9U0Ne92HPkkk3WOeVaO9ZHDxutoKJ3kttxhzmp7vL9LKa/VrpeiDVUinktZiKYy PyamIBa7uRNtopcGbQbjdPHr5iL4ke33aUMkw/m4CsTie/1QwytounHJ4FsNLtPRnGJO 6tcONj9wAa6cb9Sd9r0IdGKzMTTSfzrINQnxHiXscWW3yqoEtXpyG6APPiuAp0un6o6z NXHph7x+pbdl0AWnE5DO0rP9JpPKUDBMWEnmDOScCFvcg07gX2X5Z9qxd+6OKJFrvftY 2Oobb1GsGrS8xvtIj4wY4QrNeRyfUTX/Cfaotd4YjgWdP7vZl1SsCdw5k4CM/bDqRzJG nm3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697712512; x=1698317312; 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=jJgTbGAl46wFxj3O3QFqvw7WOxZXe74jild4m+m8BC0=; b=TcwIil9HQnX+7rFBzYaIc8kfszfea4ZzvP1i2Wy2Z9jBWcCV5/XMn/QIgN6TrDwRyO MVnv+WCCZ5XlUDSBBkv0wXuVoUfeFWNT+kT8R5LsZTzFhBKlJTygO+dBCdembwmf7wC8 Ej86HRXZDAL3hJvSpYnqkCrUGnZlLS1L84a2gQMQPberaGlIIhNBglHa1TElJPC76Tgf nRl8RXruQCTC//s6+j3/ivoTAc3hl8ITTl5D+huSt5JyeTqrdrCC0vEqcjri1ONBbxau lVNeienEb+fDBFBhOimKoXbg3RkpA8XMpMRHJWYYO044cLOu2SBGkWbSG1Ynn+4HNFCr nwmQ== X-Gm-Message-State: AOJu0YzSnN441YnEZLewGAqWjH8em0H3Ut1Pd8GcJCZWNJ5izF56Jz0K 6fbzXe+x7KjRWlmu0ca3FVe2IKmSHkU= X-Google-Smtp-Source: AGHT+IFUm8ip0/aDvFhe2mSSxe8A0EfxXlS+s2Vgi62+M+L304jqQ9CYwm87rqiSimjiCA94JEhzRQ== X-Received: by 2002:a17:907:3e1f:b0:9a5:b878:7336 with SMTP id hp31-20020a1709073e1f00b009a5b8787336mr1527797ejc.7.1697712511694; Thu, 19 Oct 2023 03:48:31 -0700 (PDT) Received: from Pro.fritz.box (p4fe3abd8.dip0.t-ipconnect.de. [79.227.171.216]) by smtp.gmail.com with ESMTPSA id ch3-20020a170906c2c300b0099ce188be7fsm3354402ejb.3.2023.10.19.03.48.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 03:48:31 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: <27BF071E-2E0D-49F9-B595-E8A560436C50@gmail.com> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Thu, 19 Oct 2023 12:34:30 +0200") References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> <586BC992-4776-4C8B-9700-821FF04A1046@gmail.com> <27BF071E-2E0D-49F9-B595-E8A560436C50@gmail.com> Date: Thu, 19 Oct 2023 12:48:29 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 18 okt. 2023 kl. 20.55 skrev Gerd M=C3=B6llmann : > >> Meanwhile I've cleaned this up, and committed it to master. > > Thanks for the new feature! Completion works nicely now. > > It's definitely usable at this stage and belongs in the tree, but the > file.basename in the frame-format makes it a bit unfriendly to use for > any project where all source files aren't in the current directory > (ie, just about any project worth debugging). Please consider it a > request high on the wish list! Please git pull :-) From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 07:37:38 2023 Received: (at 66604) by debbugs.gnu.org; 19 Oct 2023 11:37:38 +0000 Received: from localhost ([127.0.0.1]:35950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtRLO-0003tC-2D for submit@debbugs.gnu.org; Thu, 19 Oct 2023 07:37:38 -0400 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]:53428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtRLJ-0003so-2v for 66604@debbugs.gnu.org; Thu, 19 Oct 2023 07:37:36 -0400 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2bb9a063f26so105828071fa.2 for <66604@debbugs.gnu.org>; Thu, 19 Oct 2023 04:37:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697715420; x=1698320220; 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=k087PgXfAuXS+s156s5Rjc8gq/z2WTDRKMR9UDbDNfk=; b=MgD356wT51WYfD8BGVHRX0H+NM9VW/KxCGrTETX2FnuGQyk82RAXgYwk5aECTih6sn D++0xW+uaDKikqtlmMm4n8+nT1VaORGLa0+Ri0SJADg2mwuW1pH9N2opZO9F/POqq4oc Iljf8PvZCyyu0CCJt9v8rVPGRSTwIzhtzmuEwc5/KuZwLLG1P7op0Bs//ZUJwp7ptHuZ SZaOLMprT0WA4EXexWwr2BcPeb+kR1YGkjpySWbtWROQgE9O/GeTz1Y8jcXdsbQC6LJH crNd1u0I43UZQP0w5z5yz3g5yTFWQakQKFWwRZT6y47KuzPLsu6NsRbHF7Y+QlODskkB ywjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697715420; x=1698320220; 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=k087PgXfAuXS+s156s5Rjc8gq/z2WTDRKMR9UDbDNfk=; b=EUrSGjf8boEyvBfU2Dk3H0RBo9FyRwcWwII+vMUL1DYkIY/rfRWBDI2LWtyDA2FBA0 e3Bi8DKipoRNo+rNyOaivuD0tdi0ZunWOPL/OVulLfW1Y31dpffzL2g2Gd62IyjDHu0n /u1xjpRoARo/XB5SSbvJazK8XttazgxrApzxtAzBSzvcEEwxeYOoL7LSipT2XlBfmWiC 7WtouCDfCiqkwUJE9R8Cw1eiSRmi9Hj+OgMnQAcKE9vltWQWpCW7QyerPQIBX5NwkSum wAX/i3jF0anrIUWHG9nG+5Z8oElRcHIykGJMPrXl9pTXZGyuTmayIM4bar0GtowYAaIh pY1w== X-Gm-Message-State: AOJu0Yxp8iA8XdRVT/tLfG9UEZNXK0LvLjIxj35Z7cc1hb6drWzVJDK2 EXD5AVP+cdXkvoXCeQoCyiI= X-Google-Smtp-Source: AGHT+IEkCIw/bUOdhRh5RRveLeSou+vFKIQnmF0o5+Z19t2QQ9mq/kRT+H3fE2gLVq4cJ6rvz+bmQQ== X-Received: by 2002:a2e:a4ca:0:b0:2bf:f7ea:884a with SMTP id p10-20020a2ea4ca000000b002bff7ea884amr1337789ljm.30.1697715420334; Thu, 19 Oct 2023 04:37:00 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id r4-20020a2eb604000000b002b9f4841913sm1060612ljn.1.2023.10.19.04.36.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Oct 2023 04:36:59 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#66604: [PATCH] Gud LLDB completions From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Thu, 19 Oct 2023 13:36:59 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <2577C531-285B-49CC-BFAA-3D3A3A0B986D@gmail.com> References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> <586BC992-4776-4C8B-9700-821FF04A1046@gmail.com> <27BF071E-2E0D-49F9-B595-E8A560436C50@gmail.com> To: =?utf-8?Q?Gerd_M=C3=B6llmann?= X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 19 okt. 2023 kl. 12.48 skrev Gerd M=C3=B6llmann = : > Please git pull :-) Look at that. It actually works, and getting the column was a nice = bonus! Bravo! Some observations: 1. The command script --language python -- print('Gud initialized') is apparently sent twice. Perhaps something simpler can be sent, and = only once? 2. Sometimes there's an extra (second) space after the (lldb) prompt, = typically after stopping. No idea where that comes from. 3. Please get rid of that `eval`! Just parse the frame info using a = regexp. Either come up with a format that is easy for both humans and computers = to parse, or just computers (in which are that text in the buffer can be = replaced with a human-friendly string). From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 07:51:09 2023 Received: (at 66604) by debbugs.gnu.org; 19 Oct 2023 11:51:09 +0000 Received: from localhost ([127.0.0.1]:35960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtRYS-0004Tc-SD for submit@debbugs.gnu.org; Thu, 19 Oct 2023 07:51:09 -0400 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]:47528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtRYR-0004TJ-3I for 66604@debbugs.gnu.org; Thu, 19 Oct 2023 07:51:07 -0400 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-507c50b7c36so3220731e87.3 for <66604@debbugs.gnu.org>; Thu, 19 Oct 2023 04:50:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697716234; x=1698321034; 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=76408JsIH1ZPyLPfLO2Ztg5cmYL4Uj32DO0FTXatMc4=; b=Sa6+cANGVbbqaWWXcjnBM12baGLprimJk/Qb8Hc2l1WhzDk55udjEP55jmErdlcj+G tQBDK9HHIYvMaNOt6rTbw/sOIlc+pu3Y2w3fuo60iEcvOOX5ularJ8/uyySdhnIvjkB8 Fd07I4c0dfgHbrZ84iHKMv3qSEASu56VGBWfJ1i+xCvfSpWwOAtPcdF8OILIHKLI3Ri9 iXG+DR3z810m1XFsnSBgM/tXceYJXAG4FgZmSy4DEHQKk01hALuAQG0Xw3IIadFTTj4R LrxbrGVjz1MBjYGI91bz34f56jVGjKJRtCiTwq1VHLd0ru9DfO94asWM7YB5W2YHbjxf hiMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697716234; x=1698321034; 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=76408JsIH1ZPyLPfLO2Ztg5cmYL4Uj32DO0FTXatMc4=; b=DjqNDiAMWWjpU/nFbdImLhlnsdIpznzT0rM0GXQI8I0D+B8E4b3PH/1FSFO0+pSEIw /eunMmMtW1hh2ngN+7J14ofoeofA60wReUdzGB7OsF7KmRbbc6Nukxd+NVQaV5uYxrik 2bq0KnORAZcRitwuQnoPGqkcLbSIkfQAQoy6UEhlhFJKYL00Mxp1Uei6gVQ7MvbtNOei czg0hYCKc5FEAUB1Lrn2r5hyivCyY/DTe0j1Dqk7eB5Bw12lSLj2luSVjZQXDYYljtR4 BKi5013QxaD7bOGvgm7JXk89zooX9DzAyEQO0L1aggxPL3WDkKPYzCrJ8S3emBREF5NK X1jA== X-Gm-Message-State: AOJu0YzMJNiS6FVNxDSrFYFKXFPjzhNusnX2q0fCCSjGR5yXNzeDVT9o 6kYJXLiyT7p+kEXysqc9FrQCIfg0HSE= X-Google-Smtp-Source: AGHT+IGdNa8iNNOEnL5HFo0F2f7vqJqPi2geveOuZPTdb4v6VOCDJGI5D+OSOzB6wkYv6zQTOi1KPw== X-Received: by 2002:ac2:5965:0:b0:500:7efe:313c with SMTP id h5-20020ac25965000000b005007efe313cmr1033070lfp.24.1697716233958; Thu, 19 Oct 2023 04:50:33 -0700 (PDT) Received: from Pro.fritz.box (p4fe3abd8.dip0.t-ipconnect.de. [79.227.171.216]) by smtp.gmail.com with ESMTPSA id bd15-20020a056402206f00b0053e15aefb0fsm4250069edb.85.2023.10.19.04.50.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 04:50:33 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: <2577C531-285B-49CC-BFAA-3D3A3A0B986D@gmail.com> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Thu, 19 Oct 2023 13:36:59 +0200") 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> Date: Thu, 19 Oct 2023 13:50:32 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 19 okt. 2023 kl. 12.48 skrev Gerd M=C3=B6llmann : > >> Please git pull :-) > > Look at that. It actually works, and getting the column was a nice > bonus! Bravo! People tell me that I have two problems: not listening, and, ehm, something else... Not true :-). > Some observations: > > 1. The command > > script --language python -- print('Gud initialized') > > is apparently sent twice. Perhaps something simpler can be sent, and > only once? Hm, I'm sending it once, AFAIK. Could you please paste the output you see? > 2. Sometimes there's an extra (second) space after the (lldb) prompt, > typically after stopping. No idea where that comes from. Hm, I don't think I see that here. Is it immediately after the stop, or does it come later? > 3. Please get rid of that `eval`! Just parse the frame info using a regex= p. > > Either come up with a format that is easy for both humans and > computers to parse, or just computers (in which are that text in the > buffer can be replaced with a human-friendly string). Well... That mechanism is for something I might add (much) later :-). It's a bit overkill ATM, but you must admit that it's elegant :-). From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 08:30:04 2023 Received: (at 66604) by debbugs.gnu.org; 19 Oct 2023 12:30:04 +0000 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 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 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) 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) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#66604: [PATCH] Gud LLDB completions From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Thu, 19 Oct 2023 14:29:26 +0200 Content-Transfer-Encoding: quoted-printable 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> To: =?utf-8?Q?Gerd_M=C3=B6llmann?= X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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`. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 09:09:33 2023 Received: (at 66604) by debbugs.gnu.org; 19 Oct 2023 13:09:33 +0000 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 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 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) 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) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Thu, 19 Oct 2023 14:29:26 +0200") 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> Date: Thu, 19 Oct 2023 15:08:55 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 09:23:13 2023 Received: (at 66604) by debbugs.gnu.org; 19 Oct 2023 13:23:13 +0000 Received: from localhost ([127.0.0.1]:36098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtSzZ-0004DN-1f for submit@debbugs.gnu.org; Thu, 19 Oct 2023 09:23:13 -0400 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]:51637) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtSzV-0004D8-LY for 66604@debbugs.gnu.org; Thu, 19 Oct 2023 09:23:11 -0400 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2c50fbc218bso83594621fa.3 for <66604@debbugs.gnu.org>; Thu, 19 Oct 2023 06:22:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697721756; x=1698326556; 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=2zrA1Ly8EqpDcvhSZGt+Kvq+os/Z/RgeMeuVVYnLdWY=; b=nkJoLc1xxiJF66cyTYT0rGhTVgO9LwRd19R/Wm2+pTCyJZEG9zu8wH3EYnQCkPUbCI oX/ru00vfAbjBhV21RkPHFSlOgC5YkGmGXEl3p6aCRcQwcAzmnP5PCFfajt+W1uCUrFM zpvvLGMjF0QsVvgHW2N++XEN8LD9tP+2y7daVZ1aFIq0j41TmmmombDzfejnC615r+N5 EDflfmsDtGcklDijoFpnWq+jQdF5VDy72yLQmI7r9+O/c/34DHsSeUI5YY4l5gsZ4L/C QVxsFVO+wOLRCNSQpvu7nrF7hZho6Sov7hK3cZZgpHTRrHEIL9tH7xfST6gz/Xcy4TIs WWsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697721756; x=1698326556; 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=2zrA1Ly8EqpDcvhSZGt+Kvq+os/Z/RgeMeuVVYnLdWY=; b=uuZg1T67g4+FE0vTuCU6EZ+BFCneSBCJULzWBbIbaSQ7VQ7lQJDsxo4c3gntBo95rk ZxchvU9qhqUEQJyrAyYQOd0DcI/sd25oM1Q7GpmIJT0KMeWa2XqSGON8K97OE7udJz5g Onyp8SLx/k/6QqG8qFQzWkBjlKkT56ItWdObR47q5CHh8ssxjYuuKhRRUTB/UdwGYv+m CwCl0dp4A044w5hk/7l27rc97E1zUDCZfPbI3JX3s41s7aSssFlckpFB1BmmqjfTinQ2 18AxQ/hgJc+g7EwwuE6NZ5V8/GTtYRBaUmHJTSn3gmpXUhA3/PjK2h6RMKgqeipZwZq4 Pe8w== X-Gm-Message-State: AOJu0Yzm3Og9JVBmydZsPeFSmUmt6TGRURlTOXnucK6x9PXYpwpuwhz5 ZQMvrk52QD//XtOngJ7Rn1qlZSo+0T3aEA== X-Google-Smtp-Source: AGHT+IH50RKFo+TXxaLNUacaLycsYkQsPyup2pxqiP+acWPQsREzHbpU2A0fcr7jbuzVB1IoRmswEQ== X-Received: by 2002:ac2:5310:0:b0:507:a58d:24ba with SMTP id c16-20020ac25310000000b00507a58d24bamr1304461lfh.63.1697721756214; Thu, 19 Oct 2023 06:22:36 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id u21-20020ac243d5000000b0050335c6d091sm1090130lfl.79.2023.10.19.06.22.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Oct 2023 06:22:35 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#66604: [PATCH] Gud LLDB completions From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Thu, 19 Oct 2023 15:22:34 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> 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> To: =?utf-8?Q?Gerd_M=C3=B6llmann?= X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 19 okt. 2023 kl. 15.08 skrev Gerd M=C3=B6llmann = : > Could you > please set completion-at-point-functions to nil in the lldb buffer, = and > see if that's also happening then? Yes, that does not seem to affect the output at all. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 20 02:05:30 2023 Received: (at 66604) by debbugs.gnu.org; 20 Oct 2023 06:05:30 +0000 Received: from localhost ([127.0.0.1]:38477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtidV-00025h-Op for submit@debbugs.gnu.org; Fri, 20 Oct 2023 02:05:30 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:56687) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtidS-00025O-3g for 66604@debbugs.gnu.org; Fri, 20 Oct 2023 02:05:28 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5230a22cfd1so548975a12.1 for <66604@debbugs.gnu.org>; Thu, 19 Oct 2023 23:04:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697781892; x=1698386692; 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=FwARak0YKdkSCI+Oxy8/cWbvk1kllh/IAtBbM6hbOcc=; b=QOI+erPqfaFS/5pYxjmEfC4bIkAy96ASzqtd/Au8CiIeQpo+wqTOneu9hFFmQYJW0Z Yff4Mly21O5EarueIHWu+m+39NvXj2/goz41el5okpLlJz/WV5DNqloI28aBzq2kmMxS pRUWfpfmeUeE8xw6L7B6Rx6Awy5ZWqVVyYv4qDUcvw+NVNC1GRIVp0Wu6bfFduq9rwUx M+1hrrEI0+IaTFkLX/+6tbtvh6CIKacOZ4FZCm45UkJtirteD2OZGvm1kDD+Ir7X9GTc kNlBjdBYH0zpoCQT1H50QQodi4k5kJTSZo93mtZu7mg0EQL5IRiCWERdt37tYhUHoSUG e5eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697781892; x=1698386692; 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=FwARak0YKdkSCI+Oxy8/cWbvk1kllh/IAtBbM6hbOcc=; b=D7qgQA+YJR2mLzufPUWfnKRE5mH+V5OpKs5Vst8MJXoVrrJacejuWcy6K56pdGkFV0 8sI0y/5C9AFyyAddk8dcHbgL6jCHVuxqPNNjdE7sUOcF5+VDxDvZe3Ut5KkglAFgW323 2DcUihOujZwIqeuXaXhCNvSS3OBQEs0Kal/fLJ/iE6+19HGi0j4hqjd3AJHg1P/YAbl4 FwGh6sKN1gMDtEfwicWoBIxqOjAxg82mGYjV8QTd5UbgRGDPPG4njldQ9bV5N/Y491dB vh9+ZC01F2qvoEMhlkymCim6OxkJbN6hmk8ro4/1bDeZ/BYcLuw18LAsMj7DlloJ3pNP S/bw== X-Gm-Message-State: AOJu0YyT1C2nV86cXjSKX70JQoeWk1juB7IOeNXKvzTBxz8fMVgBaeOp GSmRBBr3FqoDL9TC32jpzKKd0fY4zR4= X-Google-Smtp-Source: AGHT+IFemm9NHjBTfL1QzYh6VYvbph6AvZzzfPUMt0TEeEZH/NA2RqvtP7kBUWzJNRN0TVAll9liSQ== X-Received: by 2002:a05:6402:2691:b0:533:c55f:5830 with SMTP id w17-20020a056402269100b00533c55f5830mr676854edd.28.1697781892352; Thu, 19 Oct 2023 23:04:52 -0700 (PDT) Received: from Pro.fritz.box (pd9e365ba.dip0.t-ipconnect.de. [217.227.101.186]) by smtp.gmail.com with ESMTPSA id w21-20020a50d795000000b0053e4d1cbc6esm810938edi.55.2023.10.19.23.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 23:04:51 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Thu, 19 Oct 2023 15:22:34 +0200") 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> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> Date: Fri, 20 Oct 2023 08:04:51 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 19 okt. 2023 kl. 15.08 skrev Gerd M=C3=B6llmann : > >> Could you >> please set completion-at-point-functions to nil in the lldb buffer, and >> see if that's also happening then? > > Yes, that does not seem to affect the output at all. I don't seem to be able to reproduce this with emacs -Q. Here is what I do: cd emacs/master/src ,/emacs -Q # this is a build with -O0 -g M-x lldb RET emacs RET In gud-emacs: b redisplay_internal r -Q then 'n', 'c' and so on. Does that look right? That's on an M1 mac, BTW. Can't try on my x86_64 mac because lldb doesn't work there after the OCLP update to maxOS 14. I'm mentioning this because machine speed might matter in the communication emacs <-> lldb. What machine are you using? Could you try with a newer lldb? (brew install llvm, for example). P.S., just FYI, since you seem to be using this, and might see it: - There is still a problem with things like Corfu + invoking completion-at-point manually. This is interfering with comint redirection, with the effect of printing completions to the gud buffer. - There is a problem with the code in master if completion candidates contain ')', like function names. I have fixed that here. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 20 06:42:56 2023 Received: (at 66604) by debbugs.gnu.org; 20 Oct 2023 10:42:56 +0000 Received: from localhost ([127.0.0.1]:38766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtmy0-0002mz-22 for submit@debbugs.gnu.org; Fri, 20 Oct 2023 06:42:56 -0400 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]:48634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtmxy-0002mm-6e for 66604@debbugs.gnu.org; Fri, 20 Oct 2023 06:42:55 -0400 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-5079f3f3d7aso937466e87.1 for <66604@debbugs.gnu.org>; Fri, 20 Oct 2023 03:42:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697798541; x=1698403341; 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=RjQeHQfTbiof3NPx5RMe4qnwXXBXD5BKLHDMt/Wlnk8=; b=JXS3WNbYsX4Zl+240rGvU20Mx8i0UE0ocNmZ9tXMwR8TkzxWvkJTtv/UTsJJEa6zFn yasCKXm1BJHzXK3ajP0HohNjSr6K82ZigdYAuwIqLrZWorbtJR47hC0P271MayVzAQB8 LKeztxW7Ddswbs2w8wMXB7oAI+299jX0CWA6U3QvpmrYFxqJGVW5pt/y9g44/c3DMQhd 4sfwU48W+uioD5iOu31IGRtqr0CzbqI6LXT3ZcysZUc00HNHca6kbcWM498fcIRl7OjG vbQP0gVMxWVx1UGclmc9pxFFbOCWVoSar8GRPC71Flrr9dSFncZ3c+zg5JMrx9p2O1Nv CUyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697798541; x=1698403341; 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=RjQeHQfTbiof3NPx5RMe4qnwXXBXD5BKLHDMt/Wlnk8=; b=tpjp44SBude5BkMw7+/9YyvnAEiRc9HS/9jowRKTwYalMmR9AmOj20iNZBnpuDDoW0 DSNFQC6vJI9v3XPH78vsIoO6Qj5xUN/RUXGZl2L9kJdMOUnqYXEQLS0nv0RVuo9uFEHS n2NTokV6v62kD97sKn5ZN8kjfFIYbJw4Rx44F2zmEeyQ5abJwV6Ju6kmPKS0nolBlTDy WAFOybXTZrQoWntrgj2u780J5NhVdutI8RtnvuInyyQBKpTwNmHR37VCyQ/grCNeEM2C daX79lbuHA1/fqqWn4gt3ZXvVqVzMByEsLkyCuahx/2vybdJq87MTP5qPFbciUXMWISC VxVQ== X-Gm-Message-State: AOJu0Yy6liQUOegZbbxCC7KJBkhA867Ie2AdMtc01R4sOeMsxyvXVy4p V9vrZUfJrpLtHwyKOvDYE+s= X-Google-Smtp-Source: AGHT+IFB6UOgo1Y2B8rZyhF6y2tn2/gBCzcuDaI80G6TkT7f2fnn+KRZxkrWQ9qM4Jgj03nmuz4QbA== X-Received: by 2002:a05:6512:24e:b0:503:2e6:685e with SMTP id b14-20020a056512024e00b0050302e6685emr976853lfo.14.1697798540902; Fri, 20 Oct 2023 03:42:20 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id w4-20020a05651234c400b005057a5587f0sm299085lfr.52.2023.10.20.03.42.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Oct 2023 03:42:20 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#66604: [PATCH] Gud LLDB completions From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Fri, 20 Oct 2023 12:42:19 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> 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> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> To: =?utf-8?Q?Gerd_M=C3=B6llmann?= X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 20 okt. 2023 kl. 08.04 skrev Gerd M=C3=B6llmann = : > I don't seem to be able to reproduce this with emacs -Q. >=20 > Here is what I do: >=20 > cd emacs/master/src > ,/emacs -Q # this is a build with -O0 -g > M-x lldb RET emacs RET What I did: DIR/emacs -Q # built with -O2 -g M-x lldb RET lldb -p =E2=80=B9PID=E2=80=BA RET b redisplay_internal c and the oddities show up when it stops. This is on an x86-64 Mac (running 11.7 which is the newest supported = version). I prefer not building newer tools because the machine is a bit short on = both cpu and disk space, and LLVM builds are known for their voracious = appetite for both commodities. > - There is a problem with the code in master if completion candidates > contain ')', like function names. I have fixed that here. Good to hear! From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 20 07:13:18 2023 Received: (at 66604) by debbugs.gnu.org; 20 Oct 2023 11:13:18 +0000 Received: from localhost ([127.0.0.1]:38777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtnRN-0003qK-Mo for submit@debbugs.gnu.org; Fri, 20 Oct 2023 07:13:18 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:61932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtnRK-0003q5-I6 for 66604@debbugs.gnu.org; Fri, 20 Oct 2023 07:13:16 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-53da72739c3so935685a12.3 for <66604@debbugs.gnu.org>; Fri, 20 Oct 2023 04:12:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697800361; x=1698405161; 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=ioesJbPSkMTMRv6oGS8ymiXNuhf/MLTa066cH0pb00A=; b=YRpzN8HzBgSxlznm05xmlVxXFWkUHCoA3od6bHH5wAxdG7CWYj48j6TJDFYczzQMee P3XOrvzrjLe3IRWVs3yaqX1WPUoCUk+cSsSeKjRAo+awpCy/aRdh8RwN2t07w0tB05fA XTXxEvRfPz/t/AbeAnCBlnM5AZAh/9pR0vlUnF+m5fVs/rwLrUG1H/Chz5r6uUjdkHRI QVCTKiIUtqYfLudSMYnOjqiGb3sAewiku+CkUTwv1IowhBgh6c8WGukl+TDV0yTlS3TB z9O1EfKmr8zGIX1/++Crgn9UBsg3E0Gn3HNkRCPZHTYOID2ld7FspWejAWNKVfIB0gO1 6ioQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697800361; x=1698405161; 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=ioesJbPSkMTMRv6oGS8ymiXNuhf/MLTa066cH0pb00A=; b=Sqjx5+5pYLwG2qb2KypU75KuhIymS6zHjDNVkhF6gdcCmhmDBg2A2SG+W3RuKEjHGx 1bHl/ab9TjLNuK+2ANTPgXtouqMXHaf2iFYEpkEiZ3pIc5F71ykx9zbfa8Ym0JE9OxW9 NSebCiO0Vg/45HCmsWxD15VsrJf9pUWSlWHDFQGGkpbgLD20/2dBg3s8tMoltOQn/g90 QbQyyCKMDXLqU1YS8ZNJtzqIFDovAf1/4eTJOGoNt/1YIdn8q0jtkrLk7HIkce5IaalR goi+qZr0EKAeEKd9bu8cu5+EoQ6fkZmosn7VM5gg0Qr2FIpxkDBRKahJYUcFkbdTUZhR sm4A== X-Gm-Message-State: AOJu0Yz28sNi5H7dUO+gcvMzfduNMqZl34r71+IHP+g9xutnOnapDOTo rV0EWkdsURMyNRdxRyf4ebCz+KdMyLg= X-Google-Smtp-Source: AGHT+IE7+mL29C2rHVVl1DaWXd3DaGQlXZaCkR/rpRUe0GVjFOF1eIu5oPqpdJeltVFpg0VMLORqKQ== X-Received: by 2002:a17:907:3e84:b0:9be:d55a:81c5 with SMTP id hs4-20020a1709073e8400b009bed55a81c5mr1026687ejc.60.1697800360784; Fri, 20 Oct 2023 04:12:40 -0700 (PDT) Received: from Pro.fritz.box (pd9e365ba.dip0.t-ipconnect.de. [217.227.101.186]) by smtp.gmail.com with ESMTPSA id a19-20020a1709065f9300b009b94c545678sm1273525eju.153.2023.10.20.04.12.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 04:12:40 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Fri, 20 Oct 2023 12:42:19 +0200") 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> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> Date: Fri, 20 Oct 2023 13:12:38 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 20 okt. 2023 kl. 08.04 skrev Gerd M=C3=B6llmann : > >> I don't seem to be able to reproduce this with emacs -Q. >>=20 >> Here is what I do: >>=20 >> cd emacs/master/src >> ,/emacs -Q # this is a build with -O0 -g >> M-x lldb RET emacs RET > > What I did: > > DIR/emacs -Q # built with -O2 -g > M-x lldb RET lldb -p =E2=80=B9PID=E2=80=BA RET > b redisplay_internal > c > > and the oddities show up when it stops. That's interesting, the -p PID seems to make the difference. Could you please confirm? No idea what to make of that, ATM. > This is on an x86-64 Mac (running 11.7 which is the newest supported vers= ion). > > I prefer not building newer tools because the machine is a bit short > on both cpu and disk space, and LLVM builds are known for their > voracious appetite for both commodities. FWIW, Homebrew doesn't build it here when I install LLVM, du -h /usr/local/Cellar/llvm says it's 1.8G. > >> - There is a problem with the code in master if completion candidates >> contain ')', like function names. I have fixed that here. > > Good to hear! It's now on master. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 20 07:51:15 2023 Received: (at 66604) by debbugs.gnu.org; 20 Oct 2023 11:51:15 +0000 Received: from localhost ([127.0.0.1]:38856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qto27-0001nE-7n for submit@debbugs.gnu.org; Fri, 20 Oct 2023 07:51:15 -0400 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]:57629) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qto23-0001mu-QH for 66604@debbugs.gnu.org; Fri, 20 Oct 2023 07:51:13 -0400 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-507ac66a969so878601e87.3 for <66604@debbugs.gnu.org>; Fri, 20 Oct 2023 04:50:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697802638; x=1698407438; 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=1RCGK0I8Bv2CFvlG1wlNqlCUXzvILjP8xKhgcfJYiEE=; b=BSxjSdhXnC7QpjTuxIOdON6KngOJ+6awd1VY99jxD9EdnvR7Snog7MiwBprDaMVITy PYLW/Kg6eldSqSTUlYp8DlOXXqmduWnZkGgzIdsM/bEMmMGktnyIqR+7asWV1jKr2Gr1 WjRr1oA43/N04f/bq/m1G8IUWAWlqXx+98iOjEVSQe086FetVrTEFmlBwIhRMi6gw7b0 m+m91uvwGON3JJmuyDoZ2VxhKzIt5MAM6rZmSjl556mTqds/iWPCkO8VrnzU8riq9p3F 0AREWLvYQbVDSg7VhgzJNoAPFk18W8ONyRkwZ+ACr9OrJWFBbq2eybLrFDSUASwclPLX CHgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697802638; x=1698407438; 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=1RCGK0I8Bv2CFvlG1wlNqlCUXzvILjP8xKhgcfJYiEE=; b=HRRaduJ+hA95Nyzm0qiESmG7k6qNiIPlhRxfD07PWI2PKkHD2+sRqd65+Oy03Frm8U 0GyE3h3HLeZ58D/WrG9pdJ8c/XauIDxNI6s67Cgj/oygqMF/Ur/orDoogh5fArsxtp3d +fOOhEzyvw3W8FwHV6t1Nl43x5hEVHIs/3NVdlqrYjJCwHtIiNdcl4aja6q9CyfrZhdt gfck0xSgikF4b3rXVOlYbAWa9kN5BXP1JDsu1Cmou05DkE0p9QZjZ0psfBfOGsx7Qc0T jGypvzfUY0AuaA2zKHHvSyVF1Fy8+q2iK0i8wEOKFoxONlpHjYlWMP5kqUQQjl2nHVfK ykfA== X-Gm-Message-State: AOJu0YxnI94RYjNPDERxtabokZsAIjDPxHAxDgvtt/CJbRkXmFZfaTaw X0I2YzpjsUBHzniy2I8B4LE= X-Google-Smtp-Source: AGHT+IGVwfvTSy/E/6x1mjnZkkprCVtFSdRAgpqGmVwOX2lak7rwEWKLUdOWLxvuWOR7yBm6CCGgBg== X-Received: by 2002:a05:6512:3c8f:b0:507:cd39:a005 with SMTP id h15-20020a0565123c8f00b00507cd39a005mr1304628lfv.39.1697802637905; Fri, 20 Oct 2023 04:50:37 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id 24-20020ac24858000000b0050797006048sm326706lfy.68.2023.10.20.04.50.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Oct 2023 04:50:36 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#66604: [PATCH] Gud LLDB completions From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Fri, 20 Oct 2023 13:50:36 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> 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> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> To: =?utf-8?Q?Gerd_M=C3=B6llmann?= X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 20 okt. 2023 kl. 13.12 skrev Gerd M=C3=B6llmann = : > That's interesting, the -p PID seems to make the difference. Could = you > please confirm? No idea what to make of that, ATM. I get the same odd behaviour by starting lldb without arguments and then = issuing attach =E2=80=B9pid=E2=80=BA b redisplay_internal c but not when starting Emacs from inside lldb as per your recipe, so it's = a matter of attaching vs spawning. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 20 07:59:49 2023 Received: (at 66604) by debbugs.gnu.org; 20 Oct 2023 11:59:49 +0000 Received: from localhost ([127.0.0.1]:38888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtoAP-0002AD-J8 for submit@debbugs.gnu.org; Fri, 20 Oct 2023 07:59:49 -0400 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]:59668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtoAN-00029z-JN for 66604@debbugs.gnu.org; Fri, 20 Oct 2023 07:59:48 -0400 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-507adc3381cso982167e87.3 for <66604@debbugs.gnu.org>; Fri, 20 Oct 2023 04:59:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697803153; x=1698407953; 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=ItebWFclA+nuarRPr+YZFHED71mAE38T+q+1edGn6o4=; b=jJgOxXHoxBQgBT0aG0J1wa1KHnobtFzFxtYUxP6pYuDtlxgATKuIaeH+nXgYZho7Wi X2RxAPFTs15W0XJlna4x3tvoM4KpZkZKqeMFL88+7foMXJV6fMkE2Iz0mMGfKUSWvnb7 EqAk026dlqVW8dnatagKVLvxmQZHFrfyWucBNbsSFDhDmiZWAkSYc1HJ7jinRJFs3mqc NInETR1bUiej9Z51pKXJ3tsBj0enfuNXnWKas9D7Ttbz/uCSf7i7wRVWghrwieU3ergP jPLJRdzGwS8Euf1KyNQrhqBmFRo+8RvSrfOWJyLLwBI32BX7ENk+EEZUx0V8imIcd36v IW0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697803153; x=1698407953; 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=ItebWFclA+nuarRPr+YZFHED71mAE38T+q+1edGn6o4=; b=nhh4pwzyOH5k8R9eDGsHja62bi/Lk0GelSbsJ4AHp0ElVnVDrlMTLff8qQqrnBAEUb 5c2XS1D9iWvq0543rshDIQXjHwOdOamBSr9hVy5sshdTVKlLo2OEobluDkL7zO2knDI6 wPYpUZl6um4zxIckVQfBAMbqAG182U842IabBXITE3YsOCGPcbXKa+2KQNWTaoUfbPEz uATBwjYP/jSBewh+mvXMdgSYUgYNxAlc3r/z29qIDPdnTFfmWsywN5fjmYsUbsLwYbDM Mkx+XRgP4XK+9RV2xJc4HURAZmrRKwQpQwfAjMiV7SQYMaDXYFZMj6seGI6CSFLIfaOr PpPQ== X-Gm-Message-State: AOJu0YzyEuc12eIvhfHyDvPnoGfubmDB580OT0D3yD6YVmMqRkmGt7ke nXT9U8n6/eT5NRdRi2VC8hD5NJkJyyc= X-Google-Smtp-Source: AGHT+IGZ9R6aUqa98Xmk4xoZfCmDGp7RNKVJ1SeIZzxzbAuOjGceVnOh3gHmwF32/0lZPNNi232etw== X-Received: by 2002:a19:645c:0:b0:505:6c99:bd7c with SMTP id b28-20020a19645c000000b005056c99bd7cmr996448lfj.57.1697803153499; Fri, 20 Oct 2023 04:59:13 -0700 (PDT) Received: from Pro.fritz.box (pd9e365ba.dip0.t-ipconnect.de. [217.227.101.186]) by smtp.gmail.com with ESMTPSA id y26-20020aa7d51a000000b0053dda7926fcsm1311371edq.60.2023.10.20.04.59.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 04:59:13 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Fri, 20 Oct 2023 13:50:36 +0200") 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> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> Date: Fri, 20 Oct 2023 13:59:12 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 20 okt. 2023 kl. 13.12 skrev Gerd M=C3=B6llmann : > >> That's interesting, the -p PID seems to make the difference. Could you >> please confirm? No idea what to make of that, ATM. > > I get the same odd behaviour by starting lldb without arguments and then = issuing > > attach =E2=80=B9pid=E2=80=BA > b redisplay_internal > c > > but not when starting Emacs from inside lldb as per your recipe, so it's = a matter of attaching vs spawning. Indeed. How strange. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 20 13:29:21 2023 Received: (at 66604) by debbugs.gnu.org; 20 Oct 2023 17:29:21 +0000 Received: from localhost ([127.0.0.1]:41396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qttJJ-0007EJ-7b for submit@debbugs.gnu.org; Fri, 20 Oct 2023 13:29:21 -0400 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]:48262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qttJE-0007E3-8y for 66604@debbugs.gnu.org; Fri, 20 Oct 2023 13:29:20 -0400 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-53e3e7e478bso1627626a12.0 for <66604@debbugs.gnu.org>; Fri, 20 Oct 2023 10:28:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697822921; x=1698427721; 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=JpKUGiQfi0yBu2XfNKbH/P7Ao49yp52RmXFmkGQO4E4=; b=XAF6hnr1vcZz3/3xkrN15Qh2M6gmBaaBCIvdyu4ebIWwL2Bb/f2Kmv2f3ULU3i1xzS Vmc66lDuCUCo21nDrnbu6kRITpZmMQC3tzEsewN8uhu0WDGN0aEhJxjLyNbiGijqCHJD eIQPkBZJqRto7N8wMmLdgpcQ/7vVhPbsydB5iyQ9x56cgO3ucs5A9cb39QTOrokYEcjR dRKmJcrEhrB9F4VRpQR7rud+MqVGjizGW+iawIWBGFV0maas5+AkrjvonzeYSSWyLpH8 EHMnYjwIEuW0/mrcv/GHQ0PmPl9PfdU1LjneBll+YSW4HZb7eqjcHZ7imAiY9sV7OeqU vDBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697822921; x=1698427721; 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=JpKUGiQfi0yBu2XfNKbH/P7Ao49yp52RmXFmkGQO4E4=; b=ukLjYyzPhcScyPncosg8JCTqcrBn6bweJX3XLq+6E7F4Ie3J2wIxsTdl/HkIFBqHzV /cmKPRg3/MYQBtbmpgzOLJnCGVrIVryW2rtLrcBQO+q6n+/wHhxjHgZme/9LprtZi+rZ 3ZWbzDvHCoE2M8dN2exOiBCE3j2g8N+CXrlg0UlFfAuaP66oM4yX/mgNRcJBQ2P8DV9a 3HmTdrRZdrSybu/lqNGa8hmruRVhnLcwgh76VZ9w8/gatNgRJBCcXSsOoWjwdfhFLJ94 lCztZAEJFQZUm2wcUnEGoDlXOmQV7MQ3Go6QKufqQivw85JBYMf7nHcU1vJ3dgPpCEJ0 D//w== X-Gm-Message-State: AOJu0YyfwnQkqsBLbDmIqCWxAqQ8CmiOk8xQP36tktE6J00DZhqVmbwa K4I9/kIbsNlSykwKIAWxOQFwUW6J9i4= X-Google-Smtp-Source: AGHT+IGRnpHyzaKXTmqrXRReTXbSr0eeCXAJi22RjIRY3usIZULiJD5kfIbP82DVOij91SQgeVBoxQ== X-Received: by 2002:a17:907:6d09:b0:9b2:d78c:afe9 with SMTP id sa9-20020a1709076d0900b009b2d78cafe9mr1929227ejc.49.1697822921202; Fri, 20 Oct 2023 10:28:41 -0700 (PDT) Received: from Pro.fritz.box (pd9e365ba.dip0.t-ipconnect.de. [217.227.101.186]) by smtp.gmail.com with ESMTPSA id jy20-20020a170907763400b009b97d9ae329sm1882338ejc.198.2023.10.20.10.28.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 10:28:40 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llmann?= =?utf-8?Q?=22's?= message of "Fri, 20 Oct 2023 13:59:12 +0200") 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> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> Date: Fri, 20 Oct 2023 19:28:39 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Gerd M=C3=B6llmann writes: > Mattias Engdeg=C3=A5rd writes: > >> 20 okt. 2023 kl. 13.12 skrev Gerd M=C3=B6llmann : >> >>> That's interesting, the -p PID seems to make the difference. Could you >>> please confirm? No idea what to make of that, ATM. >> >> I get the same odd behaviour by starting lldb without arguments and then= issuing >> >> attach =E2=80=B9pid=E2=80=BA >> b redisplay_internal >> c >> >> but not when starting Emacs from inside lldb as per your recipe, so it's= a matter of attaching vs spawning. > > Indeed. How strange. Strangeness A: I do M-x lldb RET emacs RET with a (trace-function 'gud-lldb-marker-filter) =20=20 to observe what the process filter sees. I'm doing some stuff in lldb, then kill the process, and attach to another running Emacs to see the difference in what arrives in Emacs between the case of not attching to a process and attaching to one. Here is part of the trace output: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1 -> (gud-lldb-marker-filter "settings show use-color \n") 1 <- gud-lldb-marker-filter: "settings show use-color \n" =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1 -> (gud-lldb-marker-filter "use-color (boolean) =3D false\n(lldb) ") 1 <- gud-lldb-marker-filter: "use-color (boolean) =3D false\n(lldb) " =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1 -> (gud-lldb-marker-filter "process kill\n") 1 <- gud-lldb-marker-filter: "process kill\n" =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1 -> (gud-lldb-marker-filter "Process 95787 exited with status =3D 9 (0x000= 00009) killed\n(lldb) ") 1 <- gud-lldb-marker-filter: "Process 95787 exited with status =3D 9 (0x000= 00009) killed\n(lldb) " =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1 -> (gud-lldb-marker-filter "attach 95179\n") 1 <- gud-lldb-marker-filter: "attach 95179\n" =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1 -> (gud-lldb-marker-filter "Process 95179 stopped\n* thread #1, queue =3D= 'com.apple.main-thread', stop reason =3D signal SIGSTOP\n frame #0: 0x0= 00000018720a8b4 libsystem_kernel.dylib`mach_msg2_trap + 8\nlibsystem_kernel= .dylib`mach_msg2_trap:\n-> 0x18720a8b4 <+8>: ret \n\nlibsystem_kernel.d= ylib`macx_swapon:\n 0x18720a8b8 <+0>: mov x16, #-0x30 ;= =3D-48 \n 0x18720a8bc <+4>: svc #0x80\n 0x18720a8c0 <+8>: ret\n(l= ldb) ") 1 <- gud-lldb-marker-filter: "Process 95179 stopped\n* thread #1, queue =3D= 'com.apple.main-thread', stop reason =3D signal SIGSTOP\n frame #0: 0x0= 00000018720a8b4 libsystem_kernel.dylib`mach_msg2_trap + 8\nlibsystem_kernel= .dylib`mach_msg2_trap:\n-> 0x18720a8b4 <+8>: ret \n\nlibsystem_kernel.d= ylib`macx_swapon:\n 0x18720a8b8 <+0>: mov x16, #-0x30 ;= =3D-48 \n 0x18720a8bc <+4>: svc #0x80\n 0x18720a8c0 <+8>: ret\n(l= ldb) " =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1 -> (gud-lldb-marker-filter "n\n") 1 <- gud-lldb-marker-filter: "n\n" =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1 -> (gud-lldb-marker-filter "(lldb) ") 1 <- gud-lldb-marker-filter: "(lldb) " =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1 -> (gud-lldb-marker-filter "[1G[JProcess 95179 stopped\n* thread #1, queu= e =3D 'com.apple.main-thread', stop reason =3D instruction step over\n f= rame #0: 0x000000018721cd30 libsystem_kernel.dylib`mach_msg2_internal + 80\= nlibsystem_kernel.dylib`mach_msg2_internal:\n-> 0x18721cd30 <+80>: cbz = w0, 0x18721cdd0 ; <+240>\n 0x18721cd34 <+84>: tbnz w26, #0x6= , 0x18721cd70 ; <+144>\n 0x18721cd38 <+88>: mov w28, #0x7 = ; =3D7 \n 0x18721cd3c <+92>: movk w28, #0x1000, lsl #16\n[1G[J= (lldb) [8G") 1 <- gud-lldb-marker-filter: "[1G[JProcess 95179 stopped\n* thread #1, queu= e =3D 'com.apple.main-thread', stop reason =3D instruction step over\n f= rame #0: 0x000000018721cd30 libsystem_kernel.dylib`mach_msg2_internal + 80\= nlibsystem_kernel.dylib`mach_msg2_internal:\n-> 0x18721cd30 <+80>: cbz = w0, 0x18721cdd0 ; <+240>\n 0x18721cd34 <+84>: tbnz w26, #0x6= , 0x18721cd70 ; <+144>\n 0x18721cd38 <+88>: mov w28, #0x7 = ; =3D7 \n 0x18721cd3c <+92>: movk w28, #0x1000, lsl #16\n[1G[J= (lldb) [8G" =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1 -> (gud-lldb-marker-filter "\n") 1 <- gud-lldb-marker-filter: "\n" =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1 -> (gud-lldb-marker-filter "(lldb) ") 1 <- gud-lldb-marker-filter: "(lldb) " =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1 -> (gud-lldb-marker-filter "[1G[JProcess 95179 stopped\n* thread #1, queu= e =3D 'com.apple.main-thread', stop reason =3D instruction step over\n f= rame #0: 0x000000018721cd34 libsystem_kernel.dylib`mach_msg2_internal + 84\= nlibsystem_kernel.dylib`mach_msg2_internal:\n-> 0x18721cd34 <+84>: tbnz = w26, #0x6, 0x18721cd70 ; <+144>\n 0x18721cd38 <+88>: mov w28, #0x7= ; =3D7 \n 0x18721cd3c <+92>: movk w28, #0x1000, lsl #= 16\n 0x18721cd40 <+96>: cmp w0, w28\n[1G[J(lldb) [8G") 1 <- gud-lldb-marker-filter: "[1G[JProcess 95179 stopped\n* thread #1, queu= e =3D 'com.apple.main-thread', stop reason =3D instruction step over\n f= rame #0: 0x000000018721cd34 libsystem_kernel.dylib`mach_msg2_internal + 84\= nlibsystem_kernel.dylib`mach_msg2_internal:\n-> 0x18721cd34 <+84>: tbnz = w26, #0x6, 0x18721cd70 ; <+144>\n 0x18721cd38 <+88>: mov w28, #0x7= ; =3D7 \n 0x18721cd3c <+92>: movk w28, #0x1000, lsl #= 16\n 0x18721cd40 <+96>: cmp w0, w28\n[1G[J(lldb) [8G" Look at these escape sequences that suddenly appear when attaching to a process! I don't even know what "[1G" and "[8G" do. I can't find them in the list of ANSI sequences. Xterm has something like that CHA Cursor Horizontal Absolute CSI Ps G Move cursor to Ps-th column of the = active row (default=3D1). But that makes no sense at all... Don't know what happens after that that with the sequences in Emacs, but this is already so weird that I need a pause :-) From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 20 13:48:03 2023 Received: (at 66604) by debbugs.gnu.org; 20 Oct 2023 17:48:03 +0000 Received: from localhost ([127.0.0.1]:41410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qttbP-0007lu-Ac for submit@debbugs.gnu.org; Fri, 20 Oct 2023 13:48:03 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:55800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qttbN-0007lM-KT for 66604@debbugs.gnu.org; Fri, 20 Oct 2023 13:48:02 -0400 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-99de884ad25so170709866b.3 for <66604@debbugs.gnu.org>; Fri, 20 Oct 2023 10:47:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697824048; x=1698428848; 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=BbP4B8i/WbgyQabhGUfvtbafIGDqZ2D8StBGXMnhFPo=; b=CIGpid9GsBnYC8vP1lfz137xDi8F5V2eOJlyChtYFcAi99Kx+O7u4A1QdOgKfYk1q3 W2MbO/XdizQB1h69usxazwMFDNUJ/MAZiXByBKmoTSlFZ1LLHEKqQwhwdNOMlgy4+e1A Wh7eISN3H3oFuMojJZJxGFGS5O/B9x1IMHwJp63qBsdv4uHSSD/ZiZmyx0NGW8tM3P7U bOj2jHQI2xi6VsLosnkDdXkdmp/9+RyiOUfEJmHaF6/KJ3IKhXzgalzrccbBRGDjF0bN JCZQZJtlOljEo/1b/lW0IbYFzkTK8BgCYO26Iuxw3ZyTMRdvqOLltcuR1hYnHyMhoBQe 50wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697824048; x=1698428848; 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=BbP4B8i/WbgyQabhGUfvtbafIGDqZ2D8StBGXMnhFPo=; b=EOENfVMGseNHNd6fUj5Sn/T0LO3qbj+xiOGh4Urbte57bpuVT+kOcv0HEISw3MbKeq cJqHj50Irfewb70Tt2N+oVOTRz4RbFZDl8b8ee+zGp6y004vGWePyK18WoEFOWGlFilM NiEvngTbqwKaLWrQ7slehdPu+6jcN0WRL7SGxf5le8AFLCzKAGt4GfS621HsDsBhGUFx U87JHsdXz3rj3fP2HBdnMcs82RAJbPtAY+P48im4hdvAm2iv5KhyCvsSsGhAkeKKqGjz mRk2fQQreVE4ZohASIU7iIvS3TZB72iS464xVVLioUmkqS0675arLt5jGabGLmueP6Sq 2DWg== X-Gm-Message-State: AOJu0YxSVXHEsp4DwxfiFFYM94KbBFbNxH4xte9SQwG4KBbWqk5Ep8Gd TcC2lydWqK42F9OHBUwAqmUP/T0MlWU= X-Google-Smtp-Source: AGHT+IFryv3eg6/T5wGE3pLJKN3r4fv0NTWbXUVvviFvpolkMkCv40t/4dZFfzHyNJ3jYhkVdoQK/g== X-Received: by 2002:a17:906:4fd0:b0:9c7:4dab:20ea with SMTP id i16-20020a1709064fd000b009c74dab20eamr2206675ejw.67.1697824047555; Fri, 20 Oct 2023 10:47:27 -0700 (PDT) Received: from Pro.fritz.box (pd9e365ba.dip0.t-ipconnect.de. [217.227.101.186]) by smtp.gmail.com with ESMTPSA id w26-20020a17090652da00b009a5f7fb51dcsm1893215ejn.42.2023.10.20.10.47.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 10:47:27 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llmann?= =?utf-8?Q?=22's?= message of "Fri, 20 Oct 2023 19:28:39 +0200") 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> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> Date: Fri, 20 Oct 2023 19:47:26 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Gerd M=C3=B6llmann writes: > Gerd M=C3=B6llmann writes: > w28, #0x7 ; =3D7 \n 0x18721cd3c <+92>: movk w28, #0x1000, lsl #16\n > 0x18721cd40 <+96>: cmp w0, w28\n[1G[J(lldb) [8G" Hm, what one cannot see in the mail, is that the prompt at the end is actually "(lldb) ^[[8G". Note also the two spaces! And what Emacs does afterwards, AFAICT now, is filter the escape sequences out (see ansi-color-for-comint-mode.*). Strangely, the 8G and so on sequencess match the regexp used for that. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 21 06:33:00 2023 Received: (at 66604) by debbugs.gnu.org; 21 Oct 2023 10:33:00 +0000 Received: from localhost ([127.0.0.1]:42311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qu9Hv-0000vd-RW for submit@debbugs.gnu.org; Sat, 21 Oct 2023 06:33:00 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:47329) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qu9Ht-0000vO-2w for 66604@debbugs.gnu.org; Sat, 21 Oct 2023 06:32:57 -0400 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-53e3b8f906fso2466975a12.2 for <66604@debbugs.gnu.org>; Sat, 21 Oct 2023 03:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697884343; x=1698489143; 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=IknIJBz9St85JmbOLuLCbi2atOqtrBGkJlSPOMWoqsU=; b=R7IKedDTZEP4ofQHBlRWlVbVpQrwPTLk16rpqbvvvJn+4dakdxC4rPQupxeFFe0V0u 2SMlduayfvqZvPMbA1B73VwO9Yp0BM3mZWNHjP3HyteFejw+lIpv5rRuNs6y1B4Bt/jl p5AdZ/8/OVziZ+bSpBK9feyjVN1P1FRuOazpaJQ5UKF0MkVdI7jloQ/ywdxvZhrKGysp tY1WcP4/ZbBeMzotWPQoRcoVd5StMJtscjedxP0QR173c7V7BaQrbyTJHD4hc8IsIJEZ lTnx44RkshuKL+VCb58+BDdi4OmAGk0OrMGmpTf13uSRdH1dY6KnwR/0Hqz5uaRRiM7G DE5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697884343; x=1698489143; 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=IknIJBz9St85JmbOLuLCbi2atOqtrBGkJlSPOMWoqsU=; b=YBY5/7s0AWUmYDNQEV1eF9pMZwARbUuz6VLPIXXacC9ADFSdK732joY3hgW0SoQ81R YIv/lKQYeMzvtg6JKL15KwRSyvfxP20kxGn7qTOFZwySg1jD3QspWWDq0lcfeo06a8Wn /+UggLsb7HYLJsNrY/xBv1akvK32EVuM2UzgG8+UmccAigjtr8kZnEFWFGoGKEb7yI+p Gt6vfosXPjkWGqplkGGkL3CqCyeXXXYiBiSv3frNZn9Lf+zyU1mvcbNoCDO43aHIH34Z PJuXnZ+wCEhpiKRBncV3fOfbaPiiPrfyEZS8m/59BDX9spFcDllYp3rziW8HWH7O+HiQ Zxng== X-Gm-Message-State: AOJu0Yybtkcv+kI0V7oqra1SfRrNekLS08QC13zPpybzTAi9VX/up4WV XNrWZINxPbz4xhQm30gC/7hanymx3rM= X-Google-Smtp-Source: AGHT+IHBOUvuKsegQ3IyKQSKTglw0KxvU+mUcjo66JUaQDWxSK1rknDBSkg/piZI4U54oFrsAXp5Wg== X-Received: by 2002:a05:6402:34d3:b0:530:d8df:afaa with SMTP id w19-20020a05640234d300b00530d8dfafaamr2937786edc.41.1697884342946; Sat, 21 Oct 2023 03:32:22 -0700 (PDT) Received: from Pro.fritz.box (pd9e366af.dip0.t-ipconnect.de. [217.227.102.175]) by smtp.gmail.com with ESMTPSA id ee8-20020a056402290800b00537666d307csm3176268edb.32.2023.10.21.03.32.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Oct 2023 03:32:22 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llmann?= =?utf-8?Q?=22's?= message of "Fri, 20 Oct 2023 19:47:26 +0200") 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> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> Date: Sat, 21 Oct 2023 12:32:21 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Gerd M=C3=B6llmann writes: > Gerd M=C3=B6llmann writes: > >> Gerd M=C3=B6llmann writes: >> w28, #0x7 ; =3D7 \n 0x18721cd3c <+92>: movk w28, #0x1000, lsl #16\n >> 0x18721cd40 <+96>: cmp w0, w28\n[1G[J(lldb) [8G" > > Hm, what one cannot see in the mail, is that the prompt at the end is > actually "(lldb) ^[[8G". Note also the two spaces! > > And what Emacs does afterwards, AFAICT now, is filter the escape > sequences out (see ansi-color-for-comint-mode.*). Strangely, the 8G and > so on sequencess match the regexp used for that. I'm now resasobly convinced that this is kind of a bug in LLDB. It doesn't check if it has an ANSI terminal sometimes, and sends ANSI cursor movement sequences anyway. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 21 06:37:50 2023 Received: (at 66604) by debbugs.gnu.org; 21 Oct 2023 10:37:50 +0000 Received: from localhost ([127.0.0.1]:42324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qu9Mc-000145-7q for submit@debbugs.gnu.org; Sat, 21 Oct 2023 06:37:50 -0400 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]:58435) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qu9Ma-00013s-B5 for 66604@debbugs.gnu.org; Sat, 21 Oct 2023 06:37:49 -0400 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-507bd19eac8so2417107e87.0 for <66604@debbugs.gnu.org>; Sat, 21 Oct 2023 03:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697884635; x=1698489435; darn=debbugs.gnu.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:sender:from:to:cc:subject:date:message-id:reply-to; bh=+RYgdEy4vmhveHfxCT0Gp6r3CyP4JVNR3H7E6xxlyL4=; b=PzhTqNH296EM0pXQ6ZP/XMja/S4ad9s8TZCk4pwY6O1O54+u9MXlWReJoa600D4sY/ YHW1UCCQU1j9agVu65alU6voLdHwaWybxGTCQL5BO0+V6eif6ugZYQ7G5RSx/co/c+pD rW78DMTPCVqChNLsxha8ytQWr2+okcNYrHPvFq6i5oy0NUEEcgNgOQY563Khdy7BwaiE GayGb7NpxDXrxkEQMEm07PZVHSM8il3t6wFRYZOpv731bE6ZWtatFOSpeclSBqFmPlBi XglRoCpPe50Mo45P17B5n7auaSkMgpgJwcs113g0m8O/KKtFwKkXMPTkBQ972YiNE5P5 GAmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697884635; x=1698489435; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+RYgdEy4vmhveHfxCT0Gp6r3CyP4JVNR3H7E6xxlyL4=; b=YEi49ks5mp4UGQlpafyu5+rm/t3Vc5Qna4XJ048652sG33WLp5U2E7RghudU7vDhBG 1safzFkaVQn4gYZT+bzUR7qixARDJoh100YlDK8hj3Dp744Muf97K9EyaQceWS/qL7u3 sN8WDMlORYuS9TwwP+ZqjLi2eoUBemgO5qO4IgP/HOEwARZqwV1NlPxdfZ1rSo5ZHoR8 nzTE5oHMfcpLJevWlAOkpmF/0wSAWzEDhoCjr8PaeBbrTECCwQe9GhMx4IqQfpnVVGam 3d8RyFqUF5Bl1DNfLeqj9ohu3PsdBW4gI8u21VsVIdSAMVAqvnCvcJ6joh+Q0ne2eq2z hHCQ== X-Gm-Message-State: AOJu0Yx909mf4C4ZNHpjvqluNNDkTKFiYyVxKxVEAa1okFRg63ZaLnZh 4mot/0/UMlrZ4rjSLS/Wj0I= X-Google-Smtp-Source: AGHT+IEyx/gC+2wXJoCNt52n/O9YtRwYZrhYOQiGswnkeLLURCUABpYNMcyBMiBz9qcAXVxWuL9UgQ== X-Received: by 2002:a05:6512:23a0:b0:507:a703:886e with SMTP id c32-20020a05651223a000b00507a703886emr3605043lfv.53.1697884634347; Sat, 21 Oct 2023 03:37:14 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id z19-20020a19f713000000b00507a3b16d29sm810490lfe.191.2023.10.21.03.37.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Oct 2023 03:37:13 -0700 (PDT) From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: <012EA2B6-279A-4A83-8C63-00EDB44A14CF@gmail.com> Content-Type: multipart/mixed; boundary="Apple-Mail=_14F9D228-1909-464D-A491-76953426F413" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#66604: [PATCH] Gud LLDB completions Date: Sat, 21 Oct 2023 12:37:12 +0200 In-Reply-To: To: =?utf-8?Q?Gerd_M=C3=B6llmann?= 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> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Apple-Mail=_14F9D228-1909-464D-A491-76953426F413 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 20 okt. 2023 kl. 19.28 skrev Gerd M=C3=B6llmann = : > Look at these escape sequences that suddenly appear when attaching to = a > process! I don't even know what "[1G" and "[8G" do. Fascinating! We should probably look into the source code producing it = (libedit probably) but I wrote the attached monstrosity and it... seems = to work. (Proof of concept only.) It attempts to edit out the part of strings jumped over by CHA (CSI G), = and it also edits out ED (CSI J) which is in this case just used to do = exactly that immediately after CHA. --Apple-Mail=_14F9D228-1909-464D-A491-76953426F413 Content-Disposition: attachment; filename=lldb-filter-cha.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="lldb-filter-cha.diff" Content-Transfer-Encoding: 7bit diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 8518738d09e..245600a2f94 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3871,6 +3871,42 @@ gud-lldb-stop (defun gud-lldb-marker-filter (string) "Deduce interesting stuff from process output STRING." + (let ((ofs 0)) + (while (string-match (rx (* (not (in "\n\e"))) + (group "\e[") + (? (group (+ digit))) + (group (in "GJ"))) + string ofs) + (let ((bol (match-beginning 0)) + (seq-start (match-beginning 1)) + (arg (and (match-beginning 2) + (string-to-number (match-string 2 string)))) + (op-char (aref string (match-beginning 3))) + (seq-end (match-end 0))) + (cond ((eq op-char ?G) + ;; Move to absolute column. Argument is 1-based. + (let* ((goal-col (1- (or arg 1))) + (current-col (current-column)) + (prefix-len (- seq-start bol)) + (eff-col (+ current-col prefix-len)) + (rel-move-left (- eff-col goal-col)) + (del-prefix (max 0 (min prefix-len rel-move-left))) + (elide-start (- seq-start del-prefix)) + (elide-end seq-end) + (del-chars (- rel-move-left del-prefix))) + ;; FIXME: insert extra spaces if we move beyond eff-col + (when (> del-chars 0) + (delete-char (- del-chars))) + (setq string + (concat (substring string 0 elide-start) + (substring string elide-end))) + (setq ofs (+ bol (- prefix-len del-prefix))))) + ((eq op-char ?J) + ;; Erase in display + ;; FIXME + (setq string (concat (substring string 0 seq-start) + (substring string seq-end))) + (setq ofs seq-start)))))) (cond ;; gud-info: (function-name args...) ((string-match (rx line-start (0+ blank) "gud-info:" (0+ blank) --Apple-Mail=_14F9D228-1909-464D-A491-76953426F413-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 21 06:51:21 2023 Received: (at 66604) by debbugs.gnu.org; 21 Oct 2023 10:51:21 +0000 Received: from localhost ([127.0.0.1]:42332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qu9Zg-0004Dp-MP for submit@debbugs.gnu.org; Sat, 21 Oct 2023 06:51:21 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:45492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qu9Zd-0004DZ-1s for 66604@debbugs.gnu.org; Sat, 21 Oct 2023 06:51:19 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-538e8eca9c1so2310102a12.3 for <66604@debbugs.gnu.org>; Sat, 21 Oct 2023 03:50:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697885442; x=1698490242; 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=Ncr5lP9XRU3W0ziOVUn10bKB2uozKHj8tG09unot3qY=; b=i1wHifEjkvxYr9D0zIEFAEjZE4ssdCmykhg7vFGY7MmwfCqjS4f71g29+PztyXFXVx 1XoNAuA3pgxdQfLtgPlRZ3MjvTKTQYsl9Rgv38z5l2eUD6Bkl5Azi1Uw00F5OVzjVUDC EWuu3y6EpqtuqHQX9C8wxIwFbL0o4cod/oPz0aFeeEK6InI+A8a1K9HKOao/TqJ91ryU r2fGQhZ9PbM/giyP1c4QIwUWbqFsIEnk7N8GPtgUq+ZeXOEdBGUoTd9Ekn+AjWVgiT06 +/cR5glaTKbOgNSvDsctn9xHE4HZig5KrjoPJkpFYjx4H70JlY4kRSx7TdQbp5wMYX38 a0aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697885442; x=1698490242; 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=Ncr5lP9XRU3W0ziOVUn10bKB2uozKHj8tG09unot3qY=; b=qE405d/i7A/p26d9zmasWArY9X/l+hvq09lC7jE22dIZ7OpX8XPBiuwoLlKhnWx4vf uuYRg8d2VFduyyPNBKgqxwbQNBf0p+uN4nq4XmSTX5JxVlmJUkjtvOXlfT9FFjAPHWGW hChcJVG2q5Saaf/7+eDA+bHN2t09mAeB9PpV9sDdtxI2IW/7uV3OIMurHsrxXT+X5lMM e3tOoKKEfEWhF8WqVDMs/9nFtoEaJRQ/21MVuvFFgG+q76EhZBktZ4FmTyjwX3Lg1CtP KdbCt3etEADUuYWlyPAAI8PNOHcsRi+mqSjTCITO568bmpj9asnigFXDPFLkM69U/xzU yX9Q== X-Gm-Message-State: AOJu0YyEHK5jF/0d8FWT9GSwa/oSdrqdrXeEOX2Pej59P2eLigqO7zsb 63ZuW+eFUkG5bct8u+DigQq0RW+VwfI= X-Google-Smtp-Source: AGHT+IEdiFJk3OqOMCLICRhBVmBOQvYrLPZxo2ZOjSBUlkJU7+sMk74CB8IuPjnD0rdiYTppN77c4w== X-Received: by 2002:a17:907:3d9f:b0:9b2:b152:b0f2 with SMTP id he31-20020a1709073d9f00b009b2b152b0f2mr3083808ejc.10.1697885441621; Sat, 21 Oct 2023 03:50:41 -0700 (PDT) Received: from Pro.fritz.box (pd9e366af.dip0.t-ipconnect.de. [217.227.102.175]) by smtp.gmail.com with ESMTPSA id v21-20020a170906489500b009b928eb8dd3sm3368094ejq.163.2023.10.21.03.50.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Oct 2023 03:50:41 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: <012EA2B6-279A-4A83-8C63-00EDB44A14CF@gmail.com> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Sat, 21 Oct 2023 12:37:12 +0200") 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> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> <012EA2B6-279A-4A83-8C63-00EDB44A14CF@gmail.com> Date: Sat, 21 Oct 2023 12:50:38 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 20 okt. 2023 kl. 19.28 skrev Gerd M=C3=B6llmann : > >> Look at these escape sequences that suddenly appear when attaching to a >> process! I don't even know what "[1G" and "[8G" do. > > Fascinating! We should probably look into the source code producing it > (libedit probably) but I wrote the attached monstrosity and > it... seems to work. (Proof of concept only.) Yeah, I've actually looked at the sources :-). There is an EditLine.cpp which has functions for this sort of stuff, but I couldn't find out where in LLDB it is actually called in the offending case. > It attempts to edit out the part of strings jumped over by CHA (CSI > G), and it also edits out ED (CSI J) which is in this case just used > to do exactly that immediately after CHA. H, don't know. SHould we really do that? I mean, I don't oppose it, es. if someone else does it :-). It just feels weird... From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 21 06:51:48 2023 Received: (at 66604) by debbugs.gnu.org; 21 Oct 2023 10:51:48 +0000 Received: from localhost ([127.0.0.1]:42335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qu9a8-0004Ea-4e for submit@debbugs.gnu.org; Sat, 21 Oct 2023 06:51:48 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]:53696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qu9a4-0004EL-Os for 66604@debbugs.gnu.org; Sat, 21 Oct 2023 06:51:46 -0400 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-507d7b73b74so2365942e87.3 for <66604@debbugs.gnu.org>; Sat, 21 Oct 2023 03:51:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697885471; x=1698490271; 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=4olpOFbWTA+pKmcgX/r3qDVMA9dna/kqIXn88uMFP8g=; b=JPV2DcXN4acP5nLrzt/KDLWktt4pXUe2MZtuMdiTBbwgO5ekZgbdN3gXD3PTrYXGvb mMSmTkJmwwXsbxzzW9OAV9OEr403SvGGc8RBCJr0GeRHvh1Unp3H0LQsTavDf3H9sy1X mjYVKHoL2HpIFSfDWxxvR456wJmj398HinECY8wPQkqeTfKUpc1QZTiZQD1T0OObgWzV zaU5lRZ1qTPNkE0thGcI49X62SYr8WQyMyRTiB1yBXQvFzJgdo+/8OZ79CZUXB+ED22G IwpaXQ+YRDEmgahHkBTdyrhMGPiym3YvyanYuiSPqwBDkQgU1bsYYYKghBB3O6pgD1/0 rwew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697885471; x=1698490271; 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=4olpOFbWTA+pKmcgX/r3qDVMA9dna/kqIXn88uMFP8g=; b=tEEIuI4zUh3UafVltS1VvOlDhQEcZQaLVAjH96CSJws/uPTiCehGgMU6RnJmOOwkXe 6iOlu61820aefmbt0tzKV3gwjyn8w6Oz6smjJZYHb892ZSMGW89lnR8ugVceAXWGU2qm GPVsQWxhJagiMTCOh33UsvuBFiwnL9+9c/FR68ODJC/ftLd898r7Vn2m00kgDBeAhvbj UXnPn5JlMvP+RXoxrJyvKNe/OGxUo4f+8BeMwiVe0sY/dcjtFf0g/Qsbm4P0nL6f/9V7 oRARLh5MB5ZChgc5cji7Ty2UYqvRIwy6Cl3yPzca+UY2lZkW9T5seYfHCTuGHrzj/E1U yPEA== X-Gm-Message-State: AOJu0YyaeHZJxv4XblNDdMqTRotG5QxcTRoBOK6GqLrlYbN8NquB/3Kz yJe7ngfnLSLc7PJpRCp4S58= X-Google-Smtp-Source: AGHT+IFcZAURopJstqY/yGSyFaFZPD0IJ6ObBpV18TkEHw1dBCQf6MqMLC+LW3cHpDGkiW1w3kc/yw== X-Received: by 2002:a05:6512:3ea:b0:503:38f2:6e1 with SMTP id n10-20020a05651203ea00b0050338f206e1mr2688311lfq.5.1697885470937; Sat, 21 Oct 2023 03:51:10 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id g7-20020a056512118700b00507d2c7e7basm819935lfr.119.2023.10.21.03.51.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Oct 2023 03:51:10 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#66604: [PATCH] Gud LLDB completions From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Sat, 21 Oct 2023 12:51:09 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <95EABD09-9E0C-4526-9AE3-E48CB4D22969@gmail.com> 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> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> To: =?utf-8?Q?Gerd_M=C3=B6llmann?= X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 21 okt. 2023 kl. 12.32 skrev Gerd M=C3=B6llmann = : > I'm now resasobly convinced that this is kind of a bug in LLDB. It > doesn't check if it has an ANSI terminal sometimes, and sends ANSI > cursor movement sequences anyway. I'm not sure exactly when CHA first appeared; VT220 doesn't have it but = VT510 does. (Even VT100 has ED.) Of course we're not exactly happy with a terminal using any kind of = editing sequences. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 21 08:34:01 2023 Received: (at 66604) by debbugs.gnu.org; 21 Oct 2023 12:34:01 +0000 Received: from localhost ([127.0.0.1]:42504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quBB2-0006tg-PU for submit@debbugs.gnu.org; Sat, 21 Oct 2023 08:34:00 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]:51620) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quBAu-0006tN-VH for 66604@debbugs.gnu.org; Sat, 21 Oct 2023 08:33:59 -0400 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9be02fcf268so253892566b.3 for <66604@debbugs.gnu.org>; Sat, 21 Oct 2023 05:33:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697891595; x=1698496395; 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=BXwjpPnRg5g8m0GTmnQWHFuWc+44rwsZ1F7QUGeHoKY=; b=V4gzfeWkB+D/QnBMAe8GwUbI4tr/66NnAa59J7QNGfr8ROd+P6r9G9xToFrjDeFzEA O+bB+s+VJqXMen2FnvzP3/d7VfnnYqh9IA+8cZqId71Ck9jmMQvJ+Q42dRpDbx22xpgU 1Y69YfdFEGmvRT/kHZGAWk+SSg9DQNAmALBB6Rwq2nlUSlIOyw67biMIQUPYLlS30XpN vvP2lRSRl53PTrqQ7FZ1ULhmZvzq0TpN1tVvNlIb0jEByCWswZRnMe8S2+RHi6j2TIKd v3lYOZ/zd97NEyZZJxXfSR7Ym+eXq9mKuFTZQ9TrzgLBfiaCWV8ifPxdrY3j3r5vobM5 GOAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697891595; x=1698496395; 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=BXwjpPnRg5g8m0GTmnQWHFuWc+44rwsZ1F7QUGeHoKY=; b=PIMa9kjgB+WUB9Gz5HriUisTL2654KH0JCJhbZfRZVjyH89whH0Qh5/ja++AMOS6ok yYjJ1dbuhW6kCjiAVliH5FYTYK0nqhJYWwwhcQNbEIIrB7STBEaA7/m6msSimrDXnz9H TtAck1BeUfE3ivvkmVVd86weR2g7FY7/UwbxWtCEdCbSKJzBkK+OIvNGBZWThTHlQdoD I9a2GlnvRWQ2M8L8FpYBwOYMOPC6nxIwOvU1yVLJDMDbabUcdMvf1bF/lVojyfN6KdQL t2uRZIV7FwFbWA6/1fZdCSUCQRQrr0+oKm9wfd6lqrr7GwZQ9Fwud7n4+BVExv5+HGvk 3omQ== X-Gm-Message-State: AOJu0YzKQ4LIh7S0gdgbPpHCx6keckLfyKKb5/cR+jVq9uGPNN+oQcIe EtRVViNogwLlv9GGrf8FGV0JiSbU4ps= X-Google-Smtp-Source: AGHT+IFLAjOMAVfXGfOaRX+WirGW2LJY8fmNMDOLxEtK7IGiAvzD4e/omxtS3Eh9fTyb2YbxoOeOcA== X-Received: by 2002:a17:907:8688:b0:9c3:607b:52c2 with SMTP id qa8-20020a170907868800b009c3607b52c2mr3274072ejc.30.1697891594667; Sat, 21 Oct 2023 05:33:14 -0700 (PDT) Received: from Pro.fritz.box (pd9e366af.dip0.t-ipconnect.de. [217.227.102.175]) by smtp.gmail.com with ESMTPSA id mb8-20020a170906eb0800b009b947f81c4asm3546880ejb.155.2023.10.21.05.33.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Oct 2023 05:33:14 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: <95EABD09-9E0C-4526-9AE3-E48CB4D22969@gmail.com> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Sat, 21 Oct 2023 12:51:09 +0200") 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> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> <95EABD09-9E0C-4526-9AE3-E48CB4D22969@gmail.com> Date: Sat, 21 Oct 2023 14:33:13 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 21 okt. 2023 kl. 12.32 skrev Gerd M=C3=B6llmann : > >> I'm now resasobly convinced that this is kind of a bug in LLDB. It >> doesn't check if it has an ANSI terminal sometimes, and sends ANSI >> cursor movement sequences anyway. > > I'm not sure exactly when CHA first appeared; VT220 doesn't have it > but VT510 does. (Even VT100 has ED.) Of course we're not exactly > happy with a terminal using any kind of editing sequences. Yeah, but TERM is "dumb", so I think lldb shouldn't emit this. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 23 01:32:29 2023 Received: (at 66604) by debbugs.gnu.org; 23 Oct 2023 05:32:29 +0000 Received: from localhost ([127.0.0.1]:48845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qunYD-0005R3-17 for submit@debbugs.gnu.org; Mon, 23 Oct 2023 01:32:29 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]:51476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qunYA-0005Qo-4o for 66604@debbugs.gnu.org; Mon, 23 Oct 2023 01:32:28 -0400 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-9be02fcf268so415587666b.3 for <66604@debbugs.gnu.org>; Sun, 22 Oct 2023 22:31:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698039111; x=1698643911; 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=JMpnnL8lQvmpqNnpXKoyoeKMK7GA4bXpa7zZhNoIkEo=; b=XNqRN03so9Ev0F9DYmc7KcRv8d3SSdxIlATEIZalf198c88F6AnmX/pwybUj5E6mZw ZE0nkurhXBigqjGCkMDg8VcI73W/CrYKNSAaw49n4ZJn2xkkKiGoN1t69DbQNOwZni5A ZZt+1BO33evPee9vSj5dHKgl7VL+RXQdtYqhSAvknVu14jFFI1eejQHbXo0zlonix1Hd izgzc0q8TQc5xiA6LNERX3OmzfR53YynMsUr+Dlpl8uzAIboYpDUdg04pElRHVoqv32K QF3zWTcsTYWQ3YxayA0urRg8kAqBDmfKZ8z1N1eiY7JNPnCkJ7wj34gqZeMC4h1GEL8M v5Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698039111; x=1698643911; 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=JMpnnL8lQvmpqNnpXKoyoeKMK7GA4bXpa7zZhNoIkEo=; b=Qi6YRSLIxUfqRxJI2RqnpEFSghRjh/dDTN7D7BNPaBARjF2IeYdahP5ckx+9U/dm1j sSPAlBzkd63b/2oX2ylcGwZEqylU5kwRsvPFzVo4hcJM7pP5jqm54ffLw3gYXcgFUZZd YMhcvySFWU5bNMfRPZV1Y0ifp9drjxFUSRtX9RN5ivuVRrDPNo5E8LztAYISin1xq7lA Rp+lkM/dqNTQWT0oD+WWhezFaGCKYwasuIYAusg6H5Wm3NVywU8m96Vjw6RCxSjgQ0aa oX1nxJjHw8r0UVn1BfNBL5aFOAHkgUyDRmQ4SDAndzxlN4s4NmwW8t2EzuhQn0Ts1yVn meOQ== X-Gm-Message-State: AOJu0YwXvHG+ZlpgfsPa9QywzK6V4f6OwMskq8G41zr6vpeCYFKY+T1/ incqVBsP0dUvSqhrrhwCHQ+YLtDC7wQ= X-Google-Smtp-Source: AGHT+IEnYUNuBmFjkCm2vQ0xCd9pBgZI+DkxLJNQVv8OBYHCHBS3i7NLdQMXdC3h72qMdPsr8HE/NQ== X-Received: by 2002:a17:906:6a13:b0:9ae:74d1:4b45 with SMTP id qw19-20020a1709066a1300b009ae74d14b45mr6813904ejc.65.1698039110727; Sun, 22 Oct 2023 22:31:50 -0700 (PDT) Received: from Pro.fritz.box (pd9e3686e.dip0.t-ipconnect.de. [217.227.104.110]) by smtp.gmail.com with ESMTPSA id h16-20020a1709063b5000b0099c53c44083sm6037701ejf.79.2023.10.22.22.31.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 22:31:50 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llmann?= =?utf-8?Q?=22's?= message of "Sat, 21 Oct 2023 12:50:38 +0200") 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> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> <012EA2B6-279A-4A83-8C63-00EDB44A14CF@gmail.com> Date: Mon, 23 Oct 2023 07:31:49 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Gerd M=C3=B6llmann writes: > H, don't know. SHould we really do that? I mean, I don't oppose it, > es. if someone else does it :-). It just feels weird... Since the problem won't go away any time soon, I've now comitted something maximally simple to work around it. Could you please confirm that it works for you? From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 23 13:19:22 2023 Received: (at 66604) by debbugs.gnu.org; 23 Oct 2023 17:19:22 +0000 Received: from localhost ([127.0.0.1]:51535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quyaI-0004L5-5g for submit@debbugs.gnu.org; Mon, 23 Oct 2023 13:19:22 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]:59740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quyaF-0004Kq-Dm for 66604@debbugs.gnu.org; Mon, 23 Oct 2023 13:19:20 -0400 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-507adc3381cso5174955e87.3 for <66604@debbugs.gnu.org>; Mon, 23 Oct 2023 10:18:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698081524; x=1698686324; 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=I8BJ9b/XCM27nsGNyeJChTcZTQH6NXbYw5KuY5J0Wzk=; b=I9hJyDg2dAzu3IAvurwmE810wFlOa4ONpzQmSKcdaGFAVXrDhMxuHKe8DtGl+u7i/g F+H2CUlW0HSar92lKhfy09aun4zhz0gMR12eegZzhqfdFO2QZynaQrOHDQp+xBX2TldC bBGOp22wSTDdJxoDFNudpHOhIYAYCKbC3N9aIUOL02SpImhE1BIq3vB/BPJOtiqhdJQ2 ggGMqxv9bsLL6WDQiJt6Qondd557VbAV+NqcbDcpu/zs5jAhzwiTXQVZT9aCfFK5c7N/ ENtcIS5eIAKTlHHwTrW66hUkaKkVYfwiH3pHzjW06NjZhDCYdPi3Pbwfs/AAD/a9yaXv 3buw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698081524; x=1698686324; 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=I8BJ9b/XCM27nsGNyeJChTcZTQH6NXbYw5KuY5J0Wzk=; b=mA3JHdgrD2IbapaLKlxGJ+Xr+wQt8T7MmSjaCd0ghZmLfa0qSQcAD64rCwcLdmFlFW JSU9Wfz+bKcI8QNlCZEzMlHuQEDcfArQEV79esLNDDDmwnZ9Q6k2fxLSCZymA8g9m5Yq qJw4oYgF+zsD8JY6Lh7q/Mv1q+6pwYCKPJfe/y6bB92e4UnBErSarVvxtfWMqRU+Sg1H e3BRnxB6uhUUoP8FRxOkpBRDgPLscDDLtJc8QyRe48m9ErgKFcc6QdRPnExJSaYaTWr6 7Y7+1xajPBI/EMSy6j+5CWm6vu2OAmTnsDazdKpGQZULtu4J2y7703qHDnQQEgykcyZJ cTVA== X-Gm-Message-State: AOJu0YzHR6pG0uv1kCpbfKsv8P9hGhPEEH5i2tAJAOyQ//ZnMBZC2wuO IcPoU53vBUb1FsfscRih8i4= X-Google-Smtp-Source: AGHT+IE47/RA8kYlpk9+n28iDNqZ5UIPNsXtm/3CHU7KX/M8gnuH049jiKm2FL250ndqj85pdexzRQ== X-Received: by 2002:a19:ac04:0:b0:500:d4d9:25b5 with SMTP id g4-20020a19ac04000000b00500d4d925b5mr6827926lfc.56.1698081523860; Mon, 23 Oct 2023 10:18:43 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id d5-20020a193845000000b00507ab956ab9sm1783511lfj.147.2023.10.23.10.18.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Oct 2023 10:18:43 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#66604: [PATCH] Gud LLDB completions From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Mon, 23 Oct 2023 19:18:42 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <38B50C63-09EE-4BA7-BBC5-ABEF6E213CC3@gmail.com> 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> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> <012EA2B6-279A-4A83-8C63-00EDB44A14CF@gmail.com> To: =?utf-8?Q?Gerd_M=C3=B6llmann?= X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 23 okt. 2023 kl. 07.31 skrev Gerd M=C3=B6llmann = : > Since the problem won't go away any time soon, I've now comitted > something maximally simple to work around it. Could you please = confirm > that it works for you? It didn't really: the pattern was far too ad-hoc and it didn't even = handle the test case we were talking about (b redisplay_internal; c). It's now been made slightly more capable. I wasn't kidding about the `eval` needing to go, though -- it really = does. Would you oblige? From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 23 13:58:21 2023 Received: (at 66604) by debbugs.gnu.org; 23 Oct 2023 17:58:21 +0000 Received: from localhost ([127.0.0.1]:51608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quzC0-0005QD-Vb for submit@debbugs.gnu.org; Mon, 23 Oct 2023 13:58:21 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]:50428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quzBy-0005Pz-UF for 66604@debbugs.gnu.org; Mon, 23 Oct 2023 13:58:19 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-5384975e34cso5637341a12.0 for <66604@debbugs.gnu.org>; Mon, 23 Oct 2023 10:57:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698083862; x=1698688662; 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=k1qdIMWMUpMVZ9DqIJCZyOkW0qyHnImXSMuQM4Q1IqM=; b=Y1EbdXoa9X8v5TtRvpSZ/FK20l44L2FtgKPoz66eOBW4hVGwdOFIK/lGdt9j6mZwj6 2AlKuOelqlbr4e6dwEKPeGW/I96thjpIoa7BFc7YxMAhG3EBdiv2cEeLNIxTmEerjXhk HazLIblEs02MLRYFvtMuziT1ol9csT3rwUyuHymTlKlk/v9fwATOo+57j3mOxZOs5MZH ITZ4CfoLP2OlMIfhBGWLxAuTN3HSBVvNpI3QOsBAaTyB3dcpLCFc9vrrnOJnT0xwReYi JfJhk7di9r97ek4p3GxnuxqGwrUsw5OzzJJUfYr1C4VUGQQTrRH0xMhNrFyt23f8BXoh nZ/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698083862; x=1698688662; 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=k1qdIMWMUpMVZ9DqIJCZyOkW0qyHnImXSMuQM4Q1IqM=; b=ioyF91XVgv9HM8YUqb3TfompSlffr26QHIcwL57FnI34FjFHDem+HRDnUYXbrXeuG8 1clb+UMmRKZwNsUiR40R7AiYhpsI9ablXCSHB2MrS958aiu6y9Y+j4/+2vQcnDVaVLbn D4XkM5vsaf1oNKrS3rJs9WNGNwH+wA9JVNfPo9J3UPSqAF2f6p8pwVaAnNw87NMR19Fz BnGb5Fom7W1qrErgQ65kkSfpL477p7ZjXf71Z0vcU1LhPtNDvZTNIyes4MQr+nCPjAuI hi75yrubAo5QNGau2msadPotBDIH0TBticBWa9SlBdQIWtFDCKdEqQZzLoBsax7PB5RW zcWA== X-Gm-Message-State: AOJu0YyfddCJY+DNzjSUtgMDiqXtXzS91hVwubMBjBjIXxiZGCFDSUI0 gfFH2k613eEczdD6fhwYXdhvLq0IybI= X-Google-Smtp-Source: AGHT+IGL/NnNXmoC0uf/7pGku62te6AjYuaqNwbaEv8O6dX6TQe87TJvaTPm0GjA32wFQ7o+8UDbyg== X-Received: by 2002:a17:906:eec6:b0:9a5:7f99:be54 with SMTP id wu6-20020a170906eec600b009a57f99be54mr8751593ejb.67.1698083862071; Mon, 23 Oct 2023 10:57:42 -0700 (PDT) Received: from Pro.fritz.box (pd9e3686e.dip0.t-ipconnect.de. [217.227.104.110]) by smtp.gmail.com with ESMTPSA id y6-20020a17090668c600b009c7608eb499sm6998583ejr.94.2023.10.23.10.57.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 10:57:41 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: <38B50C63-09EE-4BA7-BBC5-ABEF6E213CC3@gmail.com> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Mon, 23 Oct 2023 19:18:42 +0200") 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> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> <012EA2B6-279A-4A83-8C63-00EDB44A14CF@gmail.com> <38B50C63-09EE-4BA7-BBC5-ABEF6E213CC3@gmail.com> Date: Mon, 23 Oct 2023 19:57:37 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 23 okt. 2023 kl. 07.31 skrev Gerd M=C3=B6llmann : > >> Since the problem won't go away any time soon, I've now comitted >> something maximally simple to work around it. Could you please confirm >> that it works for you? > > It didn't really: the pattern was far too ad-hoc and it didn't even > handle the test case we were talking about (b redisplay_internal; c). Ok. Good that I asked. > It's now been made sleightly more capable. Fine. I wouldn't have done it. > I wasn't kidding about the `eval` needing to go, though -- it really > does. Would you oblige? So, you're not kidding, I'm impressed :-). IOW, that came across a bit weird. But no harm done. You could have looked a few lines above what you insrted, though. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 23 16:52:19 2023 Received: (at 66604) by debbugs.gnu.org; 23 Oct 2023 20:52:19 +0000 Received: from localhost ([127.0.0.1]:51989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qv1uN-0001HU-6i for submit@debbugs.gnu.org; Mon, 23 Oct 2023 16:52:19 -0400 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]:51480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qv1uK-0001HG-Em for 66604@debbugs.gnu.org; Mon, 23 Oct 2023 16:52:17 -0400 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2c50fbc218bso53696161fa.3 for <66604@debbugs.gnu.org>; Mon, 23 Oct 2023 13:51:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698094300; x=1698699100; 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=N4ruHpJmWBh1rCOVFqR0PEacdJnX+cfgkhpXY3qrFwM=; b=RzOXR1cRr9QGFza3jqU0r3r+DS8KLUEkhJNEHp4PPUP6gEAx89kvcfAHLVUkMR7WFV ICrHldY+ioAWig+BdQZW0i5G1yUf6s20TLYyYOU5+SG2XjCOBoYcmjmgFbn+LDkZzKRl vLFk2E0cWOLOKmAXDJdt/xOo0dTs5siRVus28zsneLAGVMzoGB6J4GSQNCJ27zEw31o8 IrIRgVkxXXsdnc2vvxuIcGtnugRSf5RYjzi2Iu60Hsz+XZkP5sUJrt9xkoLxeT0B5/7i Se8En2rd1UnnujgOCuxUtjGai6eYoF5WA8Arp3wtnaO1Sl39ArBXIxSHi/lU3N6d6aoa IjQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698094300; x=1698699100; 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=N4ruHpJmWBh1rCOVFqR0PEacdJnX+cfgkhpXY3qrFwM=; b=uG5+w0X638JfLid/mxZNv4az6WPCrxuqmL2Tax8B5IhjeXG+Q68Y3Kf8+CAZu83roz o9PJ0QXl9FDHjap8FI9F2a1PV9v0TZSFpOjGf4OTrWTAcbRlRmHln2TFcmVkbRiQ659g JJo2UDY3mBkLjl83cd1mkEzMkhIkMg2HyHCT5gkhSaqbHKsaxdBqleW3VwdYf0a5e0Qf B1s2N6nxzfrnvm22Vony7BoCWCwSC3bmKgWLt5b+DhJeJlnWQ5T2v8kbIkN8nGXXlAZJ ZUn/2avvj15YhOjIRmGBS67eSRL6UKskA0FOEqu6iS2JboLy0X2gVF8KewTfQy4aIqAO 7YOA== X-Gm-Message-State: AOJu0Yzcw78hxqKqfXn+fvoi7pDmGBnPRLSmsISJ7EAxaKzUbZF3wjWZ N8OvS+eL+XASiN3B9NxIxOI= X-Google-Smtp-Source: AGHT+IG0YBq8SedsHnvd3UjW3+P3BJu592jyo+XqaWn+hERvb0MoPids8VedXiN0GSoTScLL2EazfA== X-Received: by 2002:a2e:3307:0:b0:2c4:feef:84d with SMTP id d7-20020a2e3307000000b002c4feef084dmr7525052ljc.43.1698094300230; Mon, 23 Oct 2023 13:51:40 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id j10-20020a2e3c0a000000b002b657f10b78sm1722005lja.58.2023.10.23.13.51.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Oct 2023 13:51:39 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#66604: [PATCH] Gud LLDB completions From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Mon, 23 Oct 2023 22:51:38 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <539642B7-3753-414E-956B-1ABC657C623B@gmail.com> 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> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> <012EA2B6-279A-4A83-8C63-00EDB44A14CF@gmail.com> <38B50C63-09EE-4BA7-BBC5-ABEF6E213CC3@gmail.com> To: =?utf-8?Q?Gerd_M=C3=B6llmann?= X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 23 okt. 2023 kl. 19.57 skrev Gerd M=C3=B6llmann = : >> It's now been made sleightly more capable. >=20 > Fine. I wouldn't have done it. I know. > You could have looked a few lines above what you insrted, though. Sorry, I haven't kept up with your pace at all. My sincere apologies! There's one annoyance though. Normally, lldb shows frame information as frame #0: 0x000000010182f09c emacs`redisplay_internal at = xdisp.c:16687:8 [opt] but now we get the less informative and much less readable gud-info: (gud-lldb-stop :file = ////Users/mattias/emacs/src/xdisp.c/// :line 16687 :column 8) Surely we can have it both ways -- keep the standard frame-format and = append some machine-readable stuff on a separate line which is then = removed in the filter function so that the user doesn't need to see it? From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 24 00:36:30 2023 Received: (at 66604) by debbugs.gnu.org; 24 Oct 2023 04:36:30 +0000 Received: from localhost ([127.0.0.1]:52712 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qv99a-0005F6-8e for submit@debbugs.gnu.org; Tue, 24 Oct 2023 00:36:30 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]:60658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qv99V-0005Ek-8P for 66604@debbugs.gnu.org; Tue, 24 Oct 2023 00:36:28 -0400 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-9ad8a822508so603100366b.0 for <66604@debbugs.gnu.org>; Mon, 23 Oct 2023 21:35:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698122149; x=1698726949; 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=ATR/j8kNPfzFuRTRvVBejXAMcYmkqcxmKTJkpJmPr1o=; b=giSf9NuXxdKpnlXlkfOoJjSjZZgwjtjRwIXFE+o+CxoHWawNjAmp27MmSebc+DnVUt 4IHSEqZl04OCjgWFHekyR6cRSIuxgPAZx4zXrMvEGiVeFiVtkFaSzgeY0eHfDJfUJCS2 jo7kz3rqDTsVe7vIA0jW/4a69O1i8QhJCAeFIIAv5FRH6buNc1bNFFa+/n6Wxg9F1dWw 870o29z8gPU9lLa9DpfqrkrEtOpFSeVBAshvcPPIR40nSvrNEZEJl9Yqic5zYT/Mlbp2 +XvsLNY5O2cp50GX4SoQstqQ6HkfSF1ZkxhxTosePFRsFqHzHJ692MVqh6Zg7aEcsG++ WXfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698122149; x=1698726949; 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=ATR/j8kNPfzFuRTRvVBejXAMcYmkqcxmKTJkpJmPr1o=; b=H+DBicIicoWnl0BxOXZKXO6y2p6TuOLu6xzbVdhw58LUxXD0iFgYafQ37UjKevD7VZ gF9Uu+IEHr8m9udedvO3Ny9rrMRwgCVnwCOMa8uSGqJXdQmtEfuf/8JvNWokROPywq/S orjT+Fuh4upxMwMkKK0kqf7SxAJV2gEMISpAcdI31ZgmkwjDjAIzNZXkoyKhWYftYajD eIU+IjmguhqfKF+UCm/h/Tn1xtfoL0NZaVzKx9fGuj2rZ61QeVLJ0JPtv4+oA5J7Blhz obPMpYTWAvWMe6tSRESfPxDa0JKISug+Be/mMPJLmXaANDtlvpLyGGmqqkP57a7QPggw pqyg== X-Gm-Message-State: AOJu0YwlnUMPOqCTm1OyU6FthQ2yPvJgHhug8p4r5s+eX6RoMBfjw+i+ 5bS7AYX7VfRhNJacCcAUz9Sunf//n6Q= X-Google-Smtp-Source: AGHT+IEluUaPYO0drNpgqsWomuCYnuwxrRD4yCTFe7ffZgc7IJDn5gUSLYU2gxmOyN+UVQh73nfL6Q== X-Received: by 2002:a17:906:7309:b0:9a6:426f:7dfd with SMTP id di9-20020a170906730900b009a6426f7dfdmr9090078ejc.66.1698122148500; Mon, 23 Oct 2023 21:35:48 -0700 (PDT) Received: from Pro.fritz.box (pd9e36d06.dip0.t-ipconnect.de. [217.227.109.6]) by smtp.gmail.com with ESMTPSA id 30-20020a170906209e00b009a1b857e3a5sm7557465ejq.54.2023.10.23.21.35.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 21:35:48 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: <539642B7-3753-414E-956B-1ABC657C623B@gmail.com> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Mon, 23 Oct 2023 22:51:38 +0200") References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> <27BF071E-2E0D-49F9-B595-E8A560436C50@gmail.com> <2577C531-285B-49CC-BFAA-3D3A3A0B986D@gmail.com> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> <012EA2B6-279A-4A83-8C63-00EDB44A14CF@gmail.com> <38B50C63-09EE-4BA7-BBC5-ABEF6E213CC3@gmail.com> <539642B7-3753-414E-956B-1ABC657C623B@gmail.com> Date: Tue, 24 Oct 2023 06:35:47 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > There's one annoyance though. Normally, lldb shows frame information as > > frame #0: 0x000000010182f09c emacs`redisplay_internal at xdisp.c:1668= 7:8 [opt] > > but now we get the less informative and much less readable > > gud-info: (gud-lldb-stop :file ////Users/mattias/emacs/src/xdisp.c///= :line 16687 :column 8) > > Surely we can have it both ways -- keep the standard frame-format and > append some machine-readable stuff on a separate line which is then > removed in the filter function so that the user doesn't need to see > it? That would also be my preference, but I haven't found out how to do it. The idea would have been to append the Gud format to frame-format, so that the possibly user-defined frame-format stays visible. I found the output of "settings show frame-format" too difficult to parse in the general case, and LLDB's Python API didn't give me a clue how to get at the value of frame-format so that I could perhaps produce something that's easier to handle. So, that's an area for improvement. Another area for improvement is possibly remote debugging, BTW. I can't get remote debugging to work between two macs, so I don't know how LLDB behaves when debugging remotely. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 24 04:48:39 2023 Received: (at 66604) by debbugs.gnu.org; 24 Oct 2023 08:48:39 +0000 Received: from localhost ([127.0.0.1]:53050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvD5b-0006ct-5m for submit@debbugs.gnu.org; Tue, 24 Oct 2023 04:48:39 -0400 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]:51304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvD5W-0006bo-Lz for 66604@debbugs.gnu.org; Tue, 24 Oct 2023 04:48:37 -0400 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-507c91582fdso6214938e87.2 for <66604@debbugs.gnu.org>; Tue, 24 Oct 2023 01:48:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698137278; x=1698742078; 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=Wveo1aoSWf4Yvzd9PxUtJMKkoJV8SA/Vp7k58FkQ0ew=; b=Rb9Cp+azwe2SnN+KETScyxp1wcjHMbzE23UjLXEw+Isi6YrdyxSoLfd3TcwWmbvtor j7rAAC757hW3z+qo20b/m0YcTgISeexa2muRd/FK+/3kjsybEcMuZtRyHXgK/1aCDUY6 +dsd+7yFGjuUyWjK8P+6M8dCyEkdnZLSeGwNwQUYs5yeyt1JyCkuTEHDVJFlDe9Y1AGo I3SmeBR9Od6xTeqEYzqO9lCkJKDJTOBod1RIJ3RQFVezBaR7L34aMQ71LqePXeQACXng y0Hle7vVeIcSWfzEK3AXlrWPXkdrtMybuAbiPJjPnhYyP3hL/hzlpMZGfLAmJrky8cPe DXDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698137278; x=1698742078; 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=Wveo1aoSWf4Yvzd9PxUtJMKkoJV8SA/Vp7k58FkQ0ew=; b=WFjMpHaZr3d2gtCFDHKyTX7ziyof1pqEx44p90HMUT7UdjwBC4HO7BlKKR2G4U7ARa TO4Xlk/mULFVaAFTQnYnSX7auPld3UzDNzja9nQwGZjZ63hOLM2tlqQ9Rpg2Eeoq3hvd g+vdDGnm/ETWmz6yqVUGlnGp7m1CBQpccuFgaGtaJ6wsrL5wc86uu3Qz7IU6GB5w12NH AD6eCfQQdatzFPJE5V6dGSadM54437eN5alesPA7YeJjJxTA7I3fo0S7fEZUy7Yjrte0 cyZKhOR1Dv10HMzuPe7ismPIOrE2XI7GDMAVy5SFvOk+GSCQSub2D+sDmXFKp5usrtoi PHmw== X-Gm-Message-State: AOJu0YwzvkfFMtGelKlQ66l/uxAvwZDEzoRiwPlTxUIM85vBCVC/2C0U b55oMv9Y6ZbS13rQhbPFkto= X-Google-Smtp-Source: AGHT+IFej6nG0bkTXhVQ+LwpClQiTgE5ShIz2HXMHhpe2xtLhS7R7N0dpqTUbvIkqi5qCsfp7XgVZQ== X-Received: by 2002:ac2:4315:0:b0:507:b90a:7a5d with SMTP id l21-20020ac24315000000b00507b90a7a5dmr8317623lfh.10.1698137278161; Tue, 24 Oct 2023 01:47:58 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id q9-20020a056512210900b005079691360csm2061337lfr.49.2023.10.24.01.47.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Oct 2023 01:47:57 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#66604: [PATCH] Gud LLDB completions From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Tue, 24 Oct 2023 10:47:57 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <1F4ECC94-05F6-4111-9383-398E603B7E97@gmail.com> References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> <27BF071E-2E0D-49F9-B595-E8A560436C50@gmail.com> <2577C531-285B-49CC-BFAA-3D3A3A0B986D@gmail.com> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> <012EA2B6-279A-4A83-8C63-00EDB44A14CF@gmail.com> <38B50C63-09EE-4BA7-BBC5-ABEF6E213CC3@gmail.com> <539642B7-3753-414E-956B-1ABC657C623B@gmail.com> To: =?utf-8?Q?Gerd_M=C3=B6llmann?= X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 24 okt. 2023 kl. 06.35 skrev Gerd M=C3=B6llmann = : > The idea would have been to append the Gud format to frame-format, so > that the possibly user-defined frame-format stays visible. I found the > output of "settings show frame-format" too difficult to parse in the > general case, and LLDB's Python API didn't give me a clue how to get = at > the value of frame-format so that I could perhaps produce something > that's easier to handle. I'm sure there's a better way, but this seems to work: deb =3D lldb.debugger inst =3D deb.GetInstanceName() ff0 =3D deb.GetInternalVariableValue("frame-format", = inst).GetStringAtIndex(0) ff1 =3D ff0[:-1] + '!gud file ${line.file.fullpath}\\n"' deb.SetInternalVariable("frame-format", ff1, inst) The GetInternalVariableValue method returns an lldb.SBStringList with = the actual string as its first element. For some reason this string is = in quoted form and the newline is escaped as well, so we peel off the = last quote before gluing on the rest. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 24 04:53:25 2023 Received: (at 66604) by debbugs.gnu.org; 24 Oct 2023 08:53:25 +0000 Received: from localhost ([127.0.0.1]:53056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvDAD-0006n7-0A for submit@debbugs.gnu.org; Tue, 24 Oct 2023 04:53:25 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:49512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvDAB-0006mt-6W for 66604@debbugs.gnu.org; Tue, 24 Oct 2023 04:53:23 -0400 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-9c603e235d1so641461366b.3 for <66604@debbugs.gnu.org>; Tue, 24 Oct 2023 01:52:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698137568; x=1698742368; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=lZpjj14T/dH2gs9s9WLd7cgDMI9/NLgNn5qU8PNIq5I=; b=ZSskPjBUtN3/z+s/DGq5JVI/QMxXGzi7yV0ME0lnYtjUN77gt641Uv+1K8W6kj9no+ 5kcK1jAFnYOrEznuyOuaeulJwYESNu5T8PMtWkrwiCjrX7//e7Qz9luWQLgBAonLx3lt KX8oCorPekl81HAosCihQh56Sl61G44jomvNR1nFbZ7nmfgS7Q9vaaCbi9IfXhtC95MZ UQL16xcmoU5TYWLdotOYAv9edn7pak2BwLmDPKGS6y7dPipetyTqNRTBEof4mODTnAld UhCF01l0rXZ/OGuPvqGE8uwnj6Khlk9OcueZWpRbRMjr7vmioCdpWRriCGA24RFxS63p Mscg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698137568; x=1698742368; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lZpjj14T/dH2gs9s9WLd7cgDMI9/NLgNn5qU8PNIq5I=; b=UHU3CEtT1XkfnEnsWYc6W38UL4bymsdF07Tavge3ejz3ci8GccWs6phgRJnlv2YeKp tVCoLuMkGnk/iQOkIaBNjTGMx58Y+Od524rWRfFGyfMeDElMHiyxxj6ua/iPwQ5wV3vG VSlvn6FgOJKk2sM1y3HGLArDOdG813WPnbPMUwJhe8XtNSrQFFwZ70DYVIyyjBpj42op CWLu/UEYYsvB2yT7UfOM/ZkXmyp76oVyBj5wAEE7+zIeMEgtPaZIShsQ8GT67ljCphxL Poa8Qo4YFURpcoO5ncbl2Z7YEYRNQAhZdDWga+lXTu4HBPwT1NdDV0gKGdsbIVBUFSpj xvdA== X-Gm-Message-State: AOJu0YxPZqQH2wzn7BK8Dp5wREa/zt/oYoofwQFg6P2NIpRLmESyzT3q fMgX83kDsW2+GYnh0BNVHqQ= X-Google-Smtp-Source: AGHT+IEPGk+mRDQme7M7+zTvKuEabgjWjdBNw+jzE5i/N2O4acwEhvGShzsDJhQ+NbOP+MtaPRbgmQ== X-Received: by 2002:a17:906:c14b:b0:9ad:a59f:331a with SMTP id dp11-20020a170906c14b00b009ada59f331amr9908382ejc.57.1698137567555; Tue, 24 Oct 2023 01:52:47 -0700 (PDT) Received: from [192.168.178.26] (pd9e36d06.dip0.t-ipconnect.de. [217.227.109.6]) by smtp.gmail.com with ESMTPSA id g1-20020a1709063b0100b0099b8234a9fesm7902275ejf.1.2023.10.24.01.52.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Oct 2023 01:52:47 -0700 (PDT) Message-ID: <8f73c616-dccd-4d09-ae54-45dc7f259190@gmail.com> Date: Tue, 24 Oct 2023 10:52:45 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#66604: [PATCH] Gud LLDB completions Content-Language: en-US, de-DE To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> <27BF071E-2E0D-49F9-B595-E8A560436C50@gmail.com> <2577C531-285B-49CC-BFAA-3D3A3A0B986D@gmail.com> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> <012EA2B6-279A-4A83-8C63-00EDB44A14CF@gmail.com> <38B50C63-09EE-4BA7-BBC5-ABEF6E213CC3@gmail.com> <539642B7-3753-414E-956B-1ABC657C623B@gmail.com> <1F4ECC94-05F6-4111-9383-398E603B7E97@gmail.com> From: =?UTF-8?Q?Gerd_M=C3=B6llmann?= Autocrypt: addr=gerd.moellmann@gmail.com; keydata= xsFNBGK3Qz4BEADz6clhctm9qf4lh1IJMOGL8dEBtyR8ZvdCtv1m7Oj5BVmBrHbF/hp/R/7m VAPNsyfPKNuqlesBmh/hr5zEHdzHMvLj8Hf5Yp8Ufo0ZqOtCzvIe62PHKvjt59FMNH3fpnId g5/8Kea2plWwH2u2hwxkhgC1mlMQFCILPED7OIMA3y4QvVbHqGP+kFl0OVHc4BeJHEXpVZTq RZl7q6V0LaXZtYWNffvQ/BWa9gmc1HztQTSBx6f3Lf9VTf5gQK7k691U+Vgyz7asKkHKeMO5 cdHAwsN+G+oI4KB2YCm2UMMpUKnoFLxdmswQGu1z6D75YlfxDLZmOTphlFXvIstoJnAgcT1Z ubowXAlHbxGnTfugZfe19xJxRTZ9zOty6m0aNaT4MshBQRj18nkZiBjZIoVQmluVMSgQ3kKJ cDzv+IijRf/9ekOcCfM8PK2pxOHX/lXm4fVW8hS4OMp/IPGTvAvu2ZXUOJSZpTUYz0EY3Al9 3XArmICvatrX/ePgvonkWJuruIQ6pPoefCsJyWaZj4/nrlW2mweDfVBkTbblbLO98UHM1TYu 1Pc0eTZChk7+5F8dXj7Tfn2Ll4xMVoYbIV5yEr1wMq/9d6S2EckCZAnH7R1romvtJhcse+uz tB2nyqxvCwMzZ28RrJiXkR4QIMSJi1ZMHU0dFQlkwZ/sRN0asQARAQABzSlHZXJkIE3Dtmxs bWFubiA8Z2VyZC5tb2VsbG1hbm5AZ21haWwuY29tPsLBlAQTAQoAPhYhBIq2Hj6Yk/Nh45H7 aXPqGxmQxT5jBQJit0M+AhsDBQkHhh9SBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheAAAoJEHPq GxmQxT5jG7sP/RcgeXp78GCJqyG52rXVBoxFc2qYi+j09jh7gLvHIvxiSW7umH68V6lhc9pY cIjLcI6qKyqHeyOytSYX7TGqA9L5S3oBZlSeQPN2q1kliNkOWG77T+9MVHkfNH3E+FM+BfqF oxcB6vpjcNkuT/y82ZaFwCHFhcIFjnCTp78HB7AkaywEAqtKCdJ70m5L4vPONMpA3P6S8AKf JEVyBZKUs2HSJtrObmW6wh0zRA//lKrI16ctCI476CgAqUTO+1blfx86XmRlwgc3McijArAX grj25yg9ryltL5YMv4M/pigqQMcwJ8bf4Q10si7jJ1SvGu9YMoTQ+QbYUtPYtPhYmJOT1CW/ jyIQrkRSPh8qslVM2frvD5YeQOMJMnW9ffB2ANDHGfiGHepm67gdeoKgO/ZShdSQchUCkkK7 ayjurIB6iYzuV/PSB1eQdxnG2RO/2w6ejcuk+nkFOavoyxDId/KRAZzWrErQnBQs9uZtwXrT FbB4rvL2apInnQKGCuiySscUrLeumbI3dCEjkOHfsqNLJj1LAL7HWsF3hBCnjupEglxP/7Ap D8SsANdmoEtJFjGJDcuX99PLl1zBrhjKFaIbIE/l+ncNrS8NwTTwr/Gdc+4YcSFmU/WXEP6R 70TTG0BBWM3If5lsMx1sPy5F/iuZCGzc7p5phO3Rg8btm0MzzsFNBGK3Qz4BEAC0R6MIhNIx RvY6VKUdP1OmR87arhPmZZWG4HOeH7uJ5QkgXbALd5SacbE5Hkfy9e+k25iTirJcA6EUMZcH KG26V3s1QKWDZMFT5ejTva4ZkAH3DitgnPDGTNnKEkLOSYJdTRtpXOqkdr9XyyKA8hjERPHU fgX32yqPj61pMK0uOm+EMaK4odoAIjix2qO6og7T97roiYn/Diw21V8aVWd08N2d8UZMVJuF /Z5xUB3pNqejNk3ZZEGsuHLAExHSuY9nRpW8PvwZZ/zWncrqJRmOD9xgbk8yuY99LM7ETyuT e73DIYKIHTL7XTq9yYnj9K3nZRRaABmhEfNY5wx2xwakkYjtTpA9LEIVDhWZDDw44v+rumVz 8MQB62RKyLyJnmt86qkDC6TTiHK2nK1r4XPyoYlIWF7pkoY1a2EVPkd67sKWjlvJ/oFjaSn6 WxfmyvPmm/2ryHyMuUepLZnjX/VA2ZIQ3VYrEsVDh1T2zTIX4myP6NwLTOVFpryRDD+WgNaL l5gbRRAJVcAEq4T63+zucULN98w59sGggdLrViiCL6bEeujj5dSI+BD1rog1rwhfzqMRdhVi rd2GwqvZNceVo2syx4V2JSPdp8na2pTyM9zI68JYVyvP+R5ok5CyVmEHgRkz9HNnZuG/bEPn zqeLROI/mqbxydwPLYi6PS+QLQARAQABwsF8BBgBCgAmFiEEirYePpiT82Hjkftpc+obGZDF PmMFAmK3Qz4CGwwFCQeGH1IACgkQc+obGZDFPmOT+g/9Hlui+8/EEiq3iat9OAXSR+qv4RGY 2XxdbsQVVr3Hx240IV9voxXqPa58Yt51qxlfdWaEkMcesqr8RPSS9FeEj0Zn4pWULp52j2Gu mTpJy4gnLkO12mUVOF/W9HazQdNjQqaAE2neimtmI5zUbGzdwKk7OBWGs9cBc3fJCZeAvuxE 3zTM/AoeFkqQ94F7jQERV+PNTbnNsXAj/0mu4Kp/nJsX2+b6V4zl2VN7GvSWuPyXCi8SZGZt fj4eETb0P7N1gCpch7NjhFe3nYWRG5D6HdcXak0DYsXwd3CbEHo8s36bSbIZ1EgIKjoqNow3 MrqJQsCuT8zajL95zBUICjF7IDYHW7EIDOma6p3D4dSJ+ySPkV5ZKzoqDEKKSKmgV9hDMknp Vsm6TRCyz+y3iDW4Fl8pTPR30Ug+vuNM5jK328wcpYrKrzbjf5JK3lT9fRV/uzBUTBjVE7oL yEGHWwCb5gr+dWSscS6l2Jjeh7fgpfhrbCZYvvcxC4Bfu1kFAhH20VFGYbo6O3xlNwJp8esi d1hplqC5SK7WmjZI0yEODn5Nt2fnk4zq1kXyqyj9jIh7VvYBJ7MDKcSINBwdOnSbmtYhUQfW 1fiKRG+gNgVI1o+mYoBgNd80vK8xfNUZjW8aVzJsS6F4C4hLXjs9dHKfEcgRnndY+AgoHVZy Vp5NW5c= In-Reply-To: <1F4ECC94-05F6-4111-9383-398E603B7E97@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 24.10.23 10:47, Mattias EngdegÄrd wrote: > 24 okt. 2023 kl. 06.35 skrev Gerd Möllmann : > >> The idea would have been to append the Gud format to frame-format, so >> that the possibly user-defined frame-format stays visible. I found the >> output of "settings show frame-format" too difficult to parse in the >> general case, and LLDB's Python API didn't give me a clue how to get at >> the value of frame-format so that I could perhaps produce something >> that's easier to handle. > > I'm sure there's a better way, but this seems to work: > > deb = lldb.debugger > inst = deb.GetInstanceName() > ff0 = deb.GetInternalVariableValue("frame-format", inst).GetStringAtIndex(0) > ff1 = ff0[:-1] + '!gud file ${line.file.fullpath}\\n"' > deb.SetInternalVariable("frame-format", ff1, inst) > > The GetInternalVariableValue method returns an lldb.SBStringList with the actual string as its first element. For some reason this string is in quoted form and the newline is escaped as well, so we peel off the last quote before gluing on the rest. That looks good, indeed! Will you give it a try? From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 24 06:01:32 2023 Received: (at 66604) by debbugs.gnu.org; 24 Oct 2023 10:01:33 +0000 Received: from localhost ([127.0.0.1]:53241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvEE8-0002uT-LA for submit@debbugs.gnu.org; Tue, 24 Oct 2023 06:01:32 -0400 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]:45403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvEE4-0002uD-Es for 66604@debbugs.gnu.org; Tue, 24 Oct 2023 06:01:30 -0400 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-507b18cf2e1so5829303e87.3 for <66604@debbugs.gnu.org>; Tue, 24 Oct 2023 03:00:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698141653; x=1698746453; 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=T2R0SiKYYqSX+UDltjdKFMx8v7VD6dZZpXi0n/YdM5k=; b=aLcjn4R8DM0Hn3yxUSzLfkmm/VXP94v3mJEyCN4gxS8d0nJ8HiegH5PxLA2WMx3SJl 8zIvmEo+K1ErpcaJObb9ltG8Hzh+RLawZGDc1BAsFQLjt6VyQNUxUlSjngdNLJFZ6JBU rGfoEjSxEQt/I5KjBG/u07eX19b/fsp8wOeRNmOajUMtYxtJpLcdmBfjeT/JZGy5UCIZ JXYX9uwS4LEBiHAprXJcVR4bntHVdHTyT4KrgRyFIRVpn/r7wBsrCTAn4vQYsDY4pPTB 8lG06olP1mNtEc8DC6hj7LtOQaiWbqbCO/1KbdElA19cTmrIHC6nMnkqdRQXg4YbCoco F+1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698141653; x=1698746453; 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=T2R0SiKYYqSX+UDltjdKFMx8v7VD6dZZpXi0n/YdM5k=; b=Eim6uE8lim5kz3mxZY9wvH7e/2LrV5vnhKUCMsxNzHa2j/Vcqdnxbs7xUE23pEj44b ya40HoLL2Bi4HrWcNBWd7CvqiFEEwhqddLOeeTD2OxWsJePVKKVTzwD0Nbzdd1rHWzmf 9dF7UOfLkJxsEM7T9VZKQPA4SsQYMaRnxQcS0hwmfdF6n1419dgVyMBATauw/9Jdxih4 IzJNhITTRSHbHv59vxawG98/nBh4UpRr8QsWiDQBdu5G5LfPekMseMzh4vOWCOqaq04r mrOIcae0qfkfWQ/IkR76HMjRincDAMz25TnmLSY8Nof+4PD/r3y071grqbtkXO+sgEl4 SYWA== X-Gm-Message-State: AOJu0YwWio5Wqnw/MMQ39JRbdy6FbxFJHGlEWo7soH1qo3G+eQwihkI/ KjY8TKtHPsRerhLMW05l2Sg= X-Google-Smtp-Source: AGHT+IHCn0rM1NG+hi6CbLaTrB0mGJISXMH1fLfZIGFA4dni3LCinVyvi+VaVRXaClOtJQ1tt2EZ8A== X-Received: by 2002:ac2:599a:0:b0:503:7dd:7ebd with SMTP id w26-20020ac2599a000000b0050307dd7ebdmr8129919lfn.24.1698141652631; Tue, 24 Oct 2023 03:00:52 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id d31-20020a0565123d1f00b0050363f87c64sm2083846lfv.36.2023.10.24.03.00.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Oct 2023 03:00:52 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#66604: [PATCH] Gud LLDB completions From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <8f73c616-dccd-4d09-ae54-45dc7f259190@gmail.com> Date: Tue, 24 Oct 2023 12:00:51 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> <27BF071E-2E0D-49F9-B595-E8A560436C50@gmail.com> <2577C531-285B-49CC-BFAA-3D3A3A0B986D@gmail.com> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> <012EA2B6-279A-4A83-8C63-00EDB44A14CF@gmail.com> <38B50C63-09EE-4BA7-BBC5-ABEF6E213CC3@gmail.com> <539642B7-3753-414E-956B-1ABC657C623B@gmail.com> <1F4ECC94-05F6-4111-9383-398E603B7E97@gmail.com> <8f73c616-dccd-4d09-ae54-45dc7f259190@gmail.com> To: =?utf-8?Q?Gerd_M=C3=B6llmann?= X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 24 okt. 2023 kl. 10.52 skrev Gerd M=C3=B6llmann = : > Will you give it a try? I made a feeble attempt. It would be nice if we could blast all the Python stuff to lldb in one = go; it would make initialisation a lot quicker. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 24 06:28:29 2023 Received: (at 66604) by debbugs.gnu.org; 24 Oct 2023 10:28:29 +0000 Received: from localhost ([127.0.0.1]:53252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvEeD-0003j5-8G for submit@debbugs.gnu.org; Tue, 24 Oct 2023 06:28:29 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:42472) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvEe8-0003in-Vy for 66604@debbugs.gnu.org; Tue, 24 Oct 2023 06:28:28 -0400 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-53db3811d8fso8993344a12.1 for <66604@debbugs.gnu.org>; Tue, 24 Oct 2023 03:27:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698143269; x=1698748069; 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=6lsdX1ZvcDeW0emvmLzjpoz7FfmAHInlpstQDI3iAC4=; b=W8mIwJaCl5pA15gi6uUMgTZKQnlyG3nXHDGI1NUgCkkPjNK+eQLpIXsDvKwTzu1JQc R4iuam+yBaGiq9XS/k4domuYyYDapD5M4UdFQhMu57QoBQPCMGhUXnY6CPq23GUzKPyD HgyFBn1pT7Kf3SUkuMAQRLDbIuLvO7hTQ2IZePmL4lJncr/y4SWzccmiJitMYVSE1zP/ 2sU+n9N48GKcr26ef4cA7boVGUDm5I9sfPK2JJFVLof/BjgqbDrsG6exRymmPQNI2RQB gQzNANB35XgK6xohKe/TqIYjavt7ddpo9Ji/zl72hldV0Jt1wPdvPJB+qWal9G52BI2X Srlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698143269; x=1698748069; 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=6lsdX1ZvcDeW0emvmLzjpoz7FfmAHInlpstQDI3iAC4=; b=Q0Jj2kWGON7vzyW3KA6PMx9vxprraXrbzmFGKcrxDetS8AJep6Iv6yVfEwu80FKXFg A23aGFlexa3TQk3ignOflZWr40aGjRupaXfaguOaz2eH7B4qHlGsozytqZJf9vJPyihQ JrALZzLJ2Q6kBG3HFn7lbxDOOm6RW33uFJgAIhMLt+j1r21fdqebuFcu4/2CdByeJ4OX I9tncxYU1jV7+oRbFk59FFvch/UY7CoUawICg/Xco16UHxB/byppeWk9n/Lb+JjIlY01 Vj4KxQVB2SzOOecBPHesS1tPMZCxME+r5NaknO9CTlWEt7xHWIpRH9J9GflMRuCS/DgY 7kHw== X-Gm-Message-State: AOJu0YwjkqJXTijx/lF5EAXLCVcdCffDbRr+AFNHdc9tl5q9naVsdoFX /WqJwnW53g5rjzfVGGEhalaIbcjMXPZ6sw== X-Google-Smtp-Source: AGHT+IH88Un/4QgfLb2Fvxn6N+u++Wf5UIM2n2CjlcUtNYk17C3GeuLaHktBESfcLcMkvR9YvVhX7w== X-Received: by 2002:aa7:ca49:0:b0:533:5d3d:7efe with SMTP id j9-20020aa7ca49000000b005335d3d7efemr13840715edt.6.1698143268839; Tue, 24 Oct 2023 03:27:48 -0700 (PDT) Received: from Pro.fritz.box (pd9e36d06.dip0.t-ipconnect.de. [217.227.109.6]) by smtp.gmail.com with ESMTPSA id e24-20020a50a698000000b0052febc781bfsm7885690edc.36.2023.10.24.03.27.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 03:27:47 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Tue, 24 Oct 2023 12:00:51 +0200") References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> <012EA2B6-279A-4A83-8C63-00EDB44A14CF@gmail.com> <38B50C63-09EE-4BA7-BBC5-ABEF6E213CC3@gmail.com> <539642B7-3753-414E-956B-1ABC657C623B@gmail.com> <1F4ECC94-05F6-4111-9383-398E603B7E97@gmail.com> <8f73c616-dccd-4d09-ae54-45dc7f259190@gmail.com> Date: Tue, 24 Oct 2023 12:27:46 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 24 okt. 2023 kl. 10.52 skrev Gerd M=C3=B6llmann : > >> Will you give it a try? > > I made a feeble attempt. Nice! > It would be nice if we could blast all the Python stuff to lldb in one go= ; it would make initialisation a lot quicker. Hm, maybe we could write all the stuff to a temporary file, and then "command source ", WDYT? From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 24 14:12:46 2023 Received: (at 66604) by debbugs.gnu.org; 24 Oct 2023 18:12:46 +0000 Received: from localhost ([127.0.0.1]:56567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvLtW-0008DI-6i for submit@debbugs.gnu.org; Tue, 24 Oct 2023 14:12:46 -0400 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]:45273) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvLtS-0008D0-SC for 66604@debbugs.gnu.org; Tue, 24 Oct 2023 14:12:45 -0400 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2c50cf61f6dso73799191fa.2 for <66604@debbugs.gnu.org>; Tue, 24 Oct 2023 11:12:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698171127; x=1698775927; 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=z25ETYm+vPpuOwolp1bJvcAIRy2nd8aS2kzRqynuN+k=; b=Cupb5l0OPabqeqtwQ1/Os29N/jzLRVUwzWaVfi7/sMmT34Su9WSXtTKjdbDzqjhOPA oJX59LtiDowTxIJIs14f4t9iv2Hfgh1+tBgkPnh9Mcdtaru723bXvHvcaUeYB0POLeSq ab7c0mKm/IssEi/6grXY5kmVRT5jFpeWYwexVQ3cMTo0okoOUxLGdTzTQaBWoe2b3G99 iD7Y1BH/UtAq9Nkgz+jIX+1pj7v1lbLrSzptV0VyAgYInljcqgR/SvvpkUbrBIMPteKj APjRrRwu4aKOmpqgy73Jr2/eVsmFV1NRtbL0F6wK/W4ylfa1+svcQ3Ui4n68Pa3McO4p 7wZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698171127; x=1698775927; 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=z25ETYm+vPpuOwolp1bJvcAIRy2nd8aS2kzRqynuN+k=; b=p8SYVToqCO4ZYt4ZYhdV/XL8qNLSv7Wjb6rQmHqm8SRy0YK2ZZYdm2C7YwwZUvT7xd E3Td6UcyxoPw/wsVwpi5Pn1lpbPAxMK1/TLueDjH9DH/XEtJR8oCBB8gDIiw+ivElawT /D/oTcuepy/xiJf2Lmk50YlnR9bHpDd2UbyuOyutAm6ZsSF13TRzsG3TzZ4HhEVeUX6A wVxSf/BsOXa6JWH7mFRdgLoY1DY83Gm5otCw14y15uXRd9DSGZS8QCoWYWYyKgce40o2 kBmLlxA2cDKeSavfoz+tUDFaNUYIkNruzV7f2KkS/kYFedKBj6p/AEH9z0ix7zmrT2Yu o+4w== X-Gm-Message-State: AOJu0Yw70Kfd/+sgk7/DondMk9i/YFPXSZ5+l0vKxONqceuA2Eh/1nGS zuUSNuOZuGbmXnB0Sb6Qj7Y= X-Google-Smtp-Source: AGHT+IGUtDPpRye/O7rKCoqdLFI7/8BObJSDPiosgXvhLqqXA9NZc0jYpLJx/feZncXR/zaTv6JWJA== X-Received: by 2002:a2e:a7c7:0:b0:2c5:1867:b0bd with SMTP id x7-20020a2ea7c7000000b002c51867b0bdmr9112653ljp.23.1698171126477; Tue, 24 Oct 2023 11:12:06 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id t13-20020a2e8e6d000000b002c4faf47378sm2125288ljk.28.2023.10.24.11.12.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Oct 2023 11:12:06 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#66604: [PATCH] Gud LLDB completions From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Tue, 24 Oct 2023 20:12:05 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <1C862BC4-900E-489F-BBFA-5E6180626803@gmail.com> References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> <012EA2B6-279A-4A83-8C63-00EDB44A14CF@gmail.com> <38B50C63-09EE-4BA7-BBC5-ABEF6E213CC3@gmail.com> <539642B7-3753-414E-956B-1ABC657C623B@gmail.com> <1F4ECC94-05F6-4111-9383-398E603B7E97@gmail.com> <8f73c616-dccd-4d09-ae54-45dc7f259190@gmail.com> To: =?utf-8?Q?Gerd_M=C3=B6llmann?= X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 24 okt. 2023 kl. 12.27 skrev Gerd M=C3=B6llmann = : > Hm, maybe we could write all the stuff to a temporary file, and then > "command source " Yes, but would make it more difficult to run lldb remote, wouldn't it? From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 25 00:29:47 2023 Received: (at 66604) by debbugs.gnu.org; 25 Oct 2023 04:29:47 +0000 Received: from localhost ([127.0.0.1]:57090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvVWd-0002Pu-FK for submit@debbugs.gnu.org; Wed, 25 Oct 2023 00:29:47 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]:51285) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvVWb-0002Pf-5S for 66604@debbugs.gnu.org; Wed, 25 Oct 2023 00:29:45 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-9adca291f99so759279366b.2 for <66604@debbugs.gnu.org>; Tue, 24 Oct 2023 21:29:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698208148; x=1698812948; 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=thYuNkNlKSV8DT4xNPtDinLW0KgeP+l30BMfh+MNx1I=; b=aIIPqWEZyLw77lTDLXJDwnIH/hBxPIg57MZj6qSzxs31VwJYeIbVBMJYZ4ZyCzTx9K iGOIMXG4SXJ845+Gm1n6CFmcDufUfoX1aajPqPqaGU2ycz4vlkSg59EnKzXl347BCJMf c5s3YoOX2J5k68iN2FeChF3Nz+kplaY8DhgEg57NfD9zgh4kDeF/1+Wx998zFkO8Ij9Y Oj0OEeDuAMexq7w7a+AqYCWGRVF2yIlpkUykVbG+P6E1eqouZUvTKDDprqeJC4dHZql3 ZiK0CMv7bYuOpyNAZW1t7Wl1b/mRFES+pNQ7tgT6i9I6+234ibZOfkfxMDln90J077bt yb3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698208148; x=1698812948; 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=thYuNkNlKSV8DT4xNPtDinLW0KgeP+l30BMfh+MNx1I=; b=A+JeSJKtYo7ODrO/7a/n7foY2T9YqBU5HgndAB3gepiaj6AYg/sUcSU8f/DOkIdw4B 86XWAQoptIyRUogjOois+AopPiP4uCV7eUs2vNbA1SvOOVPOcwyNvve7dRJrgxNKrnPr Ak8qCBYfaaJkU637CDapjDzeEIoJbSWcPlGhn1FjLIOqJ8dFMEAcDep6XCn/0QZy4iBc ycFN04xQsRsuBfbFcUhasGCes3s+cE8Xj0RbAqiy3i0Iw/GBhOQg8mBcVTUTnWKh7N2y 08Ltc8Z2h6lBOcrRsjIcl8yjXtZ9BjopD4+UhiNMRbZoIJ/mF2ONRnpF5o3bH/CA5k7/ inYQ== X-Gm-Message-State: AOJu0YxRMTpMfTwKrN5n9ThrsofzcHNQ6ywRR6sPPGh8GiiN/PH4T10A PouBA+vpZ3kGxMsf5WisOfw4dD1gywY= X-Google-Smtp-Source: AGHT+IEn7IdZ2QHkJQVNVV07GF+E3bVKMLSPwTmeuZqE8/uEqNVGOd1nSEQUwW/CzxXY+Ouwr3v59w== X-Received: by 2002:a17:907:7f29:b0:9ae:82b4:e309 with SMTP id qf41-20020a1709077f2900b009ae82b4e309mr11164617ejc.0.1698208147572; Tue, 24 Oct 2023 21:29:07 -0700 (PDT) Received: from Pro.fritz.box (p4fe3a69d.dip0.t-ipconnect.de. [79.227.166.157]) by smtp.gmail.com with ESMTPSA id s19-20020a170906bc5300b009b957d5237asm9117296ejv.80.2023.10.24.21.29.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 21:29:07 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#66604: [PATCH] Gud LLDB completions In-Reply-To: <1C862BC4-900E-489F-BBFA-5E6180626803@gmail.com> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Tue, 24 Oct 2023 20:12:05 +0200") References: <13AC7AD2-230A-4FAC-81D9-75FBE53456F8@gmail.com> <22B5EBE2-945E-413F-BCC6-8693AB90988C@gmail.com> <45D77CAF-8694-434D-90BC-448886FBB68E@gmail.com> <68E433F5-C7A5-4DCB-BF2B-FE1054F71E69@gmail.com> <012EA2B6-279A-4A83-8C63-00EDB44A14CF@gmail.com> <38B50C63-09EE-4BA7-BBC5-ABEF6E213CC3@gmail.com> <539642B7-3753-414E-956B-1ABC657C623B@gmail.com> <1F4ECC94-05F6-4111-9383-398E603B7E97@gmail.com> <8f73c616-dccd-4d09-ae54-45dc7f259190@gmail.com> <1C862BC4-900E-489F-BBFA-5E6180626803@gmail.com> Date: Wed, 25 Oct 2023 06:29:06 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66604 Cc: 66604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 24 okt. 2023 kl. 12.27 skrev Gerd M=C3=B6llmann : > >> Hm, maybe we could write all the stuff to a temporary file, and then >> "command source " > > Yes, but would make it more difficult to run lldb remote, wouldn't it? I don't think so. There are two cases, depending on what running lldb remote means: 1. Remote debugging in the lldb sense. Here, lldb runs locally and connects to an llb-server running somwhere else. I don't think that's a problem. 2. We run lldb on a remote machine using Tramp. For example C-x C-f /ssh:remote:some-file RET M-x lldb In this case, we have to oake sure that we write the commands file on the right machine, but I think that should already work, modulo bugs. BTW, I filed bug#66738 now, after building from a fresh master. Could you please also have a look? From unknown Fri Jun 20 18:24:45 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 22 Nov 2023 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator