]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/python/py-type.c
New common function "startswith"
authorGary Benson <gbenson@redhat.com>
Fri, 6 Mar 2015 09:42:06 +0000 (09:42 +0000)
committerGary Benson <gbenson@redhat.com>
Fri, 6 Mar 2015 09:42:06 +0000 (09:42 +0000)
commit61012eef8463764ccd9117dc1c9bc43cc452b7cc
treef576a77bcb77e71cc60e6592b56d2aa915b50c36
parente80417caef36c7d5e3d1da6a3b396a872d9d7201
New common function "startswith"

This commit introduces a new inline common function "startswith"
which takes two string arguments and returns nonzero if the first
string starts with the second.  It also updates the 295 places
where this logic was written out longhand to use the new function.

gdb/ChangeLog:

* common/common-utils.h (startswith): New inline function.
All places where this logic was used updated to use the above.
77 files changed:
gdb/ChangeLog
gdb/ada-lang.c
gdb/amd64-tdep.c
gdb/amd64-windows-tdep.c
gdb/amd64obsd-tdep.c
gdb/arch-utils.c
gdb/arm-tdep.c
gdb/arm-wince-tdep.c
gdb/breakpoint.c
gdb/bsd-uthread.c
gdb/c-typeprint.c
gdb/cli/cli-dump.c
gdb/cli/cli-script.c
gdb/coffread.c
gdb/common/common-utils.h
gdb/compile/compile.c
gdb/corelow.c
gdb/cp-namespace.c
gdb/dbxread.c
gdb/dictionary.c
gdb/dwarf2-frame.c
gdb/dwarf2read.c
gdb/elfread.c
gdb/gcore.c
gdb/gdbserver/hostio.c
gdb/gdbserver/linux-low.c
gdb/gdbserver/linux-x86-low.c
gdb/gdbserver/notif.c
gdb/gdbserver/remote-utils.c
gdb/gdbserver/server.c
gdb/gdbserver/tracepoint.c
gdb/gdbserver/win32-low.c
gdb/gdbtypes.c
gdb/gnu-v2-abi.c
gdb/gnu-v3-abi.c
gdb/go-lang.c
gdb/guile/scm-type.c
gdb/i386-cygwin-tdep.c
gdb/i386-tdep.c
gdb/i386obsd-tdep.c
gdb/infcmd.c
gdb/jv-typeprint.c
gdb/linespec.c
gdb/linux-nat.c
gdb/m2-typeprint.c
gdb/m32r-rom.c
gdb/machoread.c
gdb/macrocmd.c
gdb/microblaze-rom.c
gdb/minsyms.c
gdb/mips-sde-tdep.c
gdb/mips-tdep.c
gdb/msp430-tdep.c
gdb/nat/linux-procfs.c
gdb/nbsd-tdep.c
gdb/p-typeprint.c
gdb/ppc-linux-tdep.c
gdb/python/py-type.c
gdb/regcache.c
gdb/remote-m32r-sdi.c
gdb/remote-notif.c
gdb/remote.c
gdb/reverse.c
gdb/rs6000-tdep.c
gdb/ser-tcp.c
gdb/serial.c
gdb/somread.c
gdb/sparc64nbsd-tdep.c
gdb/sparcnbsd-tdep.c
gdb/symtab.c
gdb/tracefile-tfile.c
gdb/tracepoint.c
gdb/tui/tui-data.c
gdb/utils.c
gdb/valops.c
gdb/windows-nat.c
gdb/xcoffread.c