diff options
author | Guinevere Larsen <guinevere@redhat.com> | 2025-01-17 15:33:11 -0300 |
---|---|---|
committer | Guinevere Larsen <guinevere@redhat.com> | 2025-01-17 15:33:11 -0300 |
commit | abfc3190ce8503890b8df4e3c315532b2efb4f84 (patch) | |
tree | ca11dbaf8bc971d1cb5be3cd9a8fb957170806f7 | |
parent | 56535ffb619362d5f492fddc15aa6aaee47baab4 (diff) | |
download | binutils-users/guinevere/try-build-break.zip binutils-users/guinevere/try-build-break.tar.gz binutils-users/guinevere/try-build-break.tar.bz2 |
gdb: fix recent build breakage on 32 bit systemsusers/guinevere/try-build-break
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.
-rw-r--r-- | gdb/frame-unwind.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c index fab9b3c..c63f8aa 100644 --- a/gdb/frame-unwind.c +++ b/gdb/frame-unwind.c @@ -73,14 +73,9 @@ static std::vector<const frame_unwind *> & get_frame_unwind_table (struct gdbarch *gdbarch) { std::vector<const frame_unwind *> *table = frame_unwind_data.get (gdbarch); - if (table != nullptr) - return *table; - - table = new std::vector<const frame_unwind *>; - 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; } |