[PATCH] Add startswith function and use it instead of CONST_STRNEQ.
Luis Machado
luis.machado@linaro.org
Mon Mar 22 16:13:00 GMT 2021
On 3/22/21 9:06 AM, Alan Modra via Gdb-patches wrote:
> On Sun, Mar 21, 2021 at 08:13:06PM -0600, Tom Tromey wrote:
>> Alan> Yes, the following compiles. Fortunately all gdb files that include
>> Alan> gdbsupport/common-utils.h also include bfd.h by one means or another.
>>
>> Sorry, I misunderstood. I thought the proposal was to put the
>> function in ansidecl.h.
>>
>> gdbserver can't generally include bfd. Maybe it works sometimes, but I
>> imagine if you do a gdbserver-only build, bfd.h won't even be created.
>> (At least, it shouldn't be, because gdbserver doesn't require bfd.)
>>
>> So I think some other approach is needed. Either ansidecl.h, or a new
>> header; or rename either the BFD or GDB function and go from there.
>
> A new header would be best, I think.
>
>> I'm happy to implement it if you like.
>
> Yes, that way you'll get it done properly. :) Sorry for the breakage.
>
Just FTR, I'm seeing breakage in sim/aarch64 and sim/arm. Both are
complaining about "-Werror=implicit-function-declaration" regarding
strncmp and strlen.
Is this the breakage you're talking about? Just so I know what to expect
when it gets fixed.
More information about the Binutils
mailing list