public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Core file support for bare metal ARM eabi/elf-none-targets?
@ 2012-04-11 14:29 Fredrik Hederstierna
  0 siblings, 0 replies; only message in thread
From: Fredrik Hederstierna @ 2012-04-11 14:29 UTC (permalink / raw)
  To: gdb

Hi

I use bare-metal GCC/GDB arm-none-elf and arm-non-eabi toolchains.
It would be great if also 'non-Linux' targets could benefit from core-file support.

Systems using just a simple scheduler, or a simple embedded OS, could possibly generate core-files 'by hand' when crashing or asserting.
Our system eg. does put all RAM in a dedicated flash sector when asserting, then after reboot system, a core-file is generated and retrieved by a developer at a later time.
I guess this is a common and simple way of generating a core-file in an embedded system.
Also the core-files can be sent in from the field from real customers, and not only while being connected with GDB and JTAG.

The problem is that the 'bare-metal' GDB seems not to support core-files, I guess to arm-none format is undefined.
So currently we 'fake' the core-file to be an Linux-core, but this does not seem right (even though it works fine).

If I look in "arm-tdep.c" in function "arm_gdbarch_init()", there is no support for core-file in the setup.
The 'configure.tgt' does not even include 'corelow.o' for none-target:

  arm*-*-*)
    # Target: ARM embedded system
    gdb_target_obs="arm-tdep.o"
    gdb_sim=../sim/arm/libsim.a
    ;;


In "arm-linux-tdep.c" there is support for Linux-core in the setup, making calls like:

 /* 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);

  set_gdbarch_get_siginfo_type (gdbarch, linux_get_siginfo_type);


What if some of this could be moved up to 'arm-tdep.c', or could it possibly be defined a basic core-file for a 'arm-none-target'?
This core format could possibly be used by all bare metal ARM systems for basic debugging?

Thanks & Best Regards,
Fredrik Hederstierna

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-11 14:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-11 14:29 Core file support for bare metal ARM eabi/elf-none-targets? Fredrik Hederstierna

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).