From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 16CxOqShhGGHBwAAWB0awg (envelope-from ) for ; Thu, 04 Nov 2021 23:14:44 -0400 Received: by simark.ca (Postfix, from userid 112) id D618D1F40C; Thu, 4 Nov 2021 23:14:44 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B4CDF1F40A for ; Thu, 4 Nov 2021 23:14:43 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 85B3A3857805 for ; Fri, 5 Nov 2021 03:14:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 85B3A3857805 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1636082082; bh=2cTxQmu9gJaandM2wzhJIEN2JKuO28aKNB/gTU4eeOw=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=y7jOJdgvqjGYkwfGjwTUqsVgg6xWdsg5pdots3LVEnSSw4iv93eaxptRuvqI94PSj 31s23hKZOehAJ6cPcon7Xf4OopglUb5SDE2nr3Ol9kZageHxdBnlYlHXbnifAm3t9c +Qj/05AR34MIz/kb8ivGDSYSEp4bxRCHHye5nOXo= Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by sourceware.org (Postfix) with ESMTPS id 48D5D3858406 for ; Fri, 5 Nov 2021 03:14:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 48D5D3858406 Received: by mail-yb1-xb33.google.com with SMTP id j75so19442879ybj.6 for ; Thu, 04 Nov 2021 20:14:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=t3GkI/NWwf9YANaNmpZDOTBLpE2iIu6B4jcUvxjcfZ4=; b=hCsn/che6pJ2X0+vK1lRzf8HhgyO1fLkq1Kqb6M7iBURHwvvtJrXUaC1B0iVtbbdZd Tu8gHi6uLPaQk2H8tJQ+TiOrMnGbPdTI1bEAiO9/YBOXOssA/Gyejrfm9JkIHzeZOpal bt+0Q+MCn18e+BYvOS5S7yqhnJ+x/TKPYJaCAJuFVpPm/lDT6vSaZQzY9PoVeRV9orn6 ldTVKyiQAAZZBW9SbwxKgTIXfG5JRyis2MFKH9LmC13Y+eVFL5RPblEd8yC3IZkFhfOh muAP2DuTwRBPt603j/O81uMIxbneV0bPzgIK5gIW2tM7Nkw1/cQsHNfE963c1zS2TUjM rG2Q== X-Gm-Message-State: AOAM533KgOWjfWXaTj/AGTi/RYZKRHYrUTUKJD1+sE6fsaaMJrFkQZGE GCyYF8uwLrZRvnGFxYvSsbRTDJwQLGkx/v+Y9JTuqNXP5HQ= X-Google-Smtp-Source: ABdhPJxb6ULhnj5LUuS89VcShjJASww5f5y+/PtRvLS4dasrpM2Zzpfd7ZCsdeJyU+zTmMBoQ0sARsZJpHC6+ZWTBfY= X-Received: by 2002:a25:dc54:: with SMTP id y81mr41592670ybe.183.1636082056721; Thu, 04 Nov 2021 20:14:16 -0700 (PDT) MIME-Version: 1.0 Date: Thu, 4 Nov 2021 20:14:05 -0700 Message-ID: Subject: Concatenating LazyStrings To: gdb Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: David Blaikie via Gdb Reply-To: David Blaikie Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" 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)