binutils-gdb/gdb/dwarf2
Tom de Vries aaa1d4b8f2 [gdb/build] Fix build breaker with -std=c++11
When building with -std=c++11 I run into:
...
gdb/dwarf2/cooked-index.c: In member function \
  ‘void cooked_index::start_writing_index(dwarf2_per_bfd*)’:
gdb/dwarf2/cooked-index.c:469:10: error: lambda capture initializers only \
  available with -std=c++14 or -std=gnu++14 [-Werror]
          ctx = std::move (ctx)] ()
          ^~~
...

Fix this by capturing a copy instead when using -std=c++11:
...
    = gdb::thread_pool::g_thread_pool->post_task ([this, per_bfd, ctx] ()
...

Tested by building with and without -stdc=++11 on x86_64-linux.

Reported-By: Tom Tromey <tom@tromey.com>
Reviewed-by: John Baldwin <jhb@FreeBSD.org>
2023-08-08 10:08:04 +02:00
..
abbrev-cache.c
abbrev-cache.h
abbrev.c
abbrev.h
ada-imported.c
attribute.c
attribute.h
call-site.h
comp-unit-head.c
comp-unit-head.h
cooked-index.c [gdb/build] Fix build breaker with -std=c++11 2023-08-08 10:08:04 +02:00
cooked-index.h [gdb/symtab] Fix data race on index_cache::m_enabled 2023-08-04 15:02:43 +02:00
cu.c
cu.h
die.c
die.h
dwz.c
dwz.h
expr.c
expr.h
file-and-dir.h
frame-tailcall.c
frame-tailcall.h
frame.c
frame.h
index-cache.c [gdb/symtab] Fix data race on bfd::{cacheable,format} 2023-08-04 15:02:43 +02:00
index-cache.h [gdb/symtab] Fix data race on bfd::{cacheable,format} 2023-08-04 15:02:43 +02:00
index-common.c
index-common.h
index-write.c
index-write.h
leb.c
leb.h
line-header.c
line-header.h
loc.c
loc.h
macro.c
macro.h
mapped-index.h
public.h
read-debug-names.c
read-debug-names.h
read-gdb-index.c
read-gdb-index.h
read.c [gdb/symtab] Find main language without symtab expansion 2023-08-05 17:57:13 +02:00
read.h [gdb/symtab] Fix data race on dwarf2_per_cu_data::{files_read,is_debug_types} 2023-08-04 15:05:57 +02:00
sect-names.h
section.c
section.h
stringify.c
stringify.h
tag.h
types.h