binutils-gdb/gdb/nat
Simon Marchi 824dfcc311 Fix build failure in linux-osdata.c
Commit

  Use std::vector in linux_xfer_osdata_processgroups
  b129dcac88

broke the build with older gcc (at least 4.7 and 4.8):

In file included from /usr/include/c++/4.7/algorithm:63:0,
                 from /home/emaisin/src/binutils-gdb/gdb/nat/linux-osdata.c:40:
/usr/include/c++/4.7/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<pid_pgid_entry*, std::vector<pid_pgid_entry> >; _Tp = pid_pgid_entry]’:
/usr/include/c++/4.7/bits/stl_algo.h:2315:70:   required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<pid_pgid_entry*, std::vector<pid_pgid_entry> >]’
/usr/include/c++/4.7/bits/stl_algo.h:2347:54:   required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<pid_pgid_entry*, std::vector<pid_pgid_entry> >; _Size = long int]’
/usr/include/c++/4.7/bits/stl_algo.h:5483:4:   required from ‘void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<pid_pgid_entry*, std::vector<pid_pgid_entry> >]’
/home/emaisin/src/binutils-gdb/gdb/nat/linux-osdata.c:480:57:   required from here
/usr/include/c++/4.7/bits/stl_algo.h:2277:4: error: passing ‘const pid_pgid_entry’ as ‘this’ argument of ‘bool pid_pgid_entry::operator<(const pid_pgid_entry&)’ discards qualifiers [-fpermissive]

Making the operator< method const fixes it.

gdb/ChangeLog:

	* nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
	const.
2017-10-14 09:28:07 -04:00
..
aarch64-linux-hw-point.c
aarch64-linux-hw-point.h
aarch64-linux.c lwp_info: Make the arch code free arch_lwp_info 2017-10-12 16:48:22 -04:00
aarch64-linux.h lwp_info: Make the arch code free arch_lwp_info 2017-10-12 16:48:22 -04:00
amd64-linux-siginfo.c
amd64-linux-siginfo.h
fork-inferior.c Implement "set cwd" command on GDB 2017-10-04 01:59:30 -04:00
fork-inferior.h Add ATTRIBUTE_PRINTF to trace_start_error 2017-06-17 23:19:25 +02:00
gdb_ptrace.h
gdb_thread_db.h
glibc_thread_db.h
linux-btrace.c Introduce and use gdb_file_up 2017-08-03 07:58:52 -06:00
linux-btrace.h
linux-namespaces.c
linux-namespaces.h
linux-nat.h
linux-osdata.c Fix build failure in linux-osdata.c 2017-10-14 09:28:07 -04:00
linux-osdata.h
linux-personality.c
linux-personality.h
linux-procfs.c Rename _const functions to use overloading instead 2017-09-11 15:46:12 -06:00
linux-procfs.h
linux-ptrace.c nat/linux-ptrace.c: add missing gdb_byte* cast 2017-06-18 23:29:03 +02:00
linux-ptrace.h
linux-waitpid.c linux-waitpid: Get rid of format string warning 2017-09-21 15:19:40 +02:00
linux-waitpid.h
mips-linux-watch.c
mips-linux-watch.h
ppc-linux.c
ppc-linux.h
x86-cpuid.h
x86-dregs.c x86-dregs: Print debug registers one per line 2017-06-25 12:40:10 +02:00
x86-dregs.h
x86-gcc-cpuid.h
x86-linux-dregs.c
x86-linux-dregs.h
x86-linux.c lwp_info: Make the arch code free arch_lwp_info 2017-10-12 16:48:22 -04:00
x86-linux.h lwp_info: Make the arch code free arch_lwp_info 2017-10-12 16:48:22 -04:00