From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by sourceware.org (Postfix) with ESMTP id EA2C0386F434 for ; Sun, 24 May 2020 15:30:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org EA2C0386F434 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-217-XLK1_fIMM5ivynMcajL61g-1; Sun, 24 May 2020 11:30:10 -0400 X-MC-Unique: XLK1_fIMM5ivynMcajL61g-1 Received: by mail-wr1-f71.google.com with SMTP id l1so3302432wrc.8 for ; Sun, 24 May 2020 08:30:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=TrLKgKDTPiog51nCTo73XL6he40NcS766+xxFNnPm0Q=; b=AVLrUf0gUdb+DgYec5YBRc7ABepqQn8Zz+r6X3z8usZveICpzGS9Q4WNZ1/MqyT2/d BwLVlYSS8lbug1ngi9YY9nzHXmyyihtc1eevuRrXClj+aUchRT+VJzRj8BrSFSkuqlrt SylBkvNUdXuaaEx7pjTpJhtuhdaGhrvsqjrxCrMNizxvYNfUQ3vsQaOsn7VwLzP/WmDY ZlqfBgMr17Q9pf0ug5JvMPBv6jyYqtFr2J71mVmeS/3Uru5cu4itZh+WhjjBL3O220od Q/87Q15q5rQHEC8JURs+4dOmN5moz8I47SwkfoMi/pg8IXrjwGuvQpGwwSxaDb9j/UEE rl4Q== X-Gm-Message-State: AOAM532Hleb84scd4q8AxVEEELYiIheLl2sBU7yzAphOLEUHwUNII3Ld Uft1o35bbzVo5Ix9Enw7RBO/DWFEMwwULLYlp769w1q1ZxYZGqrZ7DeIF2nULdknNWmJEMZERQN 1lJweVlVHt6ovaF/naPZWQg== X-Received: by 2002:a5d:4284:: with SMTP id k4mr11262675wrq.284.1590334208652; Sun, 24 May 2020 08:30:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8cehsxROwTMfkuG/ayhhoWpkt5yOhiQW+e3e0trqz9UijrZOg2nDAb2uoa8K5QDpg/I4vRw== X-Received: by 2002:a5d:4284:: with SMTP id k4mr11262660wrq.284.1590334208454; Sun, 24 May 2020 08:30:08 -0700 (PDT) Received: from ?IPv6:2001:8a0:f909:7b00:2327:23ca:3e56:ef5f? ([2001:8a0:f909:7b00:2327:23ca:3e56:ef5f]) by smtp.gmail.com with ESMTPSA id 190sm8679480wmb.23.2020.05.24.08.30.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 24 May 2020 08:30:07 -0700 (PDT) Subject: Re: [PATCH] Add completion styling To: Eli Zaretskii References: <20200409024112.18065-1-tom@tromey.com> <83369dp3gy.fsf@gnu.org> <87eesc1x2d.fsf@tromey.com> <4b370f83-3954-bbc4-50b5-1528e8b4fca5@redhat.com> <83a71xxul5.fsf@gnu.org> Cc: tom@tromey.com, gdb-patches@sourceware.org From: Pedro Alves Message-ID: <0bee2d7c-4fe2-f6ff-088a-2d0c2730fbc9@redhat.com> Date: Sun, 24 May 2020 16:30:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <83a71xxul5.fsf@gnu.org> Content-Language: en-US X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2020 15:30:15 -0000 On 5/24/20 3:42 PM, Eli Zaretskii wrote: >> Cc: gdb-patches@sourceware.org >> From: Pedro Alves >> Date: Sun, 24 May 2020 13:58:02 +0100 >> >> Try "b main[TAB]" when debugging GDB, and you'll see that GDB >> highlights the "t" as the first different character here: >> >> selftests::string_view::cons_1::main() >> selftests::string_view::cons_2::main() >> selftests::string_view::cons_3::main() >> ^ >> >> while it should highlight here: >> >> selftests::string_view::cons_1::main() >> selftests::string_view::cons_2::main() >> selftests::string_view::cons_3::main() >> ^ > > Really? not here: > > selftests::string_view::cons_1::main() > ^ I don't understand. Under the "1"? Why? My understanding is that "set style completion-difference" highlights the first character that follows the string that the user typed, right? So if you type "b main[TAB]", for the "selftests::string_view::cons_1::main()" symbol, after "main" comes the open parenthesis. Just like here, you get a highlight under the "t" in "maint": maintenance_translate_address(char const*, int) ^ > But I actually don't understand how did we get these candidates by > typing "main". Don't we complete by looking for strings that begin > with what the user typed? I'm probably missing something here. You're missing that "b main" sets a breakpoint on every "main" function in every namespace. "b -qualified main" disables that. Thanks, Pedro Alves