[PATCH] [PATCH] [gdb] adds several headers to the include list

Christopher Di Bella cjdb@google.com
Wed Jul 20 06:01:20 GMT 2022


Building GDB currently fails to build with libc++, because libc++ is
stricter about which headers "leak" entities they're not guaranteed
to support. The following headers have been added:

* `<iterator>`, to support `std::back_insert_iterator`
* `<utility>`, to support `std::move` and `std::swap`
* `<vector>`, to support `std::vector`
---
 gdb/value.c | 3 +++
 1 file changed, 3 insertions(+)

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>
 #include "completer.h"
 #include "gdbsupport/selftest.h"
 #include "gdbsupport/array-view.h"
-- 
2.37.0.170.g444d1eabd0-goog



More information about the Gdb-patches mailing list