aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/frame-unwind.c11
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;
}