This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: [RFC] corelow and multi-arch : Move deprecated_add_core_fns to set_gdbarch_regset_from_core_section
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: teawater at gmail dot com (Hui Zhu)
- Cc: gdb at sourceware dot org
- Date: Tue, 3 Aug 2010 19:11:55 +0200 (CEST)
- Subject: Re: [RFC] corelow and multi-arch : Move deprecated_add_core_fns to set_gdbarch_regset_from_core_section
Hui Zhu wrote:
> This error because sniff_core_bfd return cris_elf_core_fns. So GDB
> use cris_elf_core_fns.fetch_core_registers to analyze this mips core.
> It return cris_elf_core_fns because core_sniffer of cris_elf_core_fns
> and mips-linux-tdep.c:regset_core_fns is default_core_sniffer.
> So I think this is not fit with the multi-arch.
Yes, this is broken. -tdep files should never use deprecated_add_core_fns
(in fact, *nobody* should use deprecated_add_core_fns, that's why it's
deprecated :-/).
> Do you think we can begin move deprecated_add_core_fns to
> set_gdbarch_regset_from_core_section?
What do you mean, "move"? The fix for problem is for someone who
understands the relevant core file formats (and has access to a
system they can test on) to implement gdbarch_regset_from_core_section
for cris and/or mips, and then just remove deprecated_add_core_fns
from those -tdep files.
> BTW, core_vec->core_read_registers have a argument "which" that
> gdbarch_regset_from_core_section doesn't have. Do you think we can
> add one to it?
No, gdbarch_regset_from_core_section instead gets the "name" argument,
which is more general.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com