binutils-gdb/gdbsupport
Tom Tromey 5ac588997c Do not define basic_string_view::to_string
gdb's copy of basic_string_view includes a to_string method.  However,
according to cppreference, this is not a method on the real
std::basic_string_view:

https://en.cppreference.com/w/cpp/string/basic_string_view

This difference matters because gdb_string_view.h will use the
standard implementation when built with a C++17 or later.  This caused
PR build/26183.

This patch fixes the problem by changing the method to be a standalone
helper function, and then rewriting the uses.  Tested by rebuilding
with a version of GCC that defaults to C++17.

(Note that the build still is not clean; and also I noticed that the
libstdc++ string_view forbids the use of nullptr ... I wonder if gdb
violates that.)

gdb/ChangeLog
2020-06-30  Tom Tromey  <tromey@adacore.com>

	PR build/26183:
	* ada-lang.c (ada_lookup_name_info::ada_lookup_name_info): Use
	gdb::to_string.

gdbsupport/ChangeLog
2020-06-30  Tom Tromey  <tromey@adacore.com>

	PR build/26183:
	* gdb_string_view.h (basic_string_view::to_string): Remove.
	(gdb::to_string): New function.
2020-06-30 07:53:03 -06:00
..
.dir-locals.el gdbserver/gdbsupport: Add .dir-locals.el file 2020-03-06 11:29:46 +00:00
.gitattributes gdb, gdbserver, gdbsupport: add .gitattributes files 2020-03-05 15:59:22 +01:00
ChangeLog Do not define basic_string_view::to_string 2020-06-30 07:53:03 -06:00
Makefile.am Move event-loop.[ch] to gdbsupport/ 2020-04-13 14:10:04 -06:00
Makefile.in Move event-loop.[ch] to gdbsupport/ 2020-04-13 14:10:04 -06:00
README
acinclude.m4 Move gdb/selftest.m4 to gdbsupport/selftest.m4 2020-03-12 14:19:38 -04:00
aclocal.m4
agent.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
agent.h
alt-stack.h
array-view.h
ax.def
block-signals.h
break-common.h
btrace-common.cc Don't pass NULL to memcpy in gdb 2020-03-31 07:29:53 -06:00
btrace-common.h Disable record btrace bts support for AMD processors 2020-05-14 17:56:33 -07:00
buffer.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
buffer.h
byte-vector.h
check-defines.el Add gdbsupport check-defines script 2020-01-14 16:25:04 -07:00
cleanups.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
cleanups.h
common-debug.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
common-debug.h
common-defs.h gdbsupport: include cstdlib in common-defs.h 2020-04-27 09:28:03 -04:00
common-exceptions.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
common-exceptions.h
common-gdbthread.h
common-inferior.cc gdbsupport: Let construct_inferior_arguments take gdb::array_view param 2020-05-25 11:38:45 -04:00
common-inferior.h gdbsupport: Let construct_inferior_arguments take gdb::array_view param 2020-05-25 11:38:45 -04:00
common-regcache.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
common-regcache.h gdb: protect some 'regcache_read_pc' calls 2020-05-14 13:59:53 +02:00
common-types.h Change gdbsupport not to rely on BFD 2020-03-12 13:32:16 -06:00
common-utils.cc gdbsupport: Drop now unused function 'stringify_argv' 2020-05-25 11:40:35 -04:00
common-utils.h gdbsupport: Drop now unused function 'stringify_argv' 2020-05-25 11:40:35 -04:00
common.m4 Move event-loop configury to common.m4 2020-04-13 14:10:03 -06:00
config.in Move event-loop configury to common.m4 2020-04-13 14:10:03 -06:00
configure Move event-loop configury to common.m4 2020-04-13 14:10:03 -06:00
configure.ac Move sourcing of development.sh to GDB_AC_COMMON 2020-03-12 14:18:00 -04:00
create-version.sh gdbsupport: Resolve shellcheck issues in create-version.sh script 2020-03-27 13:52:00 +00:00
def-vector.h
default-init-alloc.h
enum-flags.h
environ.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
environ.h
errors.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
errors.h Introduce and use flush_streams 2020-04-13 14:10:04 -06:00
event-loop.cc Move gdb_notifier comment 2020-04-13 14:10:04 -06:00
event-loop.h Move event-loop.[ch] to gdbsupport/ 2020-04-13 14:10:04 -06:00
fileio.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
fileio.h
filestuff.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
filestuff.h
filtered-iterator.h
format.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
format.h
forward-scope-exit.h
function-view.h
gdb-dlfcn.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
gdb-dlfcn.h Fix comment for 'gdb_dlopen' 2020-02-28 11:04:28 -05:00
gdb-safe-ctype.h Use safe-ctype.h (ISSPACE etc.) in symbol parsing & comparison 2020-05-23 12:46:37 +01:00
gdb-sigmask.h Fix typo (thead -> thread) 2020-04-28 11:38:26 +02:00
gdb_assert.h
gdb_binary_search.h Fix two typos in gdb_binary_search.h 2020-03-08 11:05:43 -06:00
gdb_locale.h
gdb_optional.h
gdb_proc_service.h Ensure proc-service symbols have default visibility (PR build/24805) 2020-01-16 19:14:14 +00:00
gdb_ref_ptr.h Mark move constructors as "noexcept" 2020-04-20 11:45:06 -06:00
gdb_select.h Move gdb_select.h to gdbsupport/ 2020-04-13 14:10:03 -06:00
gdb_setjmp.h
gdb_signals.h
gdb_splay_tree.h
gdb_string_view.h Do not define basic_string_view::to_string 2020-06-30 07:53:03 -06:00
gdb_string_view.tcc
gdb_sys_time.h
gdb_tilde_expand.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
gdb_tilde_expand.h
gdb_unique_ptr.h
gdb_unlinker.h
gdb_vecs.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
gdb_vecs.h
gdb_wait.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
gdb_wait.h
hash_enum.h
host-defs.h
job-control.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
job-control.h
netstuff.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
netstuff.h
new-op.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
next-iterator.h
observable.h
offset-type.h
parallel-for.h
pathstuff.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
pathstuff.h
poison.h
preprocessor.h
print-utils.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
print-utils.h
ptid.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
ptid.h
refcounted-object.h
rsp-low.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
rsp-low.h
run-time-clock.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
run-time-clock.h
safe-iterator.h
safe-strerror.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
scope-exit.h
scoped_fd.h Mark move constructors as "noexcept" 2020-04-20 11:45:06 -06:00
scoped_mmap.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
scoped_mmap.h Mark move constructors as "noexcept" 2020-04-20 11:45:06 -06:00
scoped_restore.h
selftest.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
selftest.h
selftest.m4 Move gdb/selftest.m4 to gdbsupport/selftest.m4 2020-03-12 14:19:38 -04:00
signals-state-save-restore.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
signals-state-save-restore.h
signals.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
symbol.h
tdesc.cc gdb: New maintenance command to print XML target description 2020-06-23 22:17:20 +01:00
tdesc.h gdbsupport: add format attribute to print_xml_feature::add_line 2020-06-27 14:39:00 -04:00
thread-pool.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
thread-pool.h
traits.h
underlying.h
valid-expr.h
version.h
warning.m4 gdb: enable -Wmissing-prototypes warning 2020-03-11 15:15:12 -04:00
x86-xstate.h
xml-utils.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
xml-utils.h

README

This is a helper library that is used by gdb and gdbserver.

To send patches, follow the gdb patch submission instructions in
../gdb/CONTRIBUTE.  For maintainers, see ../gdb/MAINTAINERS.