Pedro Alves wrote: > 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., Understood and agreed. Here is a new patch. I made sure it works even if core_gdbarch is NULL. I also fixed my previous patch for target signal by checking if there is a core_gdbarch. Thanks, -- Aleksandar Ristovski QNX Software Systems Change log remained the same, but repeated for reference: 2009-06-05 Aleksandar Ristovski * corelow.c (add_to_thread_list): Use new gdbarch_ptid_from_core_section_name. (get_core_register_section): Use new gdbarch_core_section_name_from_ptid. * gdbarch.sh (core_reg_section_encodes_pid): Deleted. (ptid_from_core_section_name) (core_section_name_from_ptid): New gdbarch callbacks. (default_ptid_from_core_section_name) (default_core_section_name_from_ptid): New functions. * gdbarch.h, gdbarch.c: Regenerate. * sol2-tdep.h (sol2_ptid_from_core_section_name) (sol2_core_section_name_from_ptid): New declarations. * sol2-tdep.c (sol2_ptid_from_core_section_name) (sol2_core_section_name_from_ptid): New functions. * amd64-sol2-tdep.c (amd64_sol2_init_abi): Register the two functions. * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Likewise. * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Likewise. * i386-sol2-tdep.c (i386_sol2_init_abi): Likewise.