adding corelow.o to `alpha*-*-linux*' really enables reading the core file. It does not display registers, essential to make it useful: GNU gdb (GDB) 7.2.50.20100830-cvs This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=alpha-unknown-linux-gnu". ./gdb -nx -c alpha.core warning: Couldn't find general-purpose registers in core file. warning: Couldn't find general-purpose registers in core file. Cannot access memory at address 0x0 (gdb) info registers v0 0x0 0 t0 0x0 0 [...]
Created attachment 4955 [details] alpha.core.gz alpha-unknown-linux-gnu .gz core file.
The file is otherwise loaded: (gdb) info files Local core dump file: `/home/jkratoch/t/alpha.core', file type elf64-alpha. 0x000000011f3d4000 - 0x000000011f3fe000 is load1 0x0000000120000000 - 0x0000000120000000 is load2 0x0000000120014000 - 0x0000000120016000 is load3 0x0000000120016000 - 0x0000000120038000 is load4 0x0000020000000000 - 0x0000020000000000 is load5 0x0000020000020000 - 0x0000020000022000 is load6 0x000002000002e000 - 0x0000020000030000 is load7 0x0000020000030000 - 0x0000020000032000 is load8 0x0000020000046000 - 0x0000020000046000 is load9 0x00000200001c2000 - 0x00000200001c2000 is load10 0x00000200001d2000 - 0x00000200001d6000 is load11 0x00000200001d6000 - 0x00000200001d8000 is load12 0x00000200001d8000 - 0x00000200001dc000 is load13 0x00000200001dc000 - 0x00000200001dc000 is load14 fetch_osf_core_registers is in alpha-nat.c, not *-tdep.c. Roland McGrath has confirmed native gdb loads it: --------------------------------------------------------------------------- I logged into albeniz.debian.org, an alpha available to Debian developers. Debian's gdb (6.8) reads core files there. I don't know if they have fixes or just that native builds already do work.
Looking at bfd/elf64-alpha.c, I don't see any core note 'grok'ing routines, so it's not surprising that this would only work natively currently. See below for a relevant snippet of bfd/elf.c that points the way. For being host-independent, the bfd backend needs to implement the elf_backend_grok_prstatus callback, otherwise, we fallback to the host-dependent elfcore_grok_prstatus. static bfd_boolean elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note) { const struct elf_backend_data *bed = get_elf_backend_data (abfd); switch (note->type) { default: return TRUE; case NT_PRSTATUS: if (bed->elf_backend_grok_prstatus) if ((*bed->elf_backend_grok_prstatus) (abfd, note)) return TRUE; #if defined (HAVE_PRSTATUS_T) return elfcore_grok_prstatus (abfd, note); #else return TRUE; #endif