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: ptid from core section


On Friday 05 June 2009 15:04:19, Aleksandar Ristovski wrote:

> What are the circumstances under which core_gdbarch would 
> not be found? If we are opening a core from a system gdb was 
> not configured for?

E.g., we still have targets using the deprecated_add_core_fns
mechanism, and AFAICS, usually those don't usually install
gdbarch sniffers for the core bfd's they handle.  E.g., 

gdb/alpha-nat.c:

/* Register that we are able to handle alpha core file formats. */

static struct core_fns alpha_osf_core_fns =
{
  /* This really is bfd_target_unknown_flavour.  */

  bfd_target_unknown_flavour,           /* core_flavour */
  default_check_format,                 /* check_format */
  default_core_sniffer,                 /* core_sniffer */
  fetch_osf_core_registers,             /* core_read_registers */
  NULL                                  /* next */
};

gdb/alpha-nat.c is pulled in by:

src/gdb/config/alpha/alpha-osf3.mh

while src/gdb/configure.tgt, indicates that alpha*-*-osf*
pulls in:

alpha*-*-osf*)
        # Target: Little-endian Alpha running OSF/1
        gdb_target_obs="alpha-tdep.o alpha-osf1-tdep.o alpha-mdebug-tdep.o"
        ;;

and, I don't see any sniffer for osf core's in alpha-osf1-tdep.c.

There may be other cores supported by bfd that end
up with similar situations, on some not-so-common configurations.

>cd bfd/
>ls *core*
aix386-core.c   corefile.c     elf32-score7.c  hppabsd-core.c  netbsd-core.c  ptrace-core.c
aix5ppc-core.c  cpu-mcore.c    elf32-score.c   hpux-core.c     osf-core.c     rs6000-core.c
cisco-core.c    cpu-score.c    elf32-score.h   irix-core.c     pei-mcore.c    sco5-core.c
coff-mcore.c    elf32-mcore.c  elfcore.h       lynx-core.c     pe-mcore.c     trad-core.c

-- 
Pedro Alves


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