From: Guinevere Larsen Date: Fri, 17 Jan 2025 18:33:11 +0000 (-0300) Subject: gdb: fix recent build breakage on 32 bit systems X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fusers%2Fguinevere%2Ftry-build-break;p=thirdparty%2Fbinutils-gdb.git gdb: fix recent build breakage on 32 bit systems The recent commit 3919cf8a704138e4f2dd79c66e33a62087180f1f caused a build breakage on the 32-bit debian try bot. This seems related to how the patch allocates space for the frame unwinder table in a gdbarch. This commit changes that allocation to be in-place. --- diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c index fab9b3c981a..c63f8aa0d3e 100644 --- a/gdb/frame-unwind.c +++ b/gdb/frame-unwind.c @@ -73,14 +73,9 @@ static std::vector & get_frame_unwind_table (struct gdbarch *gdbarch) { std::vector *table = frame_unwind_data.get (gdbarch); - if (table != nullptr) - return *table; - - table = new std::vector; - table->insert (table->begin (), standard_unwinders.begin (), - standard_unwinders.end ()); - - frame_unwind_data.set (gdbarch, table); + if (table == nullptr) + table = frame_unwind_data.emplace (gdbarch, standard_unwinders.begin (), + standard_unwinders.end ()); return *table; }