From: Tom Tromey Date: Tue, 11 Mar 2025 17:22:05 +0000 (-0600) Subject: Use gdb unordered set and map in Python layer X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fd34c152ef22b65bc942c6d36a04a4272ef4c6fd;p=thirdparty%2Fbinutils-gdb.git Use gdb unordered set and map in Python layer This changes a couple of files in the Python layer to use gdb:unordered_set and gdb::unordered_map. Another use exists but I think it is being handled by Jan's series. Approved-By: Simon Marchi --- diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c index 60bf56d17de..d11ca9e6506 100644 --- a/gdb/python/py-inferior.c +++ b/gdb/python/py-inferior.c @@ -30,10 +30,10 @@ #include "py-event.h" #include "py-stopevent.h" #include "progspace-and-thread.h" -#include +#include "gdbsupport/unordered_map.h" using thread_map_t - = std::unordered_map>; + = gdb::unordered_map>; struct inferior_object { diff --git a/gdb/python/py-registers.c b/gdb/python/py-registers.c index 229dd62a826..75f99e51071 100644 --- a/gdb/python/py-registers.c +++ b/gdb/python/py-registers.c @@ -22,7 +22,7 @@ #include "reggroups.h" #include "python-internal.h" #include "user-regs.h" -#include +#include "gdbsupport/unordered_map.h" /* Per-gdbarch data type. */ typedef std::vector> gdbpy_register_type; @@ -98,7 +98,7 @@ gdbpy_get_reggroup (const reggroup *reggroup) /* Map from GDB's internal reggroup objects to the Python representation. GDB's reggroups are global, and are never deleted, so using a map like this is safe. */ - static std::unordered_map> + static gdb::unordered_map> gdbpy_reggroup_object_map; /* If there is not already a suitable Python object in the map then