From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id hJWkIKNh7WjeVC8AWB0awg (envelope-from ) for ; Mon, 13 Oct 2025 16:31:31 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=cQCJYGzK; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 757381E0B6; Mon, 13 Oct 2025 16:31:31 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 208F91E047 for ; Mon, 13 Oct 2025 16:31:30 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7EF283857348 for ; Mon, 13 Oct 2025 20:31:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7EF283857348 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=cQCJYGzK Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 9B7653858C2A for ; Mon, 13 Oct 2025 20:30:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9B7653858C2A Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9B7653858C2A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760387453; cv=none; b=uxq2mUR8t2H9YN25POGQ3tjBkF+TRor48QQxWQu+V7GKc7aobK7HMtY1kybc3pDxSay59IqzQ1ccG6k9eugsbdL6EK9WuDXBdIeVzoHnOaEm7y85Cw26K1iu4nNozdOYn/OQv0q1NuKNFBms9HOnqoUp5w+9pc8Z7HqeZLHZr+Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760387453; c=relaxed/simple; bh=mOyka6vcVzTPN/Jb8xOZ+WIygR4cSkVtvIxVnjxUK90=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=QJpBFC2NjhRB1S/BlYncLcgTf4n3mYnpHYcgWVo+QhdYGhMyy2/CTJHvCDQdM4FU3DcGKaupc2aZ56Fs7F9P3y2weRouT6kgp+IT5RKJ/FBW/aobrWPnr79fJmNWbQ+rzNmUw5wCxDc31aBz58Ob1TQ8kiRqk9FhOb9LUj5CUTE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B7653858C2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1760387453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZFh+VpooE6EYQHQpCB1FigqxoXcSD/Vsum6OVCF3AmM=; b=cQCJYGzKT4YJsvtXcWsUGmhYimftEx2/fkiob+grkPb7N+4TdcG/MBuEyAcqyO1f8iW5sf nTVXKrtzjiLgZygr7aMFTV4e1s666NdokJh7ea5SNUUijJNRU5QRWAKc/LOmPJQh8fIR7g ZcnbVrhbSwY/Pb1I59i7KUL8lbiRixs= Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-374-WdzQCjBoOiCrEd4hM-u5lg-1; Mon, 13 Oct 2025 16:30:52 -0400 X-MC-Unique: WdzQCjBoOiCrEd4hM-u5lg-1 X-Mimecast-MFC-AGG-ID: WdzQCjBoOiCrEd4hM-u5lg_1760387451 Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-b55118e2d01so6913027a12.1 for ; Mon, 13 Oct 2025 13:30:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760387450; x=1760992250; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZFh+VpooE6EYQHQpCB1FigqxoXcSD/Vsum6OVCF3AmM=; b=QCRDrFi+713dQHGxHIyq25FekffeXZpPCFNIAV0/c0RnwGuR1l2k/Zs3cJyuEeMN39 nLI8UPdwcmme80aEAB2h7muRa4zZL1i2n4mw2iUZVgXt8d5D5i3Q1UiSYCQuHhAyGmWP LiRyvWJOocfkXasFiG/o/HJ0TW7MbrCUBO8wn9wJWNfEsncxKinu0F02nZY2cjIvLxqO 1S+yoo8VYjDEC97XIHp+wU8GT/+dbWwtUBPEr4YxtUSoBTuxhZp1c6Sr/SEfljQQR3BJ VKNL/r394P2YNWgY0euTs4w1x/SyZCmZaoMRoHskHh8tyrPspAaoq4OBEbm//w9Issrc SSOA== X-Gm-Message-State: AOJu0Ywf+bqysK7IRsXKvlJ2lwY1H5MXtbTUWDJabtSR23XN74NuTI8E ACT3/Lvhr2pQUvgqBHguaSmE6eeIYmwj/Qa0AnNsdy14GjzdKUrrqsioeoPY0cDUTwj24vMmcnJ Q5VQCI0XxzQmJBvHxPsjzEthyZ5N7+1Td9CV8pYIfLRtvQUMC1ATiJVRhgklGtPrf8y/62Jc= X-Gm-Gg: ASbGncsqoCQ8oMvhEH0CqBvF2ChKoxKjjGF7H9IWF5UGVDqqDjvWv3ed3jNVNZBWWXu o/8/EMY7CSgtMniBplfXzAfHW+XkaR8zXImTzPo8im0lB3WIz6wIEPGyky5YifD9J7D5G5vSwMe IKolXW+JT9iSNBNpgy6nAQc8Jax+kz4ovp7zgORbEIT2HYEPzey5uMQVo2O4ZaTBCWQAF1OnyI0 diKfozBNLW7CSYC5l9+62lMRzr2xRIQbwUfw7snB9OobpPkBflaSxkjZZQKjmeHuvOMNmLnnHPv cODZj7QkSfAlyOlfUisRXlKdENIHVdX/Zi7pFiTUCeoRpjxsiBBl X-Received: by 2002:a05:6a20:3c8e:b0:2f6:6d95:69db with SMTP id adf61e73a8af0-32da84eabb5mr28664730637.57.1760387450451; Mon, 13 Oct 2025 13:30:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/k3gIh5xprcYUKLJNNM87ayavs7ZV+ErPiyL4bnCnZWcOSqhiwGHhjjjZB8gmPXUp8tjojw== X-Received: by 2002:a05:6a20:3c8e:b0:2f6:6d95:69db with SMTP id adf61e73a8af0-32da84eabb5mr28664694637.57.1760387449981; Mon, 13 Oct 2025 13:30:49 -0700 (PDT) Received: from ?IPV6:2804:14d:8084:9a69::1000? ([2804:14d:8084:9a69::1000]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b678df233cfsm10001274a12.28.2025.10.13.13.30.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Oct 2025 13:30:49 -0700 (PDT) Message-ID: <92b1136c-c739-4a1d-9828-642c0faa5051@redhat.com> Date: Mon, 13 Oct 2025 17:30:45 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb: Make startup message more user friendly To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20250915163912.9024-1-guinevere@redhat.com> <87y0piwmbr.fsf@tromey.com> From: Guinevere Larsen In-Reply-To: <87y0piwmbr.fsf@tromey.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ZP9xgUShiqJrD1wFq-a6pc2jECtVQsYUvBq8rDXYUrc_1760387451 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 10/10/25 5:09 PM, Tom Tromey wrote: >>>>>> "Guinevere" == Guinevere Larsen writes: > Guinevere> This commit attempts to make the startup message more friendly to new > Guinevere> users by using ascii art separators. If there is enough space availabe, > Guinevere> an ascii art box is printed containing the hints, otherwise a simple > Guinevere> separator is printed. The code deems "enough space available" when > Guinevere> there is enough space to print the documentation URL inside the box, > Guinevere> since the other hints will be broken into multiple lines if necessary. > Guinevere> Here are examples of the 2 possible startups, with enough space: > > If emojis_ok() then it seems like this could use Unicode line drawing > instead. Good idea, I'll look into that > Guinevere> Unfortunately, I was not able to think of a way in which the code could > Guinevere> break a line if necessary and also include styled code for URLs and > Guinevere> commands, so, since I believe it is more important to have the box as > Guinevere> available as possible, I opted to not include any styling options. > > I'm not sure I really understand the problem but I think this would be a > step backward. > > There are facilities to manipulate these sequences. E.g. see what > no_terminal_escape_file or escape_buffering_file do. It's not that I don't know how to recognize the sequences, but rather that I didn't know how to handle the %ps for counting spaces. I guess I would need to apply the style and check the gdb_byte* for the spaces? How would I go about that? > > One option might be to reimplement this as a ui_file that will only > split at un-styled spaces; and if the screen isn't big enough just omit > the box. Then print_gdb_hints wouldn't need two branches printing the > same stuff. I think implementing a ui_file would be overboard. If the style has been pre-applied, the function box_one_message can be print_starter_hint, and be generic enough to not need the multiple paths. -- Cheers, Guinevere Larsen It/she