From: Mark Kettenis Date: Sun, 25 Jan 2004 12:10:55 +0000 (+0000) Subject: * sparc-tdep.c (sparc_regset_from_core_section): Check whether X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c558d81a8728761eea59e8c9549dfd3eb8933406;p=binutils-gdb.git * sparc-tdep.c (sparc_regset_from_core_section): Check whether SECT_SIZE is large enough, not wheter it's exactly the right size. (sparc32_gdbarch_init): Initialize TDEP->sizeof_gregset and TDEP->fpregset to zero. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5c0cd0c9d19..c825346dac9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2004-01-25 Mark Kettenis + * sparc-tdep.c (sparc_regset_from_core_section): Check whether + SECT_SIZE is large enough, not wheter it's exactly the right size. + (sparc32_gdbarch_init): Initialize TDEP->sizeof_gregset and + TDEP->fpregset to zero. + * sparcnbsd-tdep.c (sparc32nbsd_supply_gregset): Also supply the floating-point registers for traditional NetBSD core files. (sparc32nbsd_init_abi): Initialize TDEP->sizeof_gregset and diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 05bac9a1a55..ed4888044f7 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -1030,10 +1030,10 @@ sparc_regset_from_core_section (struct gdbarch *gdbarch, { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - if (strcmp (sect_name, ".reg") == 0 && sect_size == tdep->sizeof_gregset) + if (strcmp (sect_name, ".reg") == 0 && sect_size >= tdep->sizeof_gregset) return tdep->gregset; - if (strcmp (sect_name, ".reg2") == 0 && sect_size == tdep->sizeof_fpregset) + if (strcmp (sect_name, ".reg2") == 0 && sect_size >= tdep->sizeof_fpregset) return tdep->fpregset; return NULL; @@ -1058,9 +1058,9 @@ sparc32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->pc_regnum = SPARC32_PC_REGNUM; tdep->npc_regnum = SPARC32_NPC_REGNUM; tdep->gregset = NULL; - tdep->sizeof_gregset = 20 * 4; + tdep->sizeof_gregset = 0; tdep->fpregset = NULL; - tdep->sizeof_fpregset = 33 * 4; + tdep->sizeof_fpregset = 0; tdep->plt_entry_size = 0; set_gdbarch_long_double_bit (gdbarch, 128);