This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 11/12] M68K Linux: Define regset structures.
- From: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: <gdb-patches at sourceware dot org>, Andreas Schwab <schwab at linux-m68k dot org>
- Date: Tue, 27 May 2014 10:51:08 +0200
- Subject: Re: [PATCH 11/12] M68K Linux: Define regset structures.
- Authentication-results: sourceware.org; auth=none
- References: <1401122208-2481-1-git-send-email-arnez at linux dot vnet dot ibm dot com> <1401122208-2481-12-git-send-email-arnez at linux dot vnet dot ibm dot com> <5383EBE5 dot 4060709 at codesourcery dot com>
On Tue, May 27 2014, Yao Qi wrote:
> On 05/27/2014 12:36 AM, Andreas Arnez wrote:
>> +/* Return the appropriate register set for the core section identified
>> + by SECT_NAME and SECT_SIZE. */
>> +
>> +static const struct regset *
>> +m68k_linux_regset_from_core_section (struct gdbarch *gdbarch,
>> + const char *sect_name,
>> + size_t sect_size)
>> +{
>> + if (strcmp (sect_name, ".reg") == 0
>> + && sect_size >= M68K_LINUX_GREGS_SIZE)
>> + return &m68k_linux_gregset;
>> +
>> + if (strcmp (sect_name, ".reg2") == 0
>> + && sect_size >= M68K_LINUX_FPREGS_SIZE)
>> + return &m68k_linux_fpregset;
>> +
>> + return NULL;
>> +}
>> +
>> static void
>> m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
>> {
>> @@ -361,6 +422,10 @@ m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
>>
>> set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
>>
>> + /* Core file support. */
>> + set_gdbarch_regset_from_core_section
>> + (gdbarch, m68k_linux_regset_from_core_section);
>> +
>
> Is it intended to include this change in this patch? or it should go
> to the next patch series?
It is intended here, such that the register sets are actually used by
linux_nat_collect_thread_registers and get_core_register_section.
If I didn't miss anything, M68K and IA64 were the only Linux targets
without regset_from_core_section gdbarch methods before. After the
patch series all Linux targets should have them, and all their regsets
should have supply- *and* collect methods.