This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 26/40] Optimize .gdb_index symbol name searching
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simark at simark dot ca>, gdb-patches at sourceware dot org
- Date: Mon, 20 Nov 2017 00:33:40 +0000
- Subject: Re: [PATCH 26/40] Optimize .gdb_index symbol name searching
- Authentication-results: sourceware.org; auth=none
- References: <1496406158-12663-1-git-send-email-palves@redhat.com> <1496406158-12663-27-git-send-email-palves@redhat.com> <87b7a366-9b57-c169-6336-78b3326bba89@simark.ca>
On 11/18/2017 05:23 AM, Simon Marchi wrote:
> On 2017-06-02 08:22 AM, Pedro Alves wrote:
>> + /* In completion mode, increment the last character because
>> + we want UPPER to point past all symbols names that have
>> + the same prefix. */
>> + std::string after = cplus;
>> +
>> + gdb_assert (after.back () != 0xff);
>
> Hi Pedro,
>
Hi!
> With Clang, I get this warning:
>
> /home/simark/src/binutils-gdb/gdb/dwarf2read.c:4316:30: error: comparison of constant 255 with expression of type '__gnu_cxx::__alloc_traits<std::allocator<char> >::value_type' (aka 'char') is always true [-Werror,-Wtautological-constant-out-of-range-compare]
> gdb_assert (after.back () != 0xff);
> ~~~~~~~~~~~~~ ^ ~~~~
> /home/simark/src/binutils-gdb/gdb/common/gdb_assert.h:34:13: note: expanded from macro 'gdb_assert'
> ((void) ((expr) ? 0 : \
> ^~~~
>
Bleh, I should have known that'd come back and bite. :-P
I'm sending a 3 patch series in response to this email that fixes that,
and also other things that I ran into in course of fixing it.
Thanks,
Pedro Alves