From: David Blaikie <dblaikie@gmail.com>
To: gdb <gdb@sourceware.org>
Subject: Concatenating LazyStrings
Date: Thu, 4 Nov 2021 20:14:05 -0700 [thread overview]
Message-ID: <CAENS6Esxo8E7BokefqU1SDEeXzE5=qh6AxaR0NVRu5y93bMv7A@mail.gmail.com> (raw)
If I've got a pretty printer (for instance, for llvm's Twine type (
https://github.com/llvm/llvm-project/blob/6d03227c16ee1950db0e1aa05fbc3201770248eb/llvm/utils/gdb-scripts/prettyprinters.py#L354
+ https://llvm.org/doxygen/classllvm_1_1Twine.html ) that wants to pretty
print a string made up of other strings (from other pretty printers) - how
would I do that?
Specifically, I can't figure out how to correctly concatenate a gdb
LazyString value with another string. (even if I have to stringify the
LazyString (making it unlazy) in the process - calling ".value()" on the
LazyString doesn't seem to be enough - I can't seem to figure out how to
to-string-ify that resulting gdb Value (it doesn't have a pretty printer
that I can find - nor a to_string/str/string() function) to then
concatenate it with another string)
next reply other threads:[~2021-11-05 3:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-05 3:14 David Blaikie [this message]
2021-11-05 12:22 ` Luke Drummond
2021-11-05 19:55 ` David Blaikie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAENS6Esxo8E7BokefqU1SDEeXzE5=qh6AxaR0NVRu5y93bMv7A@mail.gmail.com' \
--to=dblaikie@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).