[PATCH] [PATCH] [gdb] adds several headers to the include list
Manoj Gupta
manojgupta@google.com
Fri Jul 22 18:46:26 GMT 2022
On Thu, Jul 21, 2022 at 10:41 AM Pedro Alves <pedro@palves.net> wrote:
> > diff --git a/gdb/value.c b/gdb/value.c
> > index 022fca91a42..c9bec678d95 100644
> > --- a/gdb/value.c
> > +++ b/gdb/value.c
> > @@ -40,6 +40,9 @@
> > #include "cp-abi.h"
> > #include "user-regs.h"
> > #include <algorithm>
> > +#include <iterator>
> > +#include <utility>
> > +#include <vector>
>
> It seems to me that <vector> should have beeen included in the header
> (value.h):
>
> $ grep std::vector value.h
> std::vector<value_ref_ptr> *val_chain,
> extern std::vector<value_ref_ptr> value_release_to_mark
>
> This looks like a pervasive thing in the gdb codebase.
I just quickly grepped for '#include <vector>' for files that have a
"std::vector" in the gdb codebase .
There are 200+ files that use std::vector but do not include <vector> i.e.
they rely on a transitive include through other headers.
Thanks,
Manoj
More information about the Gdb-patches
mailing list