public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: "sarah@hederstierna.com" <fredrik@hederstierna.com>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Make corefile support in arm-linux generic for arm-* ?
Date: Fri, 20 Jul 2012 07:02:00 -0000	[thread overview]
Message-ID: <CE36BD26828FA5408B9F87E4DD2ACB0B019FF8DEA915@MBXVS01.HMC.local> (raw)

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

                 reply	other threads:[~2012-07-20  7:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CE36BD26828FA5408B9F87E4DD2ACB0B019FF8DEA915@MBXVS01.HMC.local \
    --to=fredrik@hederstierna.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).