diff options
Diffstat (limited to 'gdb/nios2-tdep.c')
-rw-r--r-- | gdb/nios2-tdep.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/nios2-tdep.c b/gdb/nios2-tdep.c index a93ef8a..de61c9c 100644 --- a/gdb/nios2-tdep.c +++ b/gdb/nios2-tdep.c @@ -2274,7 +2274,6 @@ nios2_gcc_target_options (struct gdbarch *gdbarch) static struct gdbarch * nios2_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) { - struct gdbarch *gdbarch; int i; tdesc_arch_data_up tdesc_data; const struct target_desc *tdesc = info.target_desc; @@ -2312,8 +2311,9 @@ nios2_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* None found, create a new architecture from the information provided. */ - nios2_gdbarch_tdep *tdep = new nios2_gdbarch_tdep; - gdbarch = gdbarch_alloc (&info, tdep); + gdbarch *gdbarch + = gdbarch_alloc (&info, gdbarch_tdep_up (new nios2_gdbarch_tdep)); + nios2_gdbarch_tdep *tdep = gdbarch_tdep<nios2_gdbarch_tdep> (gdbarch); /* longjmp support not enabled by default. */ tdep->jb_pc = -1; |