diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-09-07 17:52:41 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-09-07 17:52:41 +0000 |
commit | 1390fcc2ffc083210e3706235c9383b219383fac (patch) | |
tree | aac7c6563a0ac5297ab37c348b834012d1f8a356 | |
parent | 307c948d206758be9b2331ae17d7c6163a5989a4 (diff) | |
download | gdb-1390fcc2ffc083210e3706235c9383b219383fac.zip gdb-1390fcc2ffc083210e3706235c9383b219383fac.tar.gz gdb-1390fcc2ffc083210e3706235c9383b219383fac.tar.bz2 |
gdb/
* m68k-tdep.c (m68k_gdbarch_init): Allocate TDEP as cleared.
* sparc-tdep.c (sparc32_gdbarch_init): Allocate TDEP as cleared.
Remove explicit clearing of TDEP fields.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/m68k-tdep.c | 2 | ||||
-rw-r--r-- | gdb/sparc-tdep.c | 7 |
3 files changed, 8 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 362428e..e2509c6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2009-09-07 Jan Kratochvil <jan.kratochvil@redhat.com> + + * m68k-tdep.c (m68k_gdbarch_init): Allocate TDEP as cleared. + * sparc-tdep.c (sparc32_gdbarch_init): Allocate TDEP as cleared. + Remove explicit clearing of TDEP fields. + 2009-09-06 Hui Zhu <teawater@gmail.com> * i386-tdep.c (i386_record_check_override): Deleted. diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index 507af65..7a49c23 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -1160,7 +1160,7 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) break; } - tdep = xmalloc (sizeof (struct gdbarch_tdep)); + tdep = xzalloc (sizeof (struct gdbarch_tdep)); gdbarch = gdbarch_alloc (&info, tdep); tdep->fpregs_present = has_fp; tdep->flavour = flavour; diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index bf711f0..dc065ed 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -1377,16 +1377,11 @@ sparc32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) return arches->gdbarch; /* Allocate space for the new architecture. */ - tdep = XMALLOC (struct gdbarch_tdep); + tdep = XZALLOC (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); tdep->pc_regnum = SPARC32_PC_REGNUM; tdep->npc_regnum = SPARC32_NPC_REGNUM; - tdep->gregset = NULL; - tdep->sizeof_gregset = 0; - tdep->fpregset = NULL; - tdep->sizeof_fpregset = 0; - tdep->plt_entry_size = 0; tdep->step_trap = sparc_step_trap; set_gdbarch_long_double_bit (gdbarch, 128); |