This is the mail archive of the gdb@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]

Make corefile support in arm-linux generic for arm-* ?


Hi

I'm looking into getting core-file support for ARM non-linux targets.

Looking into 'arm-tdep.c' and 'arm-linux-tdep.c' I just wonder if it would be possible to move possible generic parts up to 'arm-tdep.c' ?

I was thinking core-file default support could possibly be initiated in 'arm-tdep.c' before calling

  /* Hook in the ABI-specific overrides, if they have been registered.  */
  gdbarch_init_osabi (info, gdbarch);

I was thinking of eg. (from 'arm-linux-tdef.c':

  /* Core file support.  */
  set_gdbarch_regset_from_core_section (gdbarch,
					arm_linux_regset_from_core_section);
  set_gdbarch_core_read_description (gdbarch, arm_linux_core_read_description);
  if (tdep->have_vfp_registers)
    set_gdbarch_core_regset_sections (gdbarch, arm_linux_vfp_regset_sections);
  else if (tdep->have_fpa_registers)
    set_gdbarch_core_regset_sections (gdbarch, arm_linux_fpa_regset_sections);

Just renaming stuff excluding '_linux_' and move functions to 'arm-tdef.c' ? eg.

arm_linux_regset_from_core_section  ---> arm_regset_from_core_section
arm_linux_core_read_description   ---> arm_core_read_description
arm_linux_vfp_regset_sections  ---> etc
arm_linux_fpa_regset_sections

As I see it some parts seems quite generic and could be re-used for default corefile hanlding, eg. bare-metal arm-targets.

It would be really nice if it was possible to be able to run 'generate-corefile' and similar out-of-the-box from an ARM bare-metal toolchain.
What do you think?

Any other further ideas how to get default core-file support for ARM bare-metal non-linux targets are also welcome! :-)

Thanks and Best Regards
/Fredrik


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