Use std::vector in linux_xfer_osdata_processgroups
authorSimon Marchi <simon.marchi@ericsson.com>
Sat, 14 Oct 2017 12:38:02 +0000 (08:38 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Sat, 14 Oct 2017 12:38:02 +0000 (08:38 -0400)
commitb129dcac882da87767cb863ad8b2572f90e9e5bc
tree4bd370e3cbfdcac3c20bd62d6391f118663a2874
parentaf5bf4ada48ff65b6658be1fab8f9c8f8ab5f319
Use std::vector in linux_xfer_osdata_processgroups

This simplifies the code quite a bit, by removing the array of PID_T
that's actually an array of pairs of PID_T.

This code is only used to implement "info os procgroups".  I tested by hand
as well as by running gdb.base/info-os.exp for unix, native-gdbserver
and native-extended-gdbserver.

gdb/ChangeLog:

* nat/linux-osdata.c: Include algorithm.
(compare_processes): Remove.
(struct pid_pgid_entry): New struct.
(linux_xfer_osdata_processgroups): Use std::vector instead of
XNEWVEC.
gdb/ChangeLog
gdb/nat/linux-osdata.c