GNU bug report logs - #66604
[PATCH] Gud LLDB completions

Previous Next

Package: emacs;

Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Date: Wed, 18 Oct 2023 11:27:02 UTC

Severity: normal

Tags: patch

Fixed in version 30.1

Done: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mattias Engdegård <mattias.engdegard <at> gmail.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: 66604 <at> debbugs.gnu.org
Subject: bug#66604: [PATCH] Gud LLDB completions
Date: Tue, 24 Oct 2023 10:47:57 +0200
24 okt. 2023 kl. 06.35 skrev Gerd Möllmann <gerd.moellmann <at> gmail.com>:

> 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.






This bug report was last modified 1 year and 211 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.