[PATCH] Add startswith function and use it instead of CONST_STRNEQ.

Tom Tromey tom@tromey.com
Mon Mar 22 02:13:06 GMT 2021


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.

I'm happy to implement it if you like.

thanks,
Tom


More information about the Binutils mailing list