From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#66604: [PATCH] Gud LLDB completions Date: Tue, 24 Oct 2023 10:47:57 +0200 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> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19158"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66604@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 24 10:48:47 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qvD5i-0004rP-QA for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Oct 2023 10:48:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvD5X-0005Kn-Nf; Tue, 24 Oct 2023 04:48:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qvD5V-0005KN-4E for bug-gnu-emacs@gnu.org; Tue, 24 Oct 2023 04:48:33 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvD5U-0004hb-Sj for bug-gnu-emacs@gnu.org; Tue, 24 Oct 2023 04:48:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qvD5x-0006fG-VG for bug-gnu-emacs@gnu.org; Tue, 24 Oct 2023 04:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Oct 2023 08:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66604-submit@debbugs.gnu.org id=B66604.169813731925480 (code B ref 66604); Tue, 24 Oct 2023 08:49:01 +0000 Original-Received: (at 66604) by debbugs.gnu.org; 24 Oct 2023 08:48:39 +0000 Original-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 Original-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 Original-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) Original-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) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.15) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:273086 Archived-At: 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.