This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 11/12] M68K Linux: Define regset structures.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]